GCP.DiscoveryEngine reference
CollectionsDataStore
Section titled “CollectionsDataStore”Source:
src/GCP/DiscoveryEngine/CollectionsDataStore.ts
A Discovery Engine data store under a collection.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Location, collection, data store id, industry vertical, content config, and
ACL are immutable. Display name and serving-disabled flag update in place.
CollectionsDataStore: Creating a Data Store
Section titled “CollectionsDataStore: Creating a Data Store”Generated id, generic search store
const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", { displayName: "product docs",});Site-search store
const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Web", { contentConfig: "PUBLIC_WEBSITE", displayName: "public site",});CollectionsDataStore: Updating a Data Store
Section titled “CollectionsDataStore: Updating a Data Store”// Same logical id as before; only the changed props differ.const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", { displayName: "product docs v2",});CollectionsDataStoresBranchesDocument
Section titled “CollectionsDataStoresBranchesDocument”Source:
src/GCP/DiscoveryEngine/CollectionsDataStoresBranchesDocument.ts
A Discovery Engine document under a collection data store branch.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent data store, branch, and document id are immutable. Payload fields
update in place.
CollectionsDataStoresBranchesDocument: Creating a Document
Section titled “CollectionsDataStoresBranchesDocument: Creating a Document”const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", {});const doc = yield* GCP.DiscoveryEngine.CollectionsDataStoresBranchesDocument( "Intro", { dataStore: store.name, jsonData: JSON.stringify({ title: "Getting started" }), },);CollectionsDataStoresControl
Section titled “CollectionsDataStoresControl”Source:
src/GCP/DiscoveryEngine/CollectionsDataStoresControl.ts
A Discovery Engine serving control on a collection data store.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent, control id, and solution type are immutable. Display name,
synonyms, redirect, filter, and conditions update in place.
CollectionsDataStoresControl: Creating a Control
Section titled “CollectionsDataStoresControl: Creating a Control”const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", {});const control = yield* GCP.DiscoveryEngine.CollectionsDataStoresControl( "Greetings", { dataStore: store.name, displayName: "greetings", synonyms: ["hello", "hi"], },);CollectionsDataStoresConversation
Section titled “CollectionsDataStoresConversation”Source:
src/GCP/DiscoveryEngine/CollectionsDataStoresConversation.ts
A Discovery Engine conversation on a collection data store.
Its id is assigned by the API, so only a recorded resource can be read back. The parent data store is immutable. State and messages update in place. The conversation id is assigned by the API.
CollectionsDataStoresConversation: Creating a Conversation
Section titled “CollectionsDataStoresConversation: Creating a Conversation”const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", {});const chat = yield* GCP.DiscoveryEngine.CollectionsDataStoresConversation( "Visitor", { dataStore: store.name, userPseudoId: "user-1", },);CollectionsDataStoresSchema
Section titled “CollectionsDataStoresSchema”Source:
src/GCP/DiscoveryEngine/CollectionsDataStoresSchema.ts
A Discovery Engine schema on a collection data store.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent and schema id are immutable. Schema contents update in place.
CollectionsDataStoresSchema: Creating a Schema
Section titled “CollectionsDataStoresSchema: Creating a Schema”const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", { skipDefaultSchemaCreation: true,});const schema = yield* GCP.DiscoveryEngine.CollectionsDataStoresSchema( "Fields", { dataStore: store.name, jsonSchema: JSON.stringify({ type: "object", properties: { title: { type: "string" } }, }), },);CollectionsDataStoresServingConfig
Section titled “CollectionsDataStoresServingConfig”Source:
src/GCP/DiscoveryEngine/CollectionsDataStoresServingConfig.ts
A Discovery Engine serving config on a collection data store.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent, serving config id, and solution type are immutable. Display name
and control-id lists update in place.
CollectionsDataStoresServingConfig: Creating a Serving Config
Section titled “CollectionsDataStoresServingConfig: Creating a Serving Config”const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", {});const serving = yield* GCP.DiscoveryEngine.CollectionsDataStoresServingConfig( "Preview", { dataStore: store.name, displayName: "preview search", },);CollectionsDataStoresSession
Section titled “CollectionsDataStoresSession”Source:
src/GCP/DiscoveryEngine/CollectionsDataStoresSession.ts
A Discovery Engine session on a collection data store.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent and session id are immutable.
CollectionsDataStoresSession: Creating a Session
Section titled “CollectionsDataStoresSession: Creating a Session”const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Docs", {});const session = yield* GCP.DiscoveryEngine.CollectionsDataStoresSession( "Chat", { dataStore: store.name, displayName: "support chat", isPinned: true, },);CollectionsDataStoresSiteSearchEngineTargetSite
Section titled “CollectionsDataStoresSiteSearchEngineTargetSite”Source:
src/GCP/DiscoveryEngine/CollectionsDataStoresSiteSearchEngineTargetSite.ts
A Discovery Engine target site on a collection data store site-search engine.
Its id is assigned by the API, so only a recorded resource can be read
back. Parent data store and exactMatch are immutable. Type updates in
place. The target site id is assigned by the API.
CollectionsDataStoresSiteSearchEngineTargetSite: Creating a Target Site
Section titled “CollectionsDataStoresSiteSearchEngineTargetSite: Creating a Target Site”const store = yield* GCP.DiscoveryEngine.CollectionsDataStore("Web", { contentConfig: "PUBLIC_WEBSITE",});const site = yield* GCP.DiscoveryEngine.CollectionsDataStoresSiteSearchEngineTargetSite( "Docs", { dataStore: store.name, providedUriPattern: "https://example.com/docs/", },);CollectionsEngine
Section titled “CollectionsEngine”Source:
src/GCP/DiscoveryEngine/CollectionsEngine.ts
A Discovery Engine Engine under a collection — serves Search, Recommendation, or Chat from one or more DataStores.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent is
projects/{project}/locations/{location}/collections/{collection}. Id,
location, collection, solution type, and vertical are immutable; display
name, analytics flag, and common config update in place.
CollectionsEngine: Creating an Engine
Section titled “CollectionsEngine: Creating an Engine”const store = yield* GCP.DiscoveryEngine.DataStore("Docs", {});const engine = yield* GCP.DiscoveryEngine.CollectionsEngine("Search", { dataStoreIds: [store.dataStoreId], displayName: "docs search",});CollectionsEngine: Updating an Engine
Section titled “CollectionsEngine: Updating an Engine”// Same logical id as before; only the changed props differ.const engine = yield* GCP.DiscoveryEngine.CollectionsEngine("Search", { dataStoreIds: [store.dataStoreId], displayName: "docs search prod",});CollectionsEnginesAssistant
Section titled “CollectionsEnginesAssistant”Source:
src/GCP/DiscoveryEngine/CollectionsEnginesAssistant.ts
A Discovery Engine Assistant attached to a collection Engine.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent engine and assistant id are immutable; display name, description,
grounding, and generation config update in place.
CollectionsEnginesAssistant: Creating an Assistant
Section titled “CollectionsEnginesAssistant: Creating an Assistant”const engine = yield* GCP.DiscoveryEngine.CollectionsEngine("Search", { dataStoreIds: [store.dataStoreId],});const assistant = yield* GCP.DiscoveryEngine.CollectionsEnginesAssistant( "Help", { engine: engine.name, displayName: "docs helper", },);CollectionsEnginesAssistant: Updating an Assistant
Section titled “CollectionsEnginesAssistant: Updating an Assistant”// Same logical id as before; only the changed props differ.const assistant = yield* GCP.DiscoveryEngine.CollectionsEnginesAssistant( "Help", { engine: engine.name, displayName: "docs helper prod", },);CollectionsEnginesAssistantsAgentsA2aV1TasksPushNotificationConfig
Section titled “CollectionsEnginesAssistantsAgentsA2aV1TasksPushNotificationConfig”Source:
src/GCP/DiscoveryEngine/CollectionsEnginesAssistantsAgentsA2aV1TasksPushNotificationConfig.ts
An A2A task push-notification config on a Discovery Engine Assistant agent.
Experimental A2A API. There is no patch RPC, so URL / token / auth
changes replace the config. The config id is deterministic: read
reports a config it finds without prior state as unowned (adopt it
with --adopt).
CollectionsEnginesAssistantsAgentsA2aV1TasksPushNotificationConfig: Creating a Push Notification Config
Section titled “CollectionsEnginesAssistantsAgentsA2aV1TasksPushNotificationConfig: Creating a Push Notification Config”const config = yield* GCP.DiscoveryEngine.CollectionsEnginesAssistantsAgentsA2aV1TasksPushNotificationConfig( "Notify", { tenant: assistant.name, parent: "tasks/support-1", url: "https://example.com/hooks/a2a", }, );CollectionsEnginesControl
Section titled “CollectionsEnginesControl”Source:
src/GCP/DiscoveryEngine/CollectionsEnginesControl.ts
A Discovery Engine Control on a collection Engine — redirects, filters, synonyms, boosts, or promotions applied at serving time.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent engine, control id, and solution type are immutable, and so is the
action (changing it replaces the control); display name, use cases, and
conditions update in place.
CollectionsEnginesControl: Creating a Control
Section titled “CollectionsEnginesControl: Creating a Control”const control = yield* GCP.DiscoveryEngine.CollectionsEnginesControl( "Synonyms", { engine: engine.name, displayName: "hello-hi", synonymsAction: { synonyms: ["hello", "hi"] }, },);CollectionsEnginesControl: Updating a Control
Section titled “CollectionsEnginesControl: Updating a Control”// Same logical id as before; only the changed props differ.const control = yield* GCP.DiscoveryEngine.CollectionsEnginesControl( "Synonyms", { engine: engine.name, synonymsAction: { synonyms: ["hello", "hi", "hey"] }, },);CollectionsEnginesConversation
Section titled “CollectionsEnginesConversation”Source:
src/GCP/DiscoveryEngine/CollectionsEnginesConversation.ts
A Discovery Engine Conversation on a collection Engine.
Its id is assigned by the API, so only a recorded resource can be read back. The API assigns the conversation id. Parent engine is immutable; state and messages update in place.
CollectionsEnginesConversation: Creating a Conversation
Section titled “CollectionsEnginesConversation: Creating a Conversation”const conversation = yield* GCP.DiscoveryEngine.CollectionsEnginesConversation("Chat", { engine: engine.name, });CollectionsEnginesConversation: Updating a Conversation
Section titled “CollectionsEnginesConversation: Updating a Conversation”// Same logical id as before; only the changed props differ.const conversation = yield* GCP.DiscoveryEngine.CollectionsEnginesConversation("Chat", { engine: engine.name, state: "COMPLETED", });CollectionsEnginesServingConfig
Section titled “CollectionsEnginesServingConfig”Source:
src/GCP/DiscoveryEngine/CollectionsEnginesServingConfig.ts
A Discovery Engine ServingConfig on a collection Engine.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Additional serving configs are API-only (the console uses the default).
Parent engine, id, and solution type are immutable; display name, ranking,
and control lists update in place.
CollectionsEnginesServingConfig: Creating a Serving Config
Section titled “CollectionsEnginesServingConfig: Creating a Serving Config”const serving = yield* GCP.DiscoveryEngine.CollectionsEnginesServingConfig("Primary", { engine: engine.name, displayName: "primary", });CollectionsEnginesServingConfig: Updating a Serving Config
Section titled “CollectionsEnginesServingConfig: Updating a Serving Config”// Same logical id as before; only the changed props differ.const serving = yield* GCP.DiscoveryEngine.CollectionsEnginesServingConfig("Primary", { engine: engine.name, displayName: "primary-prod", });CollectionsEnginesSession
Section titled “CollectionsEnginesSession”Source:
src/GCP/DiscoveryEngine/CollectionsEnginesSession.ts
A Discovery Engine Session on a collection Engine.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent engine and session id are immutable; display name, pin, and labels
update in place.
CollectionsEnginesSession: Creating a Session
Section titled “CollectionsEnginesSession: Creating a Session”const session = yield* GCP.DiscoveryEngine.CollectionsEnginesSession( "Chat", { engine: engine.name, displayName: "support", },);CollectionsEnginesSession: Updating a Session
Section titled “CollectionsEnginesSession: Updating a Session”// Same logical id as before; only the changed props differ.const session = yield* GCP.DiscoveryEngine.CollectionsEnginesSession( "Chat", { engine: engine.name, displayName: "support-prod", isPinned: true, },);DataStore
Section titled “DataStore”Source:
src/GCP/DiscoveryEngine/DataStore.ts
A Discovery Engine DataStore — a container for Documents.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Location-scoped (projects/{project}/locations/{location}/dataStores). Id,
location, vertical, content config, and ACL are immutable; display name
updates in place.
DataStore: Creating a Data Store
Section titled “DataStore: Creating a Data Store”Generated id, generic search store
const store = yield* GCP.DiscoveryEngine.DataStore("Docs", { displayName: "docs",});Explicit id
const store = yield* GCP.DiscoveryEngine.DataStore("Docs", { dataStoreId: "app-docs", location: "global", industryVertical: "GENERIC", contentConfig: "NO_CONTENT", solutionTypes: ["SOLUTION_TYPE_SEARCH"],});DataStore: Updating a Data Store
Section titled “DataStore: Updating a Data Store”// Same logical id as before; only the display name changes.const store = yield* GCP.DiscoveryEngine.DataStore("Docs", { displayName: "docs-prod",});DataStoresBranchesDocument
Section titled “DataStoresBranchesDocument”Source:
src/GCP/DiscoveryEngine/DataStoresBranchesDocument.ts
A Vertex AI Search Document in a Data Store branch.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent data store, branch, and document id are immutable; payload and
content update in place.
DataStoresBranchesDocument: Creating a Document
Section titled “DataStoresBranchesDocument: Creating a Document”const document = yield* GCP.DiscoveryEngine.DataStoresBranchesDocument( "About", { dataStore: dataStore.name, jsonData: JSON.stringify({ title: "About us", uri: "https://example.com/about", }), },);DataStoresBranchesDocument: Updating a Document
Section titled “DataStoresBranchesDocument: Updating a Document”// Same logical id as before; only the changed props differ.const document = yield* GCP.DiscoveryEngine.DataStoresBranchesDocument( "About", { dataStore: dataStore.name, jsonData: JSON.stringify({ title: "About the team", uri: "https://example.com/about", }), },);DataStoresControl
Section titled “DataStoresControl”Source:
src/GCP/DiscoveryEngine/DataStoresControl.ts
A Vertex AI Search Control attached to a Data Store.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent, control id, solution type, and action kind are immutable; display
name, conditions, and action payload update in place.
DataStoresControl: Creating a Control
Section titled “DataStoresControl: Creating a Control”const control = yield* GCP.DiscoveryEngine.DataStoresControl("Synonyms", { dataStore: dataStore.name, displayName: "happy-glad", synonymsAction: { synonyms: ["happy", "glad"] },});DataStoresControl: Updating a Control
Section titled “DataStoresControl: Updating a Control”// Same logical id as before; only the changed props differ.const control = yield* GCP.DiscoveryEngine.DataStoresControl("Synonyms", { dataStore: dataStore.name, displayName: "mood", synonymsAction: { synonyms: ["happy", "glad", "cheerful"] },});DataStoresConversation
Section titled “DataStoresConversation”Source:
src/GCP/DiscoveryEngine/DataStoresConversation.ts
A Vertex AI Search Conversation attached to a Data Store.
Its id is assigned by the API, so only a recorded resource can be read back. The conversation id is server-assigned. Parent is immutable; user id and state update in place.
DataStoresConversation: Creating a Conversation
Section titled “DataStoresConversation: Creating a Conversation”const conversation = yield* GCP.DiscoveryEngine.DataStoresConversation( "Support", { dataStore: dataStore.name },);DataStoresConversation: Updating a Conversation
Section titled “DataStoresConversation: Updating a Conversation”// Same logical id as before; only the changed props differ.const conversation = yield* GCP.DiscoveryEngine.DataStoresConversation( "Support", { dataStore: dataStore.name, state: "COMPLETED", },);DataStoresSchema
Section titled “DataStoresSchema”Source:
src/GCP/DiscoveryEngine/DataStoresSchema.ts
A Vertex AI Search Schema attached to a Data Store.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent and schema id are immutable; the schema document updates in place
(LRO).
DataStoresSchema: Creating a Schema
Section titled “DataStoresSchema: Creating a Schema”const schema = yield* GCP.DiscoveryEngine.DataStoresSchema("Catalog", { dataStore: dataStore.name, jsonSchema: JSON.stringify({ type: "object", properties: { title: { type: "string" }, sku: { type: "string" }, }, }),});DataStoresSchema: Updating a Schema
Section titled “DataStoresSchema: Updating a Schema”// Same logical id as before; only the changed props differ.const schema = yield* GCP.DiscoveryEngine.DataStoresSchema("Catalog", { dataStore: dataStore.name, jsonSchema: JSON.stringify({ type: "object", properties: { title: { type: "string" }, sku: { type: "string" }, price: { type: "number" }, }, }),});DataStoresServingConfig
Section titled “DataStoresServingConfig”Source:
src/GCP/DiscoveryEngine/DataStoresServingConfig.ts
A Vertex AI Search ServingConfig attached to a Data Store.
Without labels, ownership rests on the deterministic id: read reports a
resource it finds without prior state as unowned (adopt it with --adopt).
Parent, id, and solution type are immutable; display name, attached
controls, and ranking update in place. The console only shows the default
serving config — additional configs are API-only.
DataStoresServingConfig: Creating a Serving Config
Section titled “DataStoresServingConfig: Creating a Serving Config”const config = yield* GCP.DiscoveryEngine.DataStoresServingConfig("Search", { dataStore: dataStore.name, displayName: "web-search", solutionType: "SOLUTION_TYPE_SEARCH",});DataStoresServingConfig: Updating a Serving Config
Section titled “DataStoresServingConfig: Updating a Serving Config”// Same logical id as before; only the changed props differ.const config = yield* GCP.DiscoveryEngine.DataStoresServingConfig("Search", { dataStore: dataStore.name, displayName: "web-search", filterControlIds: [control.controlId],});DataStoresSession
Section titled “DataStoresSession”Source:
src/GCP/DiscoveryEngine/DataStoresSession.ts
A Vertex AI Search Session attached to a Data Store.
Alchemy marks ownership with alchemy-* entries in the session’s
string-list labels. Parent and session id are immutable; display name, pin, user id, and labels
update in place.
DataStoresSession: Creating a Session
Section titled “DataStoresSession: Creating a Session”const session = yield* GCP.DiscoveryEngine.DataStoresSession("Chat", { dataStore: dataStore.name, displayName: "support",});DataStoresSession: Updating a Session
Section titled “DataStoresSession: Updating a Session”// Same logical id as before; only the changed props differ.const session = yield* GCP.DiscoveryEngine.DataStoresSession("Chat", { dataStore: dataStore.name, displayName: "vip-support", isPinned: true,});DataStoresSiteSearchEngineTargetSite
Section titled “DataStoresSiteSearchEngineTargetSite”Source:
src/GCP/DiscoveryEngine/DataStoresSiteSearchEngineTargetSite.ts
A Vertex AI Search TargetSite under a Data Store site search engine.
Its id is assigned by the API, so only a recorded resource can be read back. The target site id is server-assigned. Parent and exact-match flag are immutable; type updates in place (LRO).
DataStoresSiteSearchEngineTargetSite: Creating a Target Site
Section titled “DataStoresSiteSearchEngineTargetSite: Creating a Target Site”const site = yield* GCP.DiscoveryEngine.DataStoresSiteSearchEngineTargetSite( "Docs", { dataStore: dataStore.name, providedUriPattern: "www.example.com/docs", type: "INCLUDE", },);DataStoresSiteSearchEngineTargetSite: Updating a Target Site
Section titled “DataStoresSiteSearchEngineTargetSite: Updating a Target Site”// Same logical id as before; only the changed props differ.const site = yield* GCP.DiscoveryEngine.DataStoresSiteSearchEngineTargetSite( "Docs", { dataStore: dataStore.name, providedUriPattern: "www.example.com/docs", type: "EXCLUDE", },);IdentityMappingStore
Section titled “IdentityMappingStore”Source:
src/GCP/DiscoveryEngine/IdentityMappingStore.ts
A Vertex AI Search Identity Mapping Store.
Stores have no labels or display name, so generated ids are prefixed
with alch for list / nuke. Location, id, and CMEK are identity —
changing them replaces the store. There is nothing mutable to sync.
IdentityMappingStore: Creating an Identity Mapping Store
Section titled “IdentityMappingStore: Creating an Identity Mapping Store”Generated id
const store = yield* GCP.DiscoveryEngine.IdentityMappingStore("Users", { disableCmek: true,});Explicit id and location
const store = yield* GCP.DiscoveryEngine.IdentityMappingStore("Users", { identityMappingStoreId: "app-users", location: "global", disableCmek: true,});