import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Description * * ## Example Usage * * ### Ces Tool Client Function Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const my_app = new gcp.ces.App("my-app", { * location: "us", * displayName: "my-app", * appId: "app-id", * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolClientFunctionBasic = new gcp.ces.Tool("ces_tool_client_function_basic", { * location: "us", * app: my_app.name, * toolId: "ces_tool_basic1", * executionType: "SYNCHRONOUS", * clientFunction: { * name: "ces_tool_client_function_basic", * description: "example-description", * parameters: { * description: "schema description", * type: "ARRAY", * nullable: true, * requireds: ["some_property"], * enums: [ * "VALUE_A", * "VALUE_B", * ], * ref: "#/defs/MyDefinition", * uniqueItems: true, * defs: JSON.stringify({ * SimpleString: { * type: "STRING", * description: "A simple string definition", * }, * }), * anyOf: JSON.stringify([{ * type: "STRING", * description: "any_of option 1: string", * }]), * "default": JSON.stringify(false), * prefixItems: JSON.stringify([{ * type: "ARRAY", * description: "prefix item 1", * }]), * additionalProperties: JSON.stringify({ * type: "BOOLEAN", * }), * properties: JSON.stringify({ * name: { * type: "STRING", * description: "A name", * }, * }), * items: JSON.stringify({ * type: "ARRAY", * description: "An array", * }), * }, * response: { * description: "schema description", * type: "ARRAY", * nullable: true, * requireds: ["some_property"], * enums: [ * "VALUE_A", * "VALUE_B", * ], * ref: "#/defs/MyDefinition", * uniqueItems: true, * defs: JSON.stringify({ * SimpleString: { * type: "STRING", * description: "A simple string definition", * }, * }), * anyOf: JSON.stringify([{ * type: "STRING", * description: "any_of option 1: string", * }]), * "default": JSON.stringify(false), * prefixItems: JSON.stringify([{ * type: "ARRAY", * description: "prefix item 1", * }]), * additionalProperties: JSON.stringify({ * type: "BOOLEAN", * }), * properties: JSON.stringify({ * name: { * type: "STRING", * description: "A name", * }, * }), * items: JSON.stringify({ * type: "ARRAY", * description: "An array", * }), * }, * }, * }); * ``` * ### Ces Tool Data Store Tool Engine Source Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const basic = new gcp.discoveryengine.DataStore("basic", { * location: "global", * dataStoreId: "tool_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", { * engineId: "tool_engine_id", * collectionId: "default_collection", * location: basic.location, * displayName: "Example Display Name", * dataStoreIds: [basic.dataStoreId], * searchEngineConfig: {}, * }); * const my_app = new gcp.ces.App("my-app", { * location: "us", * displayName: "my-app", * appId: "app-id", * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolDataStoreToolEngineSourceBasic = new gcp.ces.Tool("ces_tool_data_store_tool_engine_source_basic", { * location: "us", * app: my_app.name, * toolId: "ces_tool_basic2", * executionType: "SYNCHRONOUS", * dataStoreTool: { * name: "example-tool", * description: "example-description", * boostSpecs: [{ * dataStores: [basic.name], * specs: [{ * conditionBoostSpecs: [{ * condition: "(lang_code: ANY(\"en\", \"fr\"))", * boost: 1, * boostControlSpec: { * fieldName: "example-field", * attributeType: "NUMERICAL", * interpolationType: "LINEAR", * controlPoints: [{ * attributeValue: "1", * boostAmount: 1, * }], * }, * }], * }], * }], * modalityConfigs: [{ * modalityType: "TEXT", * rewriterConfig: { * modelSettings: { * model: "gemini-2.5-flash", * temperature: 1, * }, * prompt: "example-prompt", * disabled: false, * }, * summarizationConfig: { * modelSettings: { * model: "gemini-2.5-flash", * temperature: 1, * }, * prompt: "example-prompt", * disabled: false, * }, * groundingConfig: { * groundingLevel: 3, * disabled: false, * }, * }], * engineSource: { * engine: basicSearchEngine.name, * dataStoreSources: [{ * filter: "example_field: ANY(\"specific_example\")", * dataStore: { * name: basic.name, * }, * }], * filter: "example_field: ANY(\"specific_example\")", * }, * maxResults: 5, * }, * }); * ``` * ### Ces Tool Google Search Tool Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const my_app = new gcp.ces.App("my-app", { * location: "us", * displayName: "my-app", * appId: "app-id", * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolGoogleSearchToolBasic = new gcp.ces.Tool("ces_tool_google_search_tool_basic", { * location: "us", * app: my_app.name, * toolId: "ces_tool_basic3", * executionType: "SYNCHRONOUS", * googleSearchTool: { * name: "example-tool", * description: "example-description", * excludeDomains: [ * "example.com", * "example2.com", * ], * }, * }); * ``` * ### Ces Tool Python Function Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const my_app = new gcp.ces.App("my-app", { * location: "us", * displayName: "my-app", * appId: "app-id", * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * const cesToolPythonFunctionBasic = new gcp.ces.Tool("ces_tool_python_function_basic", { * location: "us", * app: my_app.name, * toolId: "ces_tool_basic4", * executionType: "SYNCHRONOUS", * pythonFunction: { * name: "example_function", * pythonCode: "def example_function() -> int: return 0", * }, * }); * ``` * * ## Import * * Tool can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/apps/{{app}}/tools/{{name}}` * * * `{{project}}/{{location}}/{{app}}/{{name}}` * * * `{{location}}/{{app}}/{{name}}` * * When using the `pulumi import` command, Tool can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:ces/tool:Tool default projects/{{project}}/locations/{{location}}/apps/{{app}}/tools/{{name}} * ``` * * ```sh * $ pulumi import gcp:ces/tool:Tool default {{project}}/{{location}}/{{app}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:ces/tool:Tool default {{location}}/{{app}}/{{name}} * ``` */ export declare class Tool extends pulumi.CustomResource { /** * Get an existing Tool resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ToolState, opts?: pulumi.CustomResourceOptions): Tool; /** * Returns true if the given object is an instance of Tool. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Tool; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ readonly app: pulumi.Output; /** * Represents a client-side function that the agent can invoke. When the * tool is chosen by the agent, control is handed off to the client. * The client is responsible for executing the function and returning the result * as a ToolResponse to continue the interaction with the agent. * Structure is documented below. */ readonly clientFunction: pulumi.Output; /** * Timestamp when the tool was created. */ readonly createTime: pulumi.Output; /** * Tool to retrieve from Vertex AI Search datastore or engine for grounding. * Accepts either a datastore or an engine, but not both. * See Vertex AI Search: * https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. * Structure is documented below. */ readonly dataStoreTool: pulumi.Output; /** * (Output) * The name of the allowed custom CA certificates. This * can be used to disambiguate the custom CA certificates. */ readonly displayName: pulumi.Output; /** * Etag used to ensure the object hasn't changed during a read-modify-write * operation. If the etag is empty, the update will overwrite any concurrent * changes. */ readonly etag: pulumi.Output; /** * Possible values: * SYNCHRONOUS * ASYNCHRONOUS */ readonly executionType: pulumi.Output; /** * If the tool is generated by the LLM assistant, this field contains a * descriptive summary of the generation. */ readonly generatedSummary: pulumi.Output; /** * Represents a tool to perform Google web searches for grounding. * See * https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-search. * Structure is documented below. */ readonly googleSearchTool: pulumi.Output; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ readonly location: pulumi.Output; /** * (Output) * The name of the system tool. */ readonly name: pulumi.Output; /** * A remote API tool defined by an OpenAPI schema. * Structure is documented below. */ readonly openApiTools: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * A Python function tool. * Structure is documented below. */ readonly pythonFunction: pulumi.Output; /** * The system tool. * Structure is documented below. */ readonly systemTools: pulumi.Output; /** * The ID to use for the tool, which will become the final component of * the tool's resource name. If not provided, a unique ID will be * automatically assigned for the tool. */ readonly toolId: pulumi.Output; /** * Timestamp when the tool was last updated. */ readonly updateTime: pulumi.Output; /** * Create a Tool resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ToolArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Tool resources. */ export interface ToolState { /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ app?: pulumi.Input; /** * Represents a client-side function that the agent can invoke. When the * tool is chosen by the agent, control is handed off to the client. * The client is responsible for executing the function and returning the result * as a ToolResponse to continue the interaction with the agent. * Structure is documented below. */ clientFunction?: pulumi.Input; /** * Timestamp when the tool was created. */ createTime?: pulumi.Input; /** * Tool to retrieve from Vertex AI Search datastore or engine for grounding. * Accepts either a datastore or an engine, but not both. * See Vertex AI Search: * https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. * Structure is documented below. */ dataStoreTool?: pulumi.Input; /** * (Output) * The name of the allowed custom CA certificates. This * can be used to disambiguate the custom CA certificates. */ displayName?: pulumi.Input; /** * Etag used to ensure the object hasn't changed during a read-modify-write * operation. If the etag is empty, the update will overwrite any concurrent * changes. */ etag?: pulumi.Input; /** * Possible values: * SYNCHRONOUS * ASYNCHRONOUS */ executionType?: pulumi.Input; /** * If the tool is generated by the LLM assistant, this field contains a * descriptive summary of the generation. */ generatedSummary?: pulumi.Input; /** * Represents a tool to perform Google web searches for grounding. * See * https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-search. * Structure is documented below. */ googleSearchTool?: pulumi.Input; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location?: pulumi.Input; /** * (Output) * The name of the system tool. */ name?: pulumi.Input; /** * A remote API tool defined by an OpenAPI schema. * Structure is documented below. */ openApiTools?: pulumi.Input[]>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * A Python function tool. * Structure is documented below. */ pythonFunction?: pulumi.Input; /** * The system tool. * Structure is documented below. */ systemTools?: pulumi.Input[]>; /** * The ID to use for the tool, which will become the final component of * the tool's resource name. If not provided, a unique ID will be * automatically assigned for the tool. */ toolId?: pulumi.Input; /** * Timestamp when the tool was last updated. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Tool resource. */ export interface ToolArgs { /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ app: pulumi.Input; /** * Represents a client-side function that the agent can invoke. When the * tool is chosen by the agent, control is handed off to the client. * The client is responsible for executing the function and returning the result * as a ToolResponse to continue the interaction with the agent. * Structure is documented below. */ clientFunction?: pulumi.Input; /** * Tool to retrieve from Vertex AI Search datastore or engine for grounding. * Accepts either a datastore or an engine, but not both. * See Vertex AI Search: * https://cloud.google.com/generative-ai-app-builder/docs/enterprise-search-introduction. * Structure is documented below. */ dataStoreTool?: pulumi.Input; /** * Possible values: * SYNCHRONOUS * ASYNCHRONOUS */ executionType?: pulumi.Input; /** * Represents a tool to perform Google web searches for grounding. * See * https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-google-search. * Structure is documented below. */ googleSearchTool?: pulumi.Input; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * A Python function tool. * Structure is documented below. */ pythonFunction?: pulumi.Input; /** * The ID to use for the tool, which will become the final component of * the tool's resource name. If not provided, a unique ID will be * automatically assigned for the tool. */ toolId: pulumi.Input; }