@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
193 lines • 8.74 kB
JavaScript
;
// *** 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.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 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, Object.assign(Object.assign({}, 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 ? state.advancedSiteSearchConfig : undefined;
resourceInputs["contentConfig"] = state ? state.contentConfig : undefined;
resourceInputs["createAdvancedSiteSearch"] = state ? state.createAdvancedSiteSearch : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["dataStoreId"] = state ? state.dataStoreId : undefined;
resourceInputs["defaultSchemaId"] = state ? state.defaultSchemaId : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["documentProcessingConfig"] = state ? state.documentProcessingConfig : undefined;
resourceInputs["industryVertical"] = state ? state.industryVertical : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["skipDefaultSchemaCreation"] = state ? state.skipDefaultSchemaCreation : undefined;
resourceInputs["solutionTypes"] = state ? state.solutionTypes : undefined;
}
else {
const args = argsOrState;
if ((!args || args.contentConfig === undefined) && !opts.urn) {
throw new Error("Missing required property 'contentConfig'");
}
if ((!args || args.dataStoreId === undefined) && !opts.urn) {
throw new Error("Missing required property 'dataStoreId'");
}
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
if ((!args || args.industryVertical === undefined) && !opts.urn) {
throw new Error("Missing required property 'industryVertical'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
resourceInputs["advancedSiteSearchConfig"] = args ? args.advancedSiteSearchConfig : undefined;
resourceInputs["contentConfig"] = args ? args.contentConfig : undefined;
resourceInputs["createAdvancedSiteSearch"] = args ? args.createAdvancedSiteSearch : undefined;
resourceInputs["dataStoreId"] = args ? args.dataStoreId : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["documentProcessingConfig"] = args ? args.documentProcessingConfig : undefined;
resourceInputs["industryVertical"] = args ? args.industryVertical : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["skipDefaultSchemaCreation"] = args ? args.skipDefaultSchemaCreation : undefined;
resourceInputs["solutionTypes"] = args ? args.solutionTypes : undefined;
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