gcp.discoveryengine.Assistant
Assistant
To get more information about Assistant, see:
Example Usage
Discoveryengine Assistant Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const basic = new gcp.discoveryengine.DataStore("basic", {
location: "global",
dataStoreId: "example-data-store-id",
displayName: "tf-test-structured-datastore",
industryVertical: "GENERIC",
contentConfig: "NO_CONTENT",
solutionTypes: ["SOLUTION_TYPE_SEARCH"],
createAdvancedSiteSearch: false,
});
const basicSearchEngine = new gcp.discoveryengine.SearchEngine("basic", {
location: "global",
collectionId: "default_collection",
engineId: "example-engine-id",
displayName: "Example Display Name",
dataStoreIds: [basic.dataStoreId],
searchEngineConfig: {},
});
const basicAssistant = new gcp.discoveryengine.Assistant("basic", {
location: "global",
collectionId: "default_collection",
engineId: basicSearchEngine.engineId,
assistantId: "example-assistant-id",
displayName: "updated-tf-test-Assistant",
description: "Assistant Description",
generationConfig: {
systemInstruction: {
additionalSystemInstruction: "foobar",
},
defaultLanguage: "en",
},
customerPolicy: {
bannedPhrases: [{
phrase: "foo",
matchType: "SIMPLE_STRING_MATCH",
ignoreDiacritics: false,
}],
},
webGroundingType: "WEB_GROUNDING_TYPE_GOOGLE_SEARCH",
});
import pulumi
import pulumi_gcp as gcp
basic = gcp.discoveryengine.DataStore("basic",
location="global",
data_store_id="example-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)
basic_search_engine = gcp.discoveryengine.SearchEngine("basic",
location="global",
collection_id="default_collection",
engine_id="example-engine-id",
display_name="Example Display Name",
data_store_ids=[basic.data_store_id],
search_engine_config={})
basic_assistant = gcp.discoveryengine.Assistant("basic",
location="global",
collection_id="default_collection",
engine_id=basic_search_engine.engine_id,
assistant_id="example-assistant-id",
display_name="updated-tf-test-Assistant",
description="Assistant Description",
generation_config={
"system_instruction": {
"additional_system_instruction": "foobar",
},
"default_language": "en",
},
customer_policy={
"banned_phrases": [{
"phrase": "foo",
"match_type": "SIMPLE_STRING_MATCH",
"ignore_diacritics": False,
}],
},
web_grounding_type="WEB_GROUNDING_TYPE_GOOGLE_SEARCH")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/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-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
}
basicSearchEngine, err := discoveryengine.NewSearchEngine(ctx, "basic", &discoveryengine.SearchEngineArgs{
Location: pulumi.String("global"),
CollectionId: pulumi.String("default_collection"),
EngineId: pulumi.String("example-engine-id"),
DisplayName: pulumi.String("Example Display Name"),
DataStoreIds: pulumi.StringArray{
basic.DataStoreId,
},
SearchEngineConfig: &discoveryengine.SearchEngineSearchEngineConfigArgs{},
})
if err != nil {
return err
}
_, err = discoveryengine.NewAssistant(ctx, "basic", &discoveryengine.AssistantArgs{
Location: pulumi.String("global"),
CollectionId: pulumi.String("default_collection"),
EngineId: basicSearchEngine.EngineId,
AssistantId: pulumi.String("example-assistant-id"),
DisplayName: pulumi.String("updated-tf-test-Assistant"),
Description: pulumi.String("Assistant Description"),
GenerationConfig: &discoveryengine.AssistantGenerationConfigArgs{
SystemInstruction: &discoveryengine.AssistantGenerationConfigSystemInstructionArgs{
AdditionalSystemInstruction: pulumi.String("foobar"),
},
DefaultLanguage: pulumi.String("en"),
},
CustomerPolicy: &discoveryengine.AssistantCustomerPolicyArgs{
BannedPhrases: discoveryengine.AssistantCustomerPolicyBannedPhraseArray{
&discoveryengine.AssistantCustomerPolicyBannedPhraseArgs{
Phrase: pulumi.String("foo"),
MatchType: pulumi.String("SIMPLE_STRING_MATCH"),
IgnoreDiacritics: pulumi.Bool(false),
},
},
},
WebGroundingType: pulumi.String("WEB_GROUNDING_TYPE_GOOGLE_SEARCH"),
})
if err != nil {
return err
}
return nil
})
}
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-data-store-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()
{
Location = "global",
CollectionId = "default_collection",
EngineId = "example-engine-id",
DisplayName = "Example Display Name",
DataStoreIds = new[]
{
basic.DataStoreId,
},
SearchEngineConfig = null,
});
var basicAssistant = new Gcp.DiscoveryEngine.Assistant("basic", new()
{
Location = "global",
CollectionId = "default_collection",
EngineId = basicSearchEngine.EngineId,
AssistantId = "example-assistant-id",
DisplayName = "updated-tf-test-Assistant",
Description = "Assistant Description",
GenerationConfig = new Gcp.DiscoveryEngine.Inputs.AssistantGenerationConfigArgs
{
SystemInstruction = new Gcp.DiscoveryEngine.Inputs.AssistantGenerationConfigSystemInstructionArgs
{
AdditionalSystemInstruction = "foobar",
},
DefaultLanguage = "en",
},
CustomerPolicy = new Gcp.DiscoveryEngine.Inputs.AssistantCustomerPolicyArgs
{
BannedPhrases = new[]
{
new Gcp.DiscoveryEngine.Inputs.AssistantCustomerPolicyBannedPhraseArgs
{
Phrase = "foo",
MatchType = "SIMPLE_STRING_MATCH",
IgnoreDiacritics = false,
},
},
},
WebGroundingType = "WEB_GROUNDING_TYPE_GOOGLE_SEARCH",
});
});
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 com.pulumi.gcp.discoveryengine.Assistant;
import com.pulumi.gcp.discoveryengine.AssistantArgs;
import com.pulumi.gcp.discoveryengine.inputs.AssistantGenerationConfigArgs;
import com.pulumi.gcp.discoveryengine.inputs.AssistantGenerationConfigSystemInstructionArgs;
import com.pulumi.gcp.discoveryengine.inputs.AssistantCustomerPolicyArgs;
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-data-store-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()
.location("global")
.collectionId("default_collection")
.engineId("example-engine-id")
.displayName("Example Display Name")
.dataStoreIds(basic.dataStoreId())
.searchEngineConfig(SearchEngineSearchEngineConfigArgs.builder()
.build())
.build());
var basicAssistant = new Assistant("basicAssistant", AssistantArgs.builder()
.location("global")
.collectionId("default_collection")
.engineId(basicSearchEngine.engineId())
.assistantId("example-assistant-id")
.displayName("updated-tf-test-Assistant")
.description("Assistant Description")
.generationConfig(AssistantGenerationConfigArgs.builder()
.systemInstruction(AssistantGenerationConfigSystemInstructionArgs.builder()
.additionalSystemInstruction("foobar")
.build())
.defaultLanguage("en")
.build())
.customerPolicy(AssistantCustomerPolicyArgs.builder()
.bannedPhrases(AssistantCustomerPolicyBannedPhraseArgs.builder()
.phrase("foo")
.matchType("SIMPLE_STRING_MATCH")
.ignoreDiacritics(false)
.build())
.build())
.webGroundingType("WEB_GROUNDING_TYPE_GOOGLE_SEARCH")
.build());
}
}
resources:
basic:
type: gcp:discoveryengine:DataStore
properties:
location: global
dataStoreId: example-data-store-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:
location: global
collectionId: default_collection
engineId: example-engine-id
displayName: Example Display Name
dataStoreIds:
- ${basic.dataStoreId}
searchEngineConfig: {}
basicAssistant:
type: gcp:discoveryengine:Assistant
name: basic
properties:
location: global
collectionId: default_collection
engineId: ${basicSearchEngine.engineId}
assistantId: example-assistant-id
displayName: updated-tf-test-Assistant
description: Assistant Description
generationConfig:
systemInstruction:
additionalSystemInstruction: foobar
defaultLanguage: en
customerPolicy:
bannedPhrases:
- phrase: foo
matchType: SIMPLE_STRING_MATCH
ignoreDiacritics: false
webGroundingType: WEB_GROUNDING_TYPE_GOOGLE_SEARCH
Create Assistant Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Assistant(name: string, args: AssistantArgs, opts?: CustomResourceOptions);@overload
def Assistant(resource_name: str,
args: AssistantArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Assistant(resource_name: str,
opts: Optional[ResourceOptions] = None,
assistant_id: Optional[str] = None,
collection_id: Optional[str] = None,
display_name: Optional[str] = None,
engine_id: Optional[str] = None,
location: Optional[str] = None,
customer_policy: Optional[AssistantCustomerPolicyArgs] = None,
description: Optional[str] = None,
generation_config: Optional[AssistantGenerationConfigArgs] = None,
project: Optional[str] = None,
web_grounding_type: Optional[str] = None)func NewAssistant(ctx *Context, name string, args AssistantArgs, opts ...ResourceOption) (*Assistant, error)public Assistant(string name, AssistantArgs args, CustomResourceOptions? opts = null)
public Assistant(String name, AssistantArgs args)
public Assistant(String name, AssistantArgs args, CustomResourceOptions options)
type: gcp:discoveryengine:Assistant
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AssistantArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AssistantArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AssistantArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AssistantArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AssistantArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var assistantResource = new Gcp.DiscoveryEngine.Assistant("assistantResource", new()
{
AssistantId = "string",
CollectionId = "string",
DisplayName = "string",
EngineId = "string",
Location = "string",
CustomerPolicy = new Gcp.DiscoveryEngine.Inputs.AssistantCustomerPolicyArgs
{
BannedPhrases = new[]
{
new Gcp.DiscoveryEngine.Inputs.AssistantCustomerPolicyBannedPhraseArgs
{
Phrase = "string",
IgnoreDiacritics = false,
MatchType = "string",
},
},
ModelArmorConfig = new Gcp.DiscoveryEngine.Inputs.AssistantCustomerPolicyModelArmorConfigArgs
{
ResponseTemplate = "string",
UserPromptTemplate = "string",
FailureMode = "string",
},
},
Description = "string",
GenerationConfig = new Gcp.DiscoveryEngine.Inputs.AssistantGenerationConfigArgs
{
DefaultLanguage = "string",
SystemInstruction = new Gcp.DiscoveryEngine.Inputs.AssistantGenerationConfigSystemInstructionArgs
{
AdditionalSystemInstruction = "string",
},
},
Project = "string",
WebGroundingType = "string",
});
example, err := discoveryengine.NewAssistant(ctx, "assistantResource", &discoveryengine.AssistantArgs{
AssistantId: pulumi.String("string"),
CollectionId: pulumi.String("string"),
DisplayName: pulumi.String("string"),
EngineId: pulumi.String("string"),
Location: pulumi.String("string"),
CustomerPolicy: &discoveryengine.AssistantCustomerPolicyArgs{
BannedPhrases: discoveryengine.AssistantCustomerPolicyBannedPhraseArray{
&discoveryengine.AssistantCustomerPolicyBannedPhraseArgs{
Phrase: pulumi.String("string"),
IgnoreDiacritics: pulumi.Bool(false),
MatchType: pulumi.String("string"),
},
},
ModelArmorConfig: &discoveryengine.AssistantCustomerPolicyModelArmorConfigArgs{
ResponseTemplate: pulumi.String("string"),
UserPromptTemplate: pulumi.String("string"),
FailureMode: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
GenerationConfig: &discoveryengine.AssistantGenerationConfigArgs{
DefaultLanguage: pulumi.String("string"),
SystemInstruction: &discoveryengine.AssistantGenerationConfigSystemInstructionArgs{
AdditionalSystemInstruction: pulumi.String("string"),
},
},
Project: pulumi.String("string"),
WebGroundingType: pulumi.String("string"),
})
var assistantResource = new Assistant("assistantResource", AssistantArgs.builder()
.assistantId("string")
.collectionId("string")
.displayName("string")
.engineId("string")
.location("string")
.customerPolicy(AssistantCustomerPolicyArgs.builder()
.bannedPhrases(AssistantCustomerPolicyBannedPhraseArgs.builder()
.phrase("string")
.ignoreDiacritics(false)
.matchType("string")
.build())
.modelArmorConfig(AssistantCustomerPolicyModelArmorConfigArgs.builder()
.responseTemplate("string")
.userPromptTemplate("string")
.failureMode("string")
.build())
.build())
.description("string")
.generationConfig(AssistantGenerationConfigArgs.builder()
.defaultLanguage("string")
.systemInstruction(AssistantGenerationConfigSystemInstructionArgs.builder()
.additionalSystemInstruction("string")
.build())
.build())
.project("string")
.webGroundingType("string")
.build());
assistant_resource = gcp.discoveryengine.Assistant("assistantResource",
assistant_id="string",
collection_id="string",
display_name="string",
engine_id="string",
location="string",
customer_policy={
"banned_phrases": [{
"phrase": "string",
"ignore_diacritics": False,
"match_type": "string",
}],
"model_armor_config": {
"response_template": "string",
"user_prompt_template": "string",
"failure_mode": "string",
},
},
description="string",
generation_config={
"default_language": "string",
"system_instruction": {
"additional_system_instruction": "string",
},
},
project="string",
web_grounding_type="string")
const assistantResource = new gcp.discoveryengine.Assistant("assistantResource", {
assistantId: "string",
collectionId: "string",
displayName: "string",
engineId: "string",
location: "string",
customerPolicy: {
bannedPhrases: [{
phrase: "string",
ignoreDiacritics: false,
matchType: "string",
}],
modelArmorConfig: {
responseTemplate: "string",
userPromptTemplate: "string",
failureMode: "string",
},
},
description: "string",
generationConfig: {
defaultLanguage: "string",
systemInstruction: {
additionalSystemInstruction: "string",
},
},
project: "string",
webGroundingType: "string",
});
type: gcp:discoveryengine:Assistant
properties:
assistantId: string
collectionId: string
customerPolicy:
bannedPhrases:
- ignoreDiacritics: false
matchType: string
phrase: string
modelArmorConfig:
failureMode: string
responseTemplate: string
userPromptTemplate: string
description: string
displayName: string
engineId: string
generationConfig:
defaultLanguage: string
systemInstruction:
additionalSystemInstruction: string
location: string
project: string
webGroundingType: string
Assistant Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Assistant resource accepts the following input properties:
- Assistant
Id string - The unique id of the assistant.
- Collection
Id string - The unique id of the collection.
- Display
Name string - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- Engine
Id string - The unique id of the engine.
- Location string
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- Customer
Policy AssistantCustomer Policy - Customer policy for the assistant. Structure is documented below.
- Description string
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- Generation
Config AssistantGeneration Config - Configuration for the generation of the assistant response. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Web
Grounding stringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- Assistant
Id string - The unique id of the assistant.
- Collection
Id string - The unique id of the collection.
- Display
Name string - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- Engine
Id string - The unique id of the engine.
- Location string
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- Customer
Policy AssistantCustomer Policy Args - Customer policy for the assistant. Structure is documented below.
- Description string
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- Generation
Config AssistantGeneration Config Args - Configuration for the generation of the assistant response. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Web
Grounding stringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant
Id String - The unique id of the assistant.
- collection
Id String - The unique id of the collection.
- display
Name String - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine
Id String - The unique id of the engine.
- location String
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- customer
Policy AssistantCustomer Policy - Customer policy for the assistant. Structure is documented below.
- description String
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- generation
Config AssistantGeneration Config - Configuration for the generation of the assistant response. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web
Grounding StringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant
Id string - The unique id of the assistant.
- collection
Id string - The unique id of the collection.
- display
Name string - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine
Id string - The unique id of the engine.
- location string
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- customer
Policy AssistantCustomer Policy - Customer policy for the assistant. Structure is documented below.
- description string
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- generation
Config AssistantGeneration Config - Configuration for the generation of the assistant response. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web
Grounding stringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant_
id str - The unique id of the assistant.
- collection_
id str - The unique id of the collection.
- display_
name str - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine_
id str - The unique id of the engine.
- location str
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- customer_
policy AssistantCustomer Policy Args - Customer policy for the assistant. Structure is documented below.
- description str
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- generation_
config AssistantGeneration Config Args - Configuration for the generation of the assistant response. Structure is documented below.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web_
grounding_ strtype - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant
Id String - The unique id of the assistant.
- collection
Id String - The unique id of the collection.
- display
Name String - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine
Id String - The unique id of the engine.
- location String
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- customer
Policy Property Map - Customer policy for the assistant. Structure is documented below.
- description String
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- generation
Config Property Map - Configuration for the generation of the assistant response. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web
Grounding StringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
Outputs
All input properties are implicitly available as output properties. Additionally, the Assistant resource produces the following output properties:
Look up Existing Assistant Resource
Get an existing Assistant resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AssistantState, opts?: CustomResourceOptions): Assistant@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
assistant_id: Optional[str] = None,
collection_id: Optional[str] = None,
customer_policy: Optional[AssistantCustomerPolicyArgs] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
engine_id: Optional[str] = None,
generation_config: Optional[AssistantGenerationConfigArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
web_grounding_type: Optional[str] = None) -> Assistantfunc GetAssistant(ctx *Context, name string, id IDInput, state *AssistantState, opts ...ResourceOption) (*Assistant, error)public static Assistant Get(string name, Input<string> id, AssistantState? state, CustomResourceOptions? opts = null)public static Assistant get(String name, Output<String> id, AssistantState state, CustomResourceOptions options)resources: _: type: gcp:discoveryengine:Assistant get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Assistant
Id string - The unique id of the assistant.
- Collection
Id string - The unique id of the collection.
- Customer
Policy AssistantCustomer Policy - Customer policy for the assistant. Structure is documented below.
- Description string
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- Display
Name string - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- Engine
Id string - The unique id of the engine.
- Generation
Config AssistantGeneration Config - Configuration for the generation of the assistant response. Structure is documented below.
- Location string
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- Name string
- Resource name of the assistant.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}It must be a UTF-8 encoded string with a length limit of 1024 characters. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Web
Grounding stringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- Assistant
Id string - The unique id of the assistant.
- Collection
Id string - The unique id of the collection.
- Customer
Policy AssistantCustomer Policy Args - Customer policy for the assistant. Structure is documented below.
- Description string
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- Display
Name string - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- Engine
Id string - The unique id of the engine.
- Generation
Config AssistantGeneration Config Args - Configuration for the generation of the assistant response. Structure is documented below.
- Location string
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- Name string
- Resource name of the assistant.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}It must be a UTF-8 encoded string with a length limit of 1024 characters. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Web
Grounding stringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant
Id String - The unique id of the assistant.
- collection
Id String - The unique id of the collection.
- customer
Policy AssistantCustomer Policy - Customer policy for the assistant. Structure is documented below.
- description String
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- display
Name String - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine
Id String - The unique id of the engine.
- generation
Config AssistantGeneration Config - Configuration for the generation of the assistant response. Structure is documented below.
- location String
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- name String
- Resource name of the assistant.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}It must be a UTF-8 encoded string with a length limit of 1024 characters. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web
Grounding StringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant
Id string - The unique id of the assistant.
- collection
Id string - The unique id of the collection.
- customer
Policy AssistantCustomer Policy - Customer policy for the assistant. Structure is documented below.
- description string
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- display
Name string - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine
Id string - The unique id of the engine.
- generation
Config AssistantGeneration Config - Configuration for the generation of the assistant response. Structure is documented below.
- location string
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- name string
- Resource name of the assistant.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}It must be a UTF-8 encoded string with a length limit of 1024 characters. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web
Grounding stringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant_
id str - The unique id of the assistant.
- collection_
id str - The unique id of the collection.
- customer_
policy AssistantCustomer Policy Args - Customer policy for the assistant. Structure is documented below.
- description str
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- display_
name str - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine_
id str - The unique id of the engine.
- generation_
config AssistantGeneration Config Args - Configuration for the generation of the assistant response. Structure is documented below.
- location str
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- name str
- Resource name of the assistant.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}It must be a UTF-8 encoded string with a length limit of 1024 characters. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web_
grounding_ strtype - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
- assistant
Id String - The unique id of the assistant.
- collection
Id String - The unique id of the collection.
- customer
Policy Property Map - Customer policy for the assistant. Structure is documented below.
- description String
- Description for additional information. Expected to be shown on the configuration UI, not to the users of the assistant.
- display
Name String - The assistant display name. It must be a UTF-8 encoded string with a length limit of 128 characters.
- engine
Id String - The unique id of the engine.
- generation
Config Property Map - Configuration for the generation of the assistant response. Structure is documented below.
- location String
- The geographic location where the data store should reside. The value can only be one of "global", "us" and "eu".
- name String
- Resource name of the assistant.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}It must be a UTF-8 encoded string with a length limit of 1024 characters. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- web
Grounding StringType - The type of web grounding to use. The supported values: 'WEB_GROUNDING_TYPE_DISABLED', 'WEB_GROUNDING_TYPE_GOOGLE_SEARCH', 'WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH'.
Supporting Types
AssistantCustomerPolicy, AssistantCustomerPolicyArgs
- Banned
Phrases List<AssistantCustomer Policy Banned Phrase> - List of banned phrases. Structure is documented below.
- Model
Armor AssistantConfig Customer Policy Model Armor Config - Model Armor configuration to be used for sanitizing user prompts and assistant responses. Structure is documented below.
- Banned
Phrases []AssistantCustomer Policy Banned Phrase - List of banned phrases. Structure is documented below.
- Model
Armor AssistantConfig Customer Policy Model Armor Config - Model Armor configuration to be used for sanitizing user prompts and assistant responses. Structure is documented below.
- banned
Phrases List<AssistantCustomer Policy Banned Phrase> - List of banned phrases. Structure is documented below.
- model
Armor AssistantConfig Customer Policy Model Armor Config - Model Armor configuration to be used for sanitizing user prompts and assistant responses. Structure is documented below.
- banned
Phrases AssistantCustomer Policy Banned Phrase[] - List of banned phrases. Structure is documented below.
- model
Armor AssistantConfig Customer Policy Model Armor Config - Model Armor configuration to be used for sanitizing user prompts and assistant responses. Structure is documented below.
- banned_
phrases Sequence[AssistantCustomer Policy Banned Phrase] - List of banned phrases. Structure is documented below.
- model_
armor_ Assistantconfig Customer Policy Model Armor Config - Model Armor configuration to be used for sanitizing user prompts and assistant responses. Structure is documented below.
- banned
Phrases List<Property Map> - List of banned phrases. Structure is documented below.
- model
Armor Property MapConfig - Model Armor configuration to be used for sanitizing user prompts and assistant responses. Structure is documented below.
AssistantCustomerPolicyBannedPhrase, AssistantCustomerPolicyBannedPhraseArgs
- Phrase string
- The raw string content to be banned.
- Ignore
Diacritics bool - If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
- Match
Type string - Match type for the banned phrase. The supported values: 'SIMPLE_STRING_MATCH', 'WORD_BOUNDARY_STRING_MATCH'.
- Phrase string
- The raw string content to be banned.
- Ignore
Diacritics bool - If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
- Match
Type string - Match type for the banned phrase. The supported values: 'SIMPLE_STRING_MATCH', 'WORD_BOUNDARY_STRING_MATCH'.
- phrase String
- The raw string content to be banned.
- ignore
Diacritics Boolean - If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
- match
Type String - Match type for the banned phrase. The supported values: 'SIMPLE_STRING_MATCH', 'WORD_BOUNDARY_STRING_MATCH'.
- phrase string
- The raw string content to be banned.
- ignore
Diacritics boolean - If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
- match
Type string - Match type for the banned phrase. The supported values: 'SIMPLE_STRING_MATCH', 'WORD_BOUNDARY_STRING_MATCH'.
- phrase str
- The raw string content to be banned.
- ignore_
diacritics bool - If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
- match_
type str - Match type for the banned phrase. The supported values: 'SIMPLE_STRING_MATCH', 'WORD_BOUNDARY_STRING_MATCH'.
- phrase String
- The raw string content to be banned.
- ignore
Diacritics Boolean - If true, diacritical marks (e.g., accents, umlauts) are ignored when matching banned phrases. For example, "cafe" would match "café".
- match
Type String - Match type for the banned phrase. The supported values: 'SIMPLE_STRING_MATCH', 'WORD_BOUNDARY_STRING_MATCH'.
AssistantCustomerPolicyModelArmorConfig, AssistantCustomerPolicyModelArmorConfigArgs
- Response
Template string - The resource name of the Model Armor template for sanitizing assistant
responses. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the assistant response. - User
Prompt stringTemplate - The resource name of the Model Armor template for sanitizing user
prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the user prompt. - Failure
Mode string - Defines the failure mode for Model Armor sanitization. The supported values: 'FAIL_OPEN', 'FAIL_CLOSED'.
- Response
Template string - The resource name of the Model Armor template for sanitizing assistant
responses. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the assistant response. - User
Prompt stringTemplate - The resource name of the Model Armor template for sanitizing user
prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the user prompt. - Failure
Mode string - Defines the failure mode for Model Armor sanitization. The supported values: 'FAIL_OPEN', 'FAIL_CLOSED'.
- response
Template String - The resource name of the Model Armor template for sanitizing assistant
responses. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the assistant response. - user
Prompt StringTemplate - The resource name of the Model Armor template for sanitizing user
prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the user prompt. - failure
Mode String - Defines the failure mode for Model Armor sanitization. The supported values: 'FAIL_OPEN', 'FAIL_CLOSED'.
- response
Template string - The resource name of the Model Armor template for sanitizing assistant
responses. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the assistant response. - user
Prompt stringTemplate - The resource name of the Model Armor template for sanitizing user
prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the user prompt. - failure
Mode string - Defines the failure mode for Model Armor sanitization. The supported values: 'FAIL_OPEN', 'FAIL_CLOSED'.
- response_
template str - The resource name of the Model Armor template for sanitizing assistant
responses. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the assistant response. - user_
prompt_ strtemplate - The resource name of the Model Armor template for sanitizing user
prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the user prompt. - failure_
mode str - Defines the failure mode for Model Armor sanitization. The supported values: 'FAIL_OPEN', 'FAIL_CLOSED'.
- response
Template String - The resource name of the Model Armor template for sanitizing assistant
responses. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the assistant response. - user
Prompt StringTemplate - The resource name of the Model Armor template for sanitizing user
prompts. Format:
projects/{project}/locations/{location}/templates/{template_id}If not specified, no sanitization will be applied to the user prompt. - failure
Mode String - Defines the failure mode for Model Armor sanitization. The supported values: 'FAIL_OPEN', 'FAIL_CLOSED'.
AssistantGenerationConfig, AssistantGenerationConfigArgs
- Default
Language string - The default language to use for the generation of the assistant response.
Use an ISO 639-1 language code such as
en. If not specified, the language will be automatically detected. - System
Instruction AssistantGeneration Config System Instruction - System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions Structure is documented below.
- Default
Language string - The default language to use for the generation of the assistant response.
Use an ISO 639-1 language code such as
en. If not specified, the language will be automatically detected. - System
Instruction AssistantGeneration Config System Instruction - System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions Structure is documented below.
- default
Language String - The default language to use for the generation of the assistant response.
Use an ISO 639-1 language code such as
en. If not specified, the language will be automatically detected. - system
Instruction AssistantGeneration Config System Instruction - System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions Structure is documented below.
- default
Language string - The default language to use for the generation of the assistant response.
Use an ISO 639-1 language code such as
en. If not specified, the language will be automatically detected. - system
Instruction AssistantGeneration Config System Instruction - System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions Structure is documented below.
- default_
language str - The default language to use for the generation of the assistant response.
Use an ISO 639-1 language code such as
en. If not specified, the language will be automatically detected. - system_
instruction AssistantGeneration Config System Instruction - System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions Structure is documented below.
- default
Language String - The default language to use for the generation of the assistant response.
Use an ISO 639-1 language code such as
en. If not specified, the language will be automatically detected. - system
Instruction Property Map - System instruction, also known as the prompt preamble for LLM calls. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions Structure is documented below.
AssistantGenerationConfigSystemInstruction, AssistantGenerationConfigSystemInstructionArgs
- Additional
System stringInstruction - Additional system instruction that will be added to the default system instruction.
- Additional
System stringInstruction - Additional system instruction that will be added to the default system instruction.
- additional
System StringInstruction - Additional system instruction that will be added to the default system instruction.
- additional
System stringInstruction - Additional system instruction that will be added to the default system instruction.
- additional_
system_ strinstruction - Additional system instruction that will be added to the default system instruction.
- additional
System StringInstruction - Additional system instruction that will be added to the default system instruction.
Import
Assistant can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/assistants/{{assistant_id}}{{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}{{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}
When using the pulumi import command, Assistant can be imported using one of the formats above. For example:
$ pulumi import gcp:discoveryengine/assistant:Assistant default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}/assistants/{{assistant_id}}
$ pulumi import gcp:discoveryengine/assistant:Assistant default {{project}}/{{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}
$ pulumi import gcp:discoveryengine/assistant:Assistant default {{location}}/{{collection_id}}/{{engine_id}}/{{assistant_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
