Skip to content

GCP.DiscoveryEngine reference

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",
});

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" }),
},
);

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"],
},
);

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",
},
);

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" } },
}),
},
);

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",
},
);

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/",
},
);

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.

const store = yield* GCP.DiscoveryEngine.DataStore("Docs", {});
const engine = yield* GCP.DiscoveryEngine.CollectionsEngine("Search", {
dataStoreIds: [store.dataStoreId],
displayName: "docs search",
});
// Same logical id as before; only the changed props differ.
const engine = yield* GCP.DiscoveryEngine.CollectionsEngine("Search", {
dataStoreIds: [store.dataStoreId],
displayName: "docs search prod",
});

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",
},
);

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"] },
},
);

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",
});

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",
});

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,
},
);

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.

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"],
});
// Same logical id as before; only the display name changes.
const store = yield* GCP.DiscoveryEngine.DataStore("Docs", {
displayName: "docs-prod",
});

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",
}),
},
);

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.

const control = yield* GCP.DiscoveryEngine.DataStoresControl("Synonyms", {
dataStore: dataStore.name,
displayName: "happy-glad",
synonymsAction: { synonyms: ["happy", "glad"] },
});
// 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"] },
});

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",
},
);

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).

const schema = yield* GCP.DiscoveryEngine.DataStoresSchema("Catalog", {
dataStore: dataStore.name,
jsonSchema: JSON.stringify({
type: "object",
properties: {
title: { type: "string" },
sku: { type: "string" },
},
}),
});
// 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" },
},
}),
});

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],
});

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.

const session = yield* GCP.DiscoveryEngine.DataStoresSession("Chat", {
dataStore: dataStore.name,
displayName: "support",
});
// 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,
});

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",
},
);

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,
});