UNPKG

@pulumi/gcp

Version:

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

144 lines 6.82 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.ReferenceList = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Reference lists are user-defined lists of values which users can use in multiple Rules. * * To get more information about ReferenceList, see: * * * [API documentation](https://cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.referenceLists) * * How-to Guides * * [Google SecOps Guides](https://cloud.google.com/chronicle/docs/secops/secops-overview) * * ## Example Usage * * ### Chronicle Referencelist Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const example = new gcp.chronicle.ReferenceList("example", { * location: "us", * instance: "00000000-0000-0000-0000-000000000000", * referenceListId: "reference_list_id", * description: "referencelist-description", * entries: [{ * value: "referencelist-entry-value", * }], * syntaxType: "REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING", * }); * ``` * * ## Import * * ReferenceList can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/instances/{{instance}}/referenceLists/{{reference_list_id}}` * * * `{{project}}/{{location}}/{{instance}}/{{reference_list_id}}` * * * `{{location}}/{{instance}}/{{reference_list_id}}` * * When using the `pulumi import` command, ReferenceList can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:chronicle/referenceList:ReferenceList default projects/{{project}}/locations/{{location}}/instances/{{instance}}/referenceLists/{{reference_list_id}} * ``` * * ```sh * $ pulumi import gcp:chronicle/referenceList:ReferenceList default {{project}}/{{location}}/{{instance}}/{{reference_list_id}} * ``` * * ```sh * $ pulumi import gcp:chronicle/referenceList:ReferenceList default {{location}}/{{instance}}/{{reference_list_id}} * ``` */ class ReferenceList extends pulumi.CustomResource { /** * Get an existing ReferenceList 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 ReferenceList(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ReferenceList. 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'] === ReferenceList.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["displayName"] = state ? state.displayName : undefined; resourceInputs["entries"] = state ? state.entries : undefined; resourceInputs["instance"] = state ? state.instance : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["referenceListId"] = state ? state.referenceListId : undefined; resourceInputs["revisionCreateTime"] = state ? state.revisionCreateTime : undefined; resourceInputs["ruleAssociationsCount"] = state ? state.ruleAssociationsCount : undefined; resourceInputs["rules"] = state ? state.rules : undefined; resourceInputs["scopeInfos"] = state ? state.scopeInfos : undefined; resourceInputs["syntaxType"] = state ? state.syntaxType : undefined; } else { const args = argsOrState; if ((!args || args.description === undefined) && !opts.urn) { throw new Error("Missing required property 'description'"); } if ((!args || args.entries === undefined) && !opts.urn) { throw new Error("Missing required property 'entries'"); } 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'"); } if ((!args || args.referenceListId === undefined) && !opts.urn) { throw new Error("Missing required property 'referenceListId'"); } if ((!args || args.syntaxType === undefined) && !opts.urn) { throw new Error("Missing required property 'syntaxType'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["entries"] = args ? args.entries : undefined; resourceInputs["instance"] = args ? args.instance : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["referenceListId"] = args ? args.referenceListId : undefined; resourceInputs["syntaxType"] = args ? args.syntaxType : undefined; resourceInputs["displayName"] = undefined /*out*/; resourceInputs["name"] = undefined /*out*/; resourceInputs["revisionCreateTime"] = undefined /*out*/; resourceInputs["ruleAssociationsCount"] = undefined /*out*/; resourceInputs["rules"] = undefined /*out*/; resourceInputs["scopeInfos"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ReferenceList.__pulumiType, name, resourceInputs, opts); } } exports.ReferenceList = ReferenceList; /** @internal */ ReferenceList.__pulumiType = 'gcp:chronicle/referenceList:ReferenceList'; //# sourceMappingURL=referenceList.js.map