UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

318 lines (317 loc) • 11.7 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Vertex chat and Conversation Engine Chat type * * To get more information about ChatEngine, see: * * * [API documentation](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines) * * How-to Guides * * [Vertex AI Conversation](https://cloud.google.com/dialogflow/cx/docs/concept/generative) * * ## Example Usage * * ### Discoveryengine Chat Engine Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testDataStore = new gcp.discoveryengine.DataStore("test_data_store", { * location: "global", * dataStoreId: "data-store", * displayName: "Structured datastore", * industryVertical: "GENERIC", * contentConfig: "NO_CONTENT", * solutionTypes: ["SOLUTION_TYPE_CHAT"], * }); * const testDataStore2 = new gcp.discoveryengine.DataStore("test_data_store_2", { * location: testDataStore.location, * dataStoreId: "data-store-2", * displayName: "Structured datastore 2", * industryVertical: "GENERIC", * contentConfig: "NO_CONTENT", * solutionTypes: ["SOLUTION_TYPE_CHAT"], * }); * const primary = new gcp.discoveryengine.ChatEngine("primary", { * engineId: "chat-engine-id", * collectionId: "default_collection", * location: testDataStore.location, * displayName: "Chat engine", * industryVertical: "GENERIC", * dataStoreIds: [ * testDataStore.dataStoreId, * testDataStore2.dataStoreId, * ], * commonConfig: { * companyName: "test-company", * }, * chatEngineConfig: { * agentCreationConfig: { * business: "test business name", * defaultLanguageCode: "en", * timeZone: "America/Los_Angeles", * }, * }, * }); * ``` * ### Discoveryengine Chat Engine Existing Dialogflow Agent * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const testDataStore = new gcp.discoveryengine.DataStore("test_data_store", { * location: "eu", * dataStoreId: "data-store", * displayName: "Structured datastore", * industryVertical: "GENERIC", * contentConfig: "NO_CONTENT", * solutionTypes: ["SOLUTION_TYPE_CHAT"], * }); * const agent = new gcp.diagflow.CxAgent("agent", { * displayName: "dialogflowcx-agent", * location: "europe-west3", * defaultLanguageCode: "en", * timeZone: "America/Los_Angeles", * }); * const primary = new gcp.discoveryengine.ChatEngine("primary", { * engineId: "chat-engine-id", * collectionId: "default_collection", * location: testDataStore.location, * displayName: "Chat engine", * industryVertical: "GENERIC", * dataStoreIds: [testDataStore.dataStoreId], * commonConfig: { * companyName: "test-company", * }, * chatEngineConfig: { * dialogflowAgentToLink: agent.id, * allowCrossRegion: true, * }, * }); * ``` * * ## Import * * ChatEngine 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, ChatEngine can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:discoveryengine/chatEngine:ChatEngine default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}} * ``` * * ```sh * $ pulumi import gcp:discoveryengine/chatEngine:ChatEngine default {{project}}/{{location}}/{{collection_id}}/{{engine_id}} * ``` * * ```sh * $ pulumi import gcp:discoveryengine/chatEngine:ChatEngine default {{location}}/{{collection_id}}/{{engine_id}} * ``` */ export declare class ChatEngine extends pulumi.CustomResource { /** * Get an existing ChatEngine 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: string, id: pulumi.Input<pulumi.ID>, state?: ChatEngineState, opts?: pulumi.CustomResourceOptions): ChatEngine; /** * Returns true if the given object is an instance of ChatEngine. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ChatEngine; /** * Configurations for a chat Engine. * Structure is documented below. */ readonly chatEngineConfig: pulumi.Output<outputs.discoveryengine.ChatEngineChatEngineConfig>; /** * Additional information of the Chat Engine. * Structure is documented below. */ readonly chatEngineMetadatas: pulumi.Output<outputs.discoveryengine.ChatEngineChatEngineMetadata[]>; /** * The collection ID. */ readonly collectionId: pulumi.Output<string>; /** * Common config spec that specifies the metadata of the engine. * Structure is documented below. */ readonly commonConfig: pulumi.Output<outputs.discoveryengine.ChatEngineCommonConfig | undefined>; /** * Timestamp the Engine was created at. */ readonly createTime: pulumi.Output<string>; /** * The data stores associated with this engine. Multiple DataStores in the same Collection can be associated here. All listed DataStores must be `SOLUTION_TYPE_CHAT`. */ readonly dataStoreIds: pulumi.Output<string[]>; /** * The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. */ readonly displayName: pulumi.Output<string>; /** * The ID to use for chat engine. */ readonly engineId: pulumi.Output<string>; /** * The industry vertical that the chat engine registers. Vertical on Engine has to match vertical of the DataStore linked to the engine. * Default value is `GENERIC`. * Possible values are: `GENERIC`. */ readonly industryVertical: pulumi.Output<string | undefined>; /** * Location. */ readonly location: pulumi.Output<string>; /** * The unique full resource name of the chat engine. Values are of the format * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ readonly name: pulumi.Output<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * Timestamp the Engine was last updated. */ readonly updateTime: pulumi.Output<string>; /** * Create a ChatEngine resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ChatEngineArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ChatEngine resources. */ export interface ChatEngineState { /** * Configurations for a chat Engine. * Structure is documented below. */ chatEngineConfig?: pulumi.Input<inputs.discoveryengine.ChatEngineChatEngineConfig>; /** * Additional information of the Chat Engine. * Structure is documented below. */ chatEngineMetadatas?: pulumi.Input<pulumi.Input<inputs.discoveryengine.ChatEngineChatEngineMetadata>[]>; /** * The collection ID. */ collectionId?: pulumi.Input<string>; /** * Common config spec that specifies the metadata of the engine. * Structure is documented below. */ commonConfig?: pulumi.Input<inputs.discoveryengine.ChatEngineCommonConfig>; /** * Timestamp the Engine was created at. */ createTime?: pulumi.Input<string>; /** * The data stores associated with this engine. Multiple DataStores in the same Collection can be associated here. All listed DataStores must be `SOLUTION_TYPE_CHAT`. */ dataStoreIds?: pulumi.Input<pulumi.Input<string>[]>; /** * The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. */ displayName?: pulumi.Input<string>; /** * The ID to use for chat engine. */ engineId?: pulumi.Input<string>; /** * The industry vertical that the chat engine registers. Vertical on Engine has to match vertical of the DataStore linked to the engine. * Default value is `GENERIC`. * Possible values are: `GENERIC`. */ industryVertical?: pulumi.Input<string>; /** * Location. */ location?: pulumi.Input<string>; /** * The unique full resource name of the chat engine. Values are of the format * `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. * This field must be a UTF-8 encoded string with a length limit of 1024 * characters. */ name?: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * Timestamp the Engine was last updated. */ updateTime?: pulumi.Input<string>; } /** * The set of arguments for constructing a ChatEngine resource. */ export interface ChatEngineArgs { /** * Configurations for a chat Engine. * Structure is documented below. */ chatEngineConfig: pulumi.Input<inputs.discoveryengine.ChatEngineChatEngineConfig>; /** * The collection ID. */ collectionId: pulumi.Input<string>; /** * Common config spec that specifies the metadata of the engine. * Structure is documented below. */ commonConfig?: pulumi.Input<inputs.discoveryengine.ChatEngineCommonConfig>; /** * The data stores associated with this engine. Multiple DataStores in the same Collection can be associated here. All listed DataStores must be `SOLUTION_TYPE_CHAT`. */ dataStoreIds: pulumi.Input<pulumi.Input<string>[]>; /** * The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. */ displayName: pulumi.Input<string>; /** * The ID to use for chat engine. */ engineId: pulumi.Input<string>; /** * The industry vertical that the chat engine registers. Vertical on Engine has to match vertical of the DataStore linked to the engine. * Default value is `GENERIC`. * Possible values are: `GENERIC`. */ industryVertical?: pulumi.Input<string>; /** * Location. */ location: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; }