UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

123 lines 5.48 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.V2ProjectNotificationConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * This is a continuous export that exports findings to a Pub/Sub topic. * * To get more information about ProjectNotificationConfig, see: * * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v2/projects.locations.notificationConfigs) * * How-to Guides * * [Official Documentation](https://cloud.google.com/security-command-center/docs) * * ## Example Usage * * ### Scc V2 Project Notification Config Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const sccV2ProjectNotification = new gcp.pubsub.Topic("scc_v2_project_notification", {name: "my-topic"}); * const customNotificationConfig = new gcp.securitycenter.V2ProjectNotificationConfig("custom_notification_config", { * configId: "my-config", * project: "my-project-name", * location: "global", * description: "My custom Cloud Security Command Center Finding Notification Configuration", * pubsubTopic: sccV2ProjectNotification.id, * streamingConfig: { * filter: "category = \"OPEN_FIREWALL\" AND state = \"ACTIVE\"", * }, * }); * ``` * * ## Import * * ProjectNotificationConfig can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/notificationConfigs/{{config_id}}` * * * `{{project}}/{{location}}/{{config_id}}` * * * `{{location}}/{{config_id}}` * * When using the `pulumi import` command, ProjectNotificationConfig can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:securitycenter/v2ProjectNotificationConfig:V2ProjectNotificationConfig default projects/{{project}}/locations/{{location}}/notificationConfigs/{{config_id}} * ``` * * ```sh * $ pulumi import gcp:securitycenter/v2ProjectNotificationConfig:V2ProjectNotificationConfig default {{project}}/{{location}}/{{config_id}} * ``` * * ```sh * $ pulumi import gcp:securitycenter/v2ProjectNotificationConfig:V2ProjectNotificationConfig default {{location}}/{{config_id}} * ``` */ class V2ProjectNotificationConfig extends pulumi.CustomResource { /** * Get an existing V2ProjectNotificationConfig resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new V2ProjectNotificationConfig(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of V2ProjectNotificationConfig. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === V2ProjectNotificationConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["configId"] = state?.configId; resourceInputs["description"] = state?.description; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["pubsubTopic"] = state?.pubsubTopic; resourceInputs["serviceAccount"] = state?.serviceAccount; resourceInputs["streamingConfig"] = state?.streamingConfig; } else { const args = argsOrState; if (args?.configId === undefined && !opts.urn) { throw new Error("Missing required property 'configId'"); } if (args?.streamingConfig === undefined && !opts.urn) { throw new Error("Missing required property 'streamingConfig'"); } resourceInputs["configId"] = args?.configId; resourceInputs["description"] = args?.description; resourceInputs["location"] = args?.location; resourceInputs["project"] = args?.project; resourceInputs["pubsubTopic"] = args?.pubsubTopic; resourceInputs["streamingConfig"] = args?.streamingConfig; resourceInputs["name"] = undefined /*out*/; resourceInputs["serviceAccount"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(V2ProjectNotificationConfig.__pulumiType, name, resourceInputs, opts); } } exports.V2ProjectNotificationConfig = V2ProjectNotificationConfig; /** @internal */ V2ProjectNotificationConfig.__pulumiType = 'gcp:securitycenter/v2ProjectNotificationConfig:V2ProjectNotificationConfig'; //# sourceMappingURL=v2projectNotificationConfig.js.map