@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
158 lines • 6.79 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.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 testScope = new gcp.chronicle.DataAccessScope("test_scope", {
* location: "us",
* instance: "00000000-0000-0000-0000-000000000000",
* dataAccessScopeId: "scope-id",
* description: "test scope description",
* allowedDataAccessLabels: [{
* logType: "GCP_CLOUDAUDIT",
* }],
* });
* 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",
* scopeInfos: [{
* referenceListScope: {
* scopeNames: [testScope.name],
* },
* }],
* });
* ```
*
* ## 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, { ...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?.description;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["entries"] = state?.entries;
resourceInputs["instance"] = state?.instance;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["project"] = state?.project;
resourceInputs["referenceListId"] = state?.referenceListId;
resourceInputs["revisionCreateTime"] = state?.revisionCreateTime;
resourceInputs["ruleAssociationsCount"] = state?.ruleAssociationsCount;
resourceInputs["rules"] = state?.rules;
resourceInputs["scopeInfos"] = state?.scopeInfos;
resourceInputs["syntaxType"] = state?.syntaxType;
}
else {
const args = argsOrState;
if (args?.description === undefined && !opts.urn) {
throw new Error("Missing required property 'description'");
}
if (args?.entries === undefined && !opts.urn) {
throw new Error("Missing required property 'entries'");
}
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'");
}
if (args?.referenceListId === undefined && !opts.urn) {
throw new Error("Missing required property 'referenceListId'");
}
if (args?.syntaxType === undefined && !opts.urn) {
throw new Error("Missing required property 'syntaxType'");
}
resourceInputs["description"] = args?.description;
resourceInputs["entries"] = args?.entries;
resourceInputs["instance"] = args?.instance;
resourceInputs["location"] = args?.location;
resourceInputs["project"] = args?.project;
resourceInputs["referenceListId"] = args?.referenceListId;
resourceInputs["scopeInfos"] = args?.scopeInfos;
resourceInputs["syntaxType"] = args?.syntaxType;
resourceInputs["displayName"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["revisionCreateTime"] = undefined /*out*/;
resourceInputs["ruleAssociationsCount"] = undefined /*out*/;
resourceInputs["rules"] = 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
;