UNPKG

@pulumi/gcp

Version:

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

176 lines • 8.03 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.NativeDashboard = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * A configuration for a native dashboard within a Google SecOps (Chronicle) instance. * * To get more information about NativeDashboard, see: * * * [API documentation](https://cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.nativeDashboards) * * How-to Guides * * [Google SecOps Guides](https://cloud.google.com/chronicle/docs/secops/secops-overview) * * ## Example Usage * * ### Chronicle Nativedashboard Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const myBasicDashboard = new gcp.chronicle.NativeDashboard("my_basic_dashboard", { * location: "us", * instance: "00000000-0000-0000-0000-000000000000", * displayName: "dashboard", * description: "dashboard_description", * access: "DASHBOARD_PRIVATE", * type: "CUSTOM", * filters: [{ * id: "GlobalTimeFilter", * displayName: "Global Time Filter", * dataSource: "GLOBAL", * isStandardTimeRangeFilter: true, * isStandardTimeRangeFilterEnabled: true, * filterOperatorAndFieldValues: [{ * filterOperator: "PAST", * fieldValues: [ * "1", * "DAY", * ], * }], * }], * }); * ``` * * ## Import * * NativeDashboard can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/instances/{{instance}}/nativeDashboards/{{dashboard_id}}` * * `{{project}}/{{location}}/{{instance}}/{{dashboard_id}}` * * `{{location}}/{{instance}}/{{dashboard_id}}` * * When using the `pulumi import` command, NativeDashboard can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:chronicle/nativeDashboard:NativeDashboard default projects/{{project}}/locations/{{location}}/instances/{{instance}}/nativeDashboards/{{dashboard_id}} * $ pulumi import gcp:chronicle/nativeDashboard:NativeDashboard default {{project}}/{{location}}/{{instance}}/{{dashboard_id}} * $ pulumi import gcp:chronicle/nativeDashboard:NativeDashboard default {{location}}/{{instance}}/{{dashboard_id}} * ``` */ class NativeDashboard extends pulumi.CustomResource { /** * Get an existing NativeDashboard 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 NativeDashboard(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:chronicle/nativeDashboard:NativeDashboard'; /** * Returns true if the given object is an instance of NativeDashboard. 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'] === NativeDashboard.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["access"] = state?.access; resourceInputs["charts"] = state?.charts; resourceInputs["createTime"] = state?.createTime; resourceInputs["createUserId"] = state?.createUserId; resourceInputs["dashboardId"] = state?.dashboardId; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["description"] = state?.description; resourceInputs["displayName"] = state?.displayName; resourceInputs["etag"] = state?.etag; resourceInputs["filters"] = state?.filters; resourceInputs["fingerprint"] = state?.fingerprint; resourceInputs["instance"] = state?.instance; resourceInputs["isPinned"] = state?.isPinned; resourceInputs["lastViewedTime"] = state?.lastViewedTime; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["type"] = state?.type; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["updateUserId"] = state?.updateUserId; } else { const args = argsOrState; if (args?.displayName === undefined && !opts.urn) { throw new Error("Missing required property 'displayName'"); } 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["access"] = args?.access; resourceInputs["charts"] = args?.charts; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["description"] = args?.description; resourceInputs["displayName"] = args?.displayName; resourceInputs["filters"] = args?.filters; resourceInputs["instance"] = args?.instance; resourceInputs["isPinned"] = args?.isPinned; resourceInputs["location"] = args?.location; resourceInputs["project"] = args?.project; resourceInputs["type"] = args?.type; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["createUserId"] = undefined /*out*/; resourceInputs["dashboardId"] = undefined /*out*/; resourceInputs["etag"] = undefined /*out*/; resourceInputs["fingerprint"] = undefined /*out*/; resourceInputs["lastViewedTime"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; resourceInputs["updateUserId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NativeDashboard.__pulumiType, name, resourceInputs, opts); } } exports.NativeDashboard = NativeDashboard; //# sourceMappingURL=nativeDashboard.js.map