UNPKG

@pulumi/gcp

Version:

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

117 lines 5.8 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.V2OrganizationNotificationConfig = 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 OrganizationNotificationConfig, see: * * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v2/organizations.locations.notificationConfigs) * * How-to Guides * * [Official Documentation](https://cloud.google.com/security-command-center/docs) * * ## Example Usage * * ### Scc V2 Organization Notification Config Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const sccV2OrganizationNotificationConfig = new gcp.pubsub.Topic("scc_v2_organization_notification_config", {name: "my-topic"}); * const customOrganizationNotificationConfig = new gcp.securitycenter.V2OrganizationNotificationConfig("custom_organization_notification_config", { * configId: "my-config", * organization: "123456789", * location: "global", * description: "My custom Cloud Security Command Center Finding Organization Notification Configuration", * pubsubTopic: sccV2OrganizationNotificationConfig.id, * streamingConfig: { * filter: "category = \"OPEN_FIREWALL\" AND state = \"ACTIVE\"", * }, * }); * ``` * * ## Import * * OrganizationNotificationConfig can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, OrganizationNotificationConfig can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:securitycenter/v2OrganizationNotificationConfig:V2OrganizationNotificationConfig default {{name}} * ``` */ class V2OrganizationNotificationConfig extends pulumi.CustomResource { /** * Get an existing V2OrganizationNotificationConfig 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 V2OrganizationNotificationConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of V2OrganizationNotificationConfig. 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'] === V2OrganizationNotificationConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["configId"] = state ? state.configId : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["organization"] = state ? state.organization : undefined; resourceInputs["pubsubTopic"] = state ? state.pubsubTopic : undefined; resourceInputs["serviceAccount"] = state ? state.serviceAccount : undefined; resourceInputs["streamingConfig"] = state ? state.streamingConfig : undefined; } else { const args = argsOrState; if ((!args || args.configId === undefined) && !opts.urn) { throw new Error("Missing required property 'configId'"); } if ((!args || args.organization === undefined) && !opts.urn) { throw new Error("Missing required property 'organization'"); } if ((!args || args.pubsubTopic === undefined) && !opts.urn) { throw new Error("Missing required property 'pubsubTopic'"); } if ((!args || args.streamingConfig === undefined) && !opts.urn) { throw new Error("Missing required property 'streamingConfig'"); } resourceInputs["configId"] = args ? args.configId : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["organization"] = args ? args.organization : undefined; resourceInputs["pubsubTopic"] = args ? args.pubsubTopic : undefined; resourceInputs["streamingConfig"] = args ? args.streamingConfig : undefined; resourceInputs["name"] = undefined /*out*/; resourceInputs["serviceAccount"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(V2OrganizationNotificationConfig.__pulumiType, name, resourceInputs, opts); } } exports.V2OrganizationNotificationConfig = V2OrganizationNotificationConfig; /** @internal */ V2OrganizationNotificationConfig.__pulumiType = 'gcp:securitycenter/v2OrganizationNotificationConfig:V2OrganizationNotificationConfig'; //# sourceMappingURL=v2organizationNotificationConfig.js.map