com.pulumi.gcp.discoveryengine.kotlin.DataStore.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.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [DataStore].
*/
@PulumiTagMarker
public class DataStoreResourceBuilder internal constructor() {
public var name: String? = null
public var args: DataStoreArgs = DataStoreArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend DataStoreArgsBuilder.() -> Unit) {
val builder = DataStoreArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): DataStore {
val builtJavaResource = com.pulumi.gcp.discoveryengine.DataStore(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DataStore(builtJavaResource)
}
}
/**
* 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,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* basic = gcp.discoveryengine.DataStore("basic",
* location="global",
* data_store_id="data-store-id",
* display_name="tf-test-structured-datastore",
* industry_vertical="GENERIC",
* content_config="NO_CONTENT",
* solution_types=["SOLUTION_TYPE_SEARCH"],
* create_advanced_site_search=False)
* ```
* ```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 = "data-store-id",
* DisplayName = "tf-test-structured-datastore",
* IndustryVertical = "GENERIC",
* ContentConfig = "NO_CONTENT",
* SolutionTypes = new[]
* {
* "SOLUTION_TYPE_SEARCH",
* },
* CreateAdvancedSiteSearch = false,
* });
* });
* ```
* ```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 {
* _, err := discoveryengine.NewDataStore(ctx, "basic", &discoveryengine.DataStoreArgs{
* Location: pulumi.String("global"),
* DataStoreId: pulumi.String("data-store-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
* }
* 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 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("data-store-id")
* .displayName("tf-test-structured-datastore")
* .industryVertical("GENERIC")
* .contentConfig("NO_CONTENT")
* .solutionTypes("SOLUTION_TYPE_SEARCH")
* .createAdvancedSiteSearch(false)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* basic:
* type: gcp:discoveryengine:DataStore
* properties:
* location: global
* dataStoreId: data-store-id
* displayName: tf-test-structured-datastore
* industryVertical: GENERIC
* contentConfig: NO_CONTENT
* solutionTypes:
* - SOLUTION_TYPE_SEARCH
* createAdvancedSiteSearch: false
* ```
*
* ## 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}}
* ```
*/
public class DataStore internal constructor(
override val javaResource: com.pulumi.gcp.discoveryengine.DataStore,
) : KotlinCustomResource(javaResource, DataStoreMapper) {
/**
* The content config of the data store.
* Possible values are: `NO_CONTENT`, `CONTENT_REQUIRED`, `PUBLIC_WEBSITE`.
*/
public val contentConfig: Output
get() = javaResource.contentConfig().applyValue({ args0 -> args0 })
/**
* If true, an advanced data store for site search will be created. If the
* data store is not configured as site search (GENERIC vertical and
* PUBLIC_WEBSITE contentConfig), this flag will be ignored.
*/
public val createAdvancedSiteSearch: Output?
get() = javaResource.createAdvancedSiteSearch().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Timestamp when the DataStore was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* The unique id of the data store.
* - - -
*/
public val dataStoreId: Output
get() = javaResource.dataStoreId().applyValue({ args0 -> args0 })
/**
* The id of the default Schema associated with this data store.
*/
public val defaultSchemaId: Output
get() = javaResource.defaultSchemaId().applyValue({ args0 -> args0 })
/**
* The display name of the data store. This field must be a UTF-8 encoded
* string with a length limit of 128 characters.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* The industry vertical that the data store registers.
* Possible values are: `GENERIC`, `MEDIA`.
*/
public val industryVertical: Output
get() = javaResource.industryVertical().applyValue({ args0 -> args0 })
/**
* The geographic location where the data store should reside. The value can
* only be one of "global", "us" and "eu".
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The unique full resource name of the data store. Values are of the format
* `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
* This field must be a UTF-8 encoded string with a length limit of 1024
* characters.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The solutions that the data store enrolls.
* Each value may be one of: `SOLUTION_TYPE_RECOMMENDATION`, `SOLUTION_TYPE_SEARCH`, `SOLUTION_TYPE_CHAT`.
*/
public val solutionTypes: Output>?
get() = javaResource.solutionTypes().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
}
public object DataStoreMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.discoveryengine.DataStore::class == javaResource::class
override fun map(javaResource: Resource): DataStore = DataStore(
javaResource as
com.pulumi.gcp.discoveryengine.DataStore,
)
}
/**
* @see [DataStore].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DataStore].
*/
public suspend fun dataStore(name: String, block: suspend DataStoreResourceBuilder.() -> Unit): DataStore {
val builder = DataStoreResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DataStore].
* @param name The _unique_ name of the resulting resource.
*/
public fun dataStore(name: String): DataStore {
val builder = DataStoreResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy