@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
213 lines • 8.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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataStore = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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}}
* ```
*
* ```sh
* $ pulumi import gcp:discoveryengine/dataStore:DataStore default {{project}}/{{location}}/{{data_store_id}}
* ```
*
* ```sh
* $ 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 });
}
/**
* 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["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?.contentConfig === undefined && !opts.urn) {
throw new Error("Missing required property 'contentConfig'");
}
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["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;
/** @internal */
DataStore.__pulumiType = 'gcp:discoveryengine/dataStore:DataStore';
//# sourceMappingURL=dataStore.js.map
;