com.pulumi.gcp.discoveryengine.kotlin.SearchEngineArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.discoveryengine.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.discoveryengine.SearchEngineArgs.builder
import com.pulumi.gcp.discoveryengine.kotlin.inputs.SearchEngineCommonConfigArgs
import com.pulumi.gcp.discoveryengine.kotlin.inputs.SearchEngineCommonConfigArgsBuilder
import com.pulumi.gcp.discoveryengine.kotlin.inputs.SearchEngineSearchEngineConfigArgs
import com.pulumi.gcp.discoveryengine.kotlin.inputs.SearchEngineSearchEngineConfigArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Vertex AI Search and Conversation can be used to create a search engine or a chat application by connecting it with a datastore
* To get more information about SearchEngine, see:
* * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines)
* * How-to Guides
* * [Create a Search Engine](https://cloud.google.com/generative-ai-app-builder/docs/create-engine-es)
* ## Example Usage
* ### Discoveryengine Searchengine Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const basic = new gcp.discoveryengine.DataStore("basic", {
* location: "global",
* dataStoreId: "example-datastore-id",
* displayName: "tf-test-structured-datastore",
* industryVertical: "GENERIC",
* contentConfig: "NO_CONTENT",
* solutionTypes: ["SOLUTION_TYPE_SEARCH"],
* createAdvancedSiteSearch: false,
* });
* const basicSearchEngine = new gcp.discoveryengine.SearchEngine("basic", {
* engineId: "example-engine-id",
* collectionId: "default_collection",
* location: basic.location,
* displayName: "Example Display Name",
* dataStoreIds: [basic.dataStoreId],
* searchEngineConfig: {},
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* basic = gcp.discoveryengine.DataStore("basic",
* location="global",
* data_store_id="example-datastore-id",
* display_name="tf-test-structured-datastore",
* industry_vertical="GENERIC",
* content_config="NO_CONTENT",
* solution_types=["SOLUTION_TYPE_SEARCH"],
* create_advanced_site_search=False)
* basic_search_engine = gcp.discoveryengine.SearchEngine("basic",
* engine_id="example-engine-id",
* collection_id="default_collection",
* location=basic.location,
* display_name="Example Display Name",
* data_store_ids=[basic.data_store_id],
* search_engine_config=gcp.discoveryengine.SearchEngineSearchEngineConfigArgs())
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var basic = new Gcp.DiscoveryEngine.DataStore("basic", new()
* {
* Location = "global",
* DataStoreId = "example-datastore-id",
* DisplayName = "tf-test-structured-datastore",
* IndustryVertical = "GENERIC",
* ContentConfig = "NO_CONTENT",
* SolutionTypes = new[]
* {
* "SOLUTION_TYPE_SEARCH",
* },
* CreateAdvancedSiteSearch = false,
* });
* var basicSearchEngine = new Gcp.DiscoveryEngine.SearchEngine("basic", new()
* {
* EngineId = "example-engine-id",
* CollectionId = "default_collection",
* Location = basic.Location,
* DisplayName = "Example Display Name",
* DataStoreIds = new[]
* {
* basic.DataStoreId,
* },
* SearchEngineConfig = null,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/discoveryengine"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* basic, err := discoveryengine.NewDataStore(ctx, "basic", &discoveryengine.DataStoreArgs{
* Location: pulumi.String("global"),
* DataStoreId: pulumi.String("example-datastore-id"),
* DisplayName: pulumi.String("tf-test-structured-datastore"),
* IndustryVertical: pulumi.String("GENERIC"),
* ContentConfig: pulumi.String("NO_CONTENT"),
* SolutionTypes: pulumi.StringArray{
* pulumi.String("SOLUTION_TYPE_SEARCH"),
* },
* CreateAdvancedSiteSearch: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* _, err = discoveryengine.NewSearchEngine(ctx, "basic", &discoveryengine.SearchEngineArgs{
* EngineId: pulumi.String("example-engine-id"),
* CollectionId: pulumi.String("default_collection"),
* Location: basic.Location,
* DisplayName: pulumi.String("Example Display Name"),
* DataStoreIds: pulumi.StringArray{
* basic.DataStoreId,
* },
* SearchEngineConfig: nil,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.discoveryengine.DataStore;
* import com.pulumi.gcp.discoveryengine.DataStoreArgs;
* import com.pulumi.gcp.discoveryengine.SearchEngine;
* import com.pulumi.gcp.discoveryengine.SearchEngineArgs;
* import com.pulumi.gcp.discoveryengine.inputs.SearchEngineSearchEngineConfigArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var basic = new DataStore("basic", DataStoreArgs.builder()
* .location("global")
* .dataStoreId("example-datastore-id")
* .displayName("tf-test-structured-datastore")
* .industryVertical("GENERIC")
* .contentConfig("NO_CONTENT")
* .solutionTypes("SOLUTION_TYPE_SEARCH")
* .createAdvancedSiteSearch(false)
* .build());
* var basicSearchEngine = new SearchEngine("basicSearchEngine", SearchEngineArgs.builder()
* .engineId("example-engine-id")
* .collectionId("default_collection")
* .location(basic.location())
* .displayName("Example Display Name")
* .dataStoreIds(basic.dataStoreId())
* .searchEngineConfig()
* .build());
* }
* }
* ```
* ```yaml
* resources:
* basic:
* type: gcp:discoveryengine:DataStore
* properties:
* location: global
* dataStoreId: example-datastore-id
* displayName: tf-test-structured-datastore
* industryVertical: GENERIC
* contentConfig: NO_CONTENT
* solutionTypes:
* - SOLUTION_TYPE_SEARCH
* createAdvancedSiteSearch: false
* basicSearchEngine:
* type: gcp:discoveryengine:SearchEngine
* name: basic
* properties:
* engineId: example-engine-id
* collectionId: default_collection
* location: ${basic.location}
* displayName: Example Display Name
* dataStoreIds:
* - ${basic.dataStoreId}
* searchEngineConfig: {}
* ```
*
* ## Import
* SearchEngine can be imported using any of these accepted formats:
* * `projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}`
* * `{{project}}/{{location}}/{{collection_id}}/{{engine_id}}`
* * `{{location}}/{{collection_id}}/{{engine_id}}`
* When using the `pulumi import` command, SearchEngine can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:discoveryengine/searchEngine:SearchEngine default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}
* ```
* ```sh
* $ pulumi import gcp:discoveryengine/searchEngine:SearchEngine default {{project}}/{{location}}/{{collection_id}}/{{engine_id}}
* ```
* ```sh
* $ pulumi import gcp:discoveryengine/searchEngine:SearchEngine default {{location}}/{{collection_id}}/{{engine_id}}
* ```
* @property collectionId The collection ID.
* @property commonConfig Common config spec that specifies the metadata of the engine.
* @property dataStoreIds The data stores associated with this engine. For SOLUTION_TYPE_SEARCH type of engines, they can only associate with at most one data store.
* @property displayName Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.
* @property engineId Unique ID to use for Search Engine App.
* @property industryVertical The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore:
* If unspecified, default to GENERIC. Vertical on Engine has to match vertical of the DataStore liniked to the engine.
* Default value: "GENERIC" Possible values: ["GENERIC", "MEDIA"]
* @property location Location.
* @property project
* @property searchEngineConfig Configurations for a Search Engine.
* Structure is documented below.
*/
public data class SearchEngineArgs(
public val collectionId: Output? = null,
public val commonConfig: Output? = null,
public val dataStoreIds: Output>? = null,
public val displayName: Output? = null,
public val engineId: Output? = null,
public val industryVertical: Output? = null,
public val location: Output? = null,
public val project: Output? = null,
public val searchEngineConfig: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.discoveryengine.SearchEngineArgs =
com.pulumi.gcp.discoveryengine.SearchEngineArgs.builder()
.collectionId(collectionId?.applyValue({ args0 -> args0 }))
.commonConfig(commonConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.dataStoreIds(dataStoreIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.engineId(engineId?.applyValue({ args0 -> args0 }))
.industryVertical(industryVertical?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.searchEngineConfig(
searchEngineConfig?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [SearchEngineArgs].
*/
@PulumiTagMarker
public class SearchEngineArgsBuilder internal constructor() {
private var collectionId: Output? = null
private var commonConfig: Output? = null
private var dataStoreIds: Output>? = null
private var displayName: Output? = null
private var engineId: Output? = null
private var industryVertical: Output? = null
private var location: Output? = null
private var project: Output? = null
private var searchEngineConfig: Output? = null
/**
* @param value The collection ID.
*/
@JvmName("igaoxnxcbgumjooc")
public suspend fun collectionId(`value`: Output) {
this.collectionId = value
}
/**
* @param value Common config spec that specifies the metadata of the engine.
*/
@JvmName("ikjoncuhrfpmjqnu")
public suspend fun commonConfig(`value`: Output) {
this.commonConfig = value
}
/**
* @param value The data stores associated with this engine. For SOLUTION_TYPE_SEARCH type of engines, they can only associate with at most one data store.
*/
@JvmName("rdxmgkpthsorsmpv")
public suspend fun dataStoreIds(`value`: Output>) {
this.dataStoreIds = value
}
@JvmName("qqktsxtwupxwqlxt")
public suspend fun dataStoreIds(vararg values: Output) {
this.dataStoreIds = Output.all(values.asList())
}
/**
* @param values The data stores associated with this engine. For SOLUTION_TYPE_SEARCH type of engines, they can only associate with at most one data store.
*/
@JvmName("utlddnlowpavyiit")
public suspend fun dataStoreIds(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy