@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
162 lines • 6.63 kB
JavaScript
// *** 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.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, { ...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?.createTime;
resourceInputs["description"] = state?.description;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["entityCounts"] = state?.entityCounts;
resourceInputs["entityPopulationMechanism"] = state?.entityPopulationMechanism;
resourceInputs["instance"] = state?.instance;
resourceInputs["location"] = state?.location;
resourceInputs["multiplyingFactor"] = state?.multiplyingFactor;
resourceInputs["name"] = state?.name;
resourceInputs["project"] = state?.project;
resourceInputs["updateTime"] = state?.updateTime;
resourceInputs["watchlistId"] = state?.watchlistId;
resourceInputs["watchlistUserPreferences"] = state?.watchlistUserPreferences;
}
else {
const args = argsOrState;
if (args?.displayName === undefined && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
if (args?.entityPopulationMechanism === undefined && !opts.urn) {
throw new Error("Missing required property 'entityPopulationMechanism'");
}
if (args?.instance === undefined && !opts.urn) {
throw new Error("Missing required property 'instance'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["description"] = args?.description;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["entityPopulationMechanism"] = args?.entityPopulationMechanism;
resourceInputs["instance"] = args?.instance;
resourceInputs["location"] = args?.location;
resourceInputs["multiplyingFactor"] = args?.multiplyingFactor;
resourceInputs["project"] = args?.project;
resourceInputs["watchlistId"] = args?.watchlistId;
resourceInputs["watchlistUserPreferences"] = args?.watchlistUserPreferences;
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
;