@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
227 lines • 9.88 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! ***
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.DataStore = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* Data store is a collection of websites and documents used to find answers for
* end-user's questions in Discovery Engine (a.k.a. Vertex AI Search and
* Conversation).
*
* To get more information about DataStore, see:
*
* * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores)
* * How-to Guides
* * [Create a search data store](https://cloud.google.com/generative-ai-app-builder/docs/create-data-store-es)
*
* ## Example Usage
*
* ### Discoveryengine Datastore Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const basic = new gcp.discoveryengine.DataStore("basic", {
* location: "global",
* dataStoreId: "data-store-id",
* displayName: "tf-test-structured-datastore",
* industryVertical: "GENERIC",
* contentConfig: "NO_CONTENT",
* solutionTypes: ["SOLUTION_TYPE_SEARCH"],
* createAdvancedSiteSearch: false,
* skipDefaultSchemaCreation: false,
* });
* ```
* ### Discoveryengine Datastore Kms Key Name
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const kmsKeyName = new gcp.discoveryengine.DataStore("kms_key_name", {
* location: "us",
* dataStoreId: "data-store-id",
* displayName: "tf-test-structured-datastore",
* industryVertical: "GENERIC",
* contentConfig: "NO_CONTENT",
* solutionTypes: ["SOLUTION_TYPE_SEARCH"],
* kmsKeyName: "kms-key",
* createAdvancedSiteSearch: false,
* skipDefaultSchemaCreation: false,
* });
* ```
* ### Discoveryengine Datastore Document Processing Config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const documentProcessingConfig = new gcp.discoveryengine.DataStore("document_processing_config", {
* location: "global",
* dataStoreId: "data-store-id",
* displayName: "tf-test-structured-datastore",
* industryVertical: "GENERIC",
* contentConfig: "NO_CONTENT",
* solutionTypes: ["SOLUTION_TYPE_SEARCH"],
* createAdvancedSiteSearch: false,
* documentProcessingConfig: {
* defaultParsingConfig: {
* digitalParsingConfig: {},
* },
* parsingConfigOverrides: [{
* fileType: "pdf",
* ocrParsingConfig: {
* useNativeText: true,
* },
* }],
* },
* });
* ```
* ### Discoveryengine Datastore Advanced Site Search Config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const advancedSiteSearchConfig = new gcp.discoveryengine.DataStore("advanced_site_search_config", {
* location: "global",
* dataStoreId: "data-store-id",
* displayName: "tf-test-advanced-site-search-config-datastore",
* industryVertical: "GENERIC",
* contentConfig: "PUBLIC_WEBSITE",
* solutionTypes: ["SOLUTION_TYPE_CHAT"],
* createAdvancedSiteSearch: true,
* skipDefaultSchemaCreation: false,
* advancedSiteSearchConfig: {
* disableInitialIndex: true,
* disableAutomaticRefresh: true,
* },
* });
* ```
*
* ## Import
*
* DataStore can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}`
* * `{{project}}/{{location}}/{{data_store_id}}`
* * `{{location}}/{{data_store_id}}`
*
* When using the `pulumi import` command, DataStore can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:discoveryengine/dataStore:DataStore default projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}
* $ pulumi import gcp:discoveryengine/dataStore:DataStore default {{project}}/{{location}}/{{data_store_id}}
* $ pulumi import gcp:discoveryengine/dataStore:DataStore default {{location}}/{{data_store_id}}
* ```
*/
class DataStore extends pulumi.CustomResource {
/**
* Get an existing DataStore 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 DataStore(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:discoveryengine/dataStore:DataStore';
/**
* Returns true if the given object is an instance of DataStore. 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'] === DataStore.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["advancedSiteSearchConfig"] = state?.advancedSiteSearchConfig;
resourceInputs["contentConfig"] = state?.contentConfig;
resourceInputs["createAdvancedSiteSearch"] = state?.createAdvancedSiteSearch;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["dataStoreId"] = state?.dataStoreId;
resourceInputs["defaultSchemaId"] = state?.defaultSchemaId;
resourceInputs["deletionPolicy"] = state?.deletionPolicy;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["documentProcessingConfig"] = state?.documentProcessingConfig;
resourceInputs["industryVertical"] = state?.industryVertical;
resourceInputs["kmsKeyName"] = state?.kmsKeyName;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["project"] = state?.project;
resourceInputs["skipDefaultSchemaCreation"] = state?.skipDefaultSchemaCreation;
resourceInputs["solutionTypes"] = state?.solutionTypes;
}
else {
const args = argsOrState;
if (args?.dataStoreId === undefined && !opts.urn) {
throw new Error("Missing required property 'dataStoreId'");
}
if (args?.displayName === undefined && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
if (args?.industryVertical === undefined && !opts.urn) {
throw new Error("Missing required property 'industryVertical'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["advancedSiteSearchConfig"] = args?.advancedSiteSearchConfig;
resourceInputs["contentConfig"] = args?.contentConfig;
resourceInputs["createAdvancedSiteSearch"] = args?.createAdvancedSiteSearch;
resourceInputs["dataStoreId"] = args?.dataStoreId;
resourceInputs["deletionPolicy"] = args?.deletionPolicy;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["documentProcessingConfig"] = args?.documentProcessingConfig;
resourceInputs["industryVertical"] = args?.industryVertical;
resourceInputs["kmsKeyName"] = args?.kmsKeyName;
resourceInputs["location"] = args?.location;
resourceInputs["project"] = args?.project;
resourceInputs["skipDefaultSchemaCreation"] = args?.skipDefaultSchemaCreation;
resourceInputs["solutionTypes"] = args?.solutionTypes;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["defaultSchemaId"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DataStore.__pulumiType, name, resourceInputs, opts);
}
}
exports.DataStore = DataStore;
//# sourceMappingURL=dataStore.js.map