UNPKG

@pulumi/gcp

Version:

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

162 lines 7.13 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.Watchlist = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A watchlist is a list of entities that allows for bulk operations over the included entities. * * To get more information about Watchlist, see: * * * [API documentation](https://cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.watchlists) * * How-to Guides * * [Google SecOps Guides](https://cloud.google.com/chronicle/docs/secops/secops-overview) * * ## Example Usage * * ### Chronicle Watchlist Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const example = new gcp.chronicle.Watchlist("example", { * location: "us", * instance: "00000000-0000-0000-0000-000000000000", * watchlistId: "watchlist-id", * description: "watchlist-description", * displayName: "watchlist_name", * multiplyingFactor: 1, * entityPopulationMechanism: { * manual: {}, * }, * watchlistUserPreferences: { * pinned: true, * }, * }); * ``` * ### Chronicle Watchlist Without Id * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const example = new gcp.chronicle.Watchlist("example", { * location: "us", * instance: "00000000-0000-0000-0000-000000000000", * description: "watchlist-description", * displayName: "watchlist-name", * multiplyingFactor: 1, * entityPopulationMechanism: { * manual: {}, * }, * watchlistUserPreferences: { * pinned: true, * }, * }); * ``` * * ## Import * * Watchlist can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}` * * * `{{project}}/{{location}}/{{instance}}/{{watchlist_id}}` * * * `{{location}}/{{instance}}/{{watchlist_id}}` * * When using the `pulumi import` command, Watchlist can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:chronicle/watchlist:Watchlist default projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}} * ``` * * ```sh * $ pulumi import gcp:chronicle/watchlist:Watchlist default {{project}}/{{location}}/{{instance}}/{{watchlist_id}} * ``` * * ```sh * $ pulumi import gcp:chronicle/watchlist:Watchlist default {{location}}/{{instance}}/{{watchlist_id}} * ``` */ class Watchlist extends pulumi.CustomResource { /** * Get an existing Watchlist 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 Watchlist(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Watchlist. 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'] === Watchlist.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["displayName"] = state ? state.displayName : undefined; resourceInputs["entityCounts"] = state ? state.entityCounts : undefined; resourceInputs["entityPopulationMechanism"] = state ? state.entityPopulationMechanism : undefined; resourceInputs["instance"] = state ? state.instance : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["multiplyingFactor"] = state ? state.multiplyingFactor : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; resourceInputs["watchlistId"] = state ? state.watchlistId : undefined; resourceInputs["watchlistUserPreferences"] = state ? state.watchlistUserPreferences : undefined; } else { const args = argsOrState; if ((!args || args.displayName === undefined) && !opts.urn) { throw new Error("Missing required property 'displayName'"); } if ((!args || args.entityPopulationMechanism === undefined) && !opts.urn) { throw new Error("Missing required property 'entityPopulationMechanism'"); } if ((!args || args.instance === undefined) && !opts.urn) { throw new Error("Missing required property 'instance'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["displayName"] = args ? args.displayName : undefined; resourceInputs["entityPopulationMechanism"] = args ? args.entityPopulationMechanism : undefined; resourceInputs["instance"] = args ? args.instance : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["multiplyingFactor"] = args ? args.multiplyingFactor : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["watchlistId"] = args ? args.watchlistId : undefined; resourceInputs["watchlistUserPreferences"] = args ? args.watchlistUserPreferences : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["entityCounts"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Watchlist.__pulumiType, name, resourceInputs, opts); } } exports.Watchlist = Watchlist; /** @internal */ Watchlist.__pulumiType = 'gcp:chronicle/watchlist:Watchlist'; //# sourceMappingURL=watchlist.js.map