import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * ReasoningEngine provides a customizable runtime for models to determine which actions to take and in which order. * * To get more information about ReasoningEngine, see: * * * [API documentation](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.reasoningEngines/) * * How-to Guides * * [Develop and deploy agents on Vertex AI Agent Engine](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/quickstart) * * ## Example Usage * * ### Vertex Ai Reasoning Engine Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as time from "@pulumiverse/time"; * * const classMethods = [{ * apiMode: "async", * description: null, * name: "async_query", * parameters: { * type: "object", * required: [], * properties: {}, * }, * }]; * const secret = new gcp.secretmanager.Secret("secret", { * secretId: "secret", * replication: { * auto: {}, * }, * }); * const secretVersion = new gcp.secretmanager.SecretVersion("secret_version", { * secret: secret.id, * secretData: "test", * }); * const serviceAccount = new gcp.serviceaccount.Account("service_account", {accountId: "sa"}); * const secretAccess = new gcp.secretmanager.SecretIamMember("secret_access", { * secretId: secret.id, * role: "roles/secretmanager.secretAccessor", * member: serviceAccount.member, * }); * const project = gcp.organizations.getProject({}); * const saIamObjectViewer = new gcp.projects.IAMMember("sa_iam_object_viewer", { * role: "roles/storage.objectViewer", * project: project.then(project => project.id), * member: serviceAccount.member, * }); * const saIamAiPlatformUser = new gcp.projects.IAMMember("sa_iam_ai_platform_user", { * role: "roles/aiplatform.user", * project: project.then(project => project.id), * member: serviceAccount.member, * }); * const saIamViewer = new gcp.projects.IAMMember("sa_iam_viewer", { * role: "roles/viewer", * project: project.then(project => project.id), * member: serviceAccount.member, * }); * // Ensure we wait enough time for IAM permissions to be propagated * const wait5Minutes = new time.Sleep("wait_5_minutes", {createDuration: "5m"}, { * dependsOn: [ * saIamAiPlatformUser, * saIamObjectViewer, * saIamViewer, * secretAccess, * secretVersion, * ], * }); * const bucket = new gcp.storage.Bucket("bucket", { * name: "reasoning-engine", * location: "us-central1", * uniformBucketLevelAccess: true, * forceDestroy: true, * }); * const bucketObjRequirementsTxt = new gcp.storage.BucketObject("bucket_obj_requirements_txt", { * name: "requirements.txt", * bucket: bucket.id, * source: new pulumi.asset.FileAsset("./test-fixtures/requirements_adk.txt"), * }); * const bucketObjPickle = new gcp.storage.BucketObject("bucket_obj_pickle", { * name: "code.pkl", * bucket: bucket.id, * source: new pulumi.asset.FileAsset("./test-fixtures/pickle_adk.pkl"), * }); * const bucketObjDependenciesTarGz = new gcp.storage.BucketObject("bucket_obj_dependencies_tar_gz", { * name: "dependencies.tar.gz", * bucket: bucket.id, * source: new pulumi.asset.FileAsset("./test-fixtures/dependencies_adk.tar.gz"), * }); * const reasoningEngine = new gcp.vertex.AiReasoningEngine("reasoning_engine", { * displayName: "reasoning-engine", * description: "A basic reasoning engine", * region: "us-central1", * encryptionSpec: { * kmsKeyName: "example-key", * }, * spec: { * agentFramework: "google-adk", * classMethods: JSON.stringify(classMethods), * serviceAccount: serviceAccount.email, * deploymentSpec: { * envs: [ * { * name: "var_1", * value: "value_2", * }, * { * name: "var_2", * value: "value_2", * }, * ], * secretEnvs: [ * { * name: "secret_var_1", * secretRef: { * secret: secret.secretId, * version: "latest", * }, * }, * { * name: "secret_var_2", * secretRef: { * secret: secret.secretId, * version: "latest", * }, * }, * ], * }, * packageSpec: { * dependencyFilesGcsUri: pulumi.interpolate`${bucket.url}/${bucketObjDependenciesTarGz.name}`, * pickleObjectGcsUri: pulumi.interpolate`${bucket.url}/${bucketObjPickle.name}`, * pythonVersion: "3.11", * requirementsGcsUri: pulumi.interpolate`${bucket.url}/${bucketObjRequirementsTxt.name}`, * }, * }, * }, { * dependsOn: [wait5Minutes], * }); * ``` * * ## Import * * ReasoningEngine can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{region}}/reasoningEngines/{{name}}` * * * `{{project}}/{{region}}/{{name}}` * * * `{{region}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, ReasoningEngine can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default projects/{{project}}/locations/{{region}}/reasoningEngines/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default {{project}}/{{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default {{region}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:vertex/aiReasoningEngine:AiReasoningEngine default {{name}} * ``` */ export declare class AiReasoningEngine extends pulumi.CustomResource { /** * Get an existing AiReasoningEngine 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?: AiReasoningEngineState, opts?: pulumi.CustomResourceOptions): AiReasoningEngine; /** * Returns true if the given object is an instance of AiReasoningEngine. 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 AiReasoningEngine; /** * The timestamp of when the Index was created in RFC3339 UTC "Zulu" format, * with nanosecond resolution and up to nine fractional digits. */ readonly createTime: pulumi.Output; /** * The description of the ReasoningEngine. */ readonly description: pulumi.Output; /** * The display name of the ReasoningEngine. */ readonly displayName: pulumi.Output; /** * Optional. Customer-managed encryption key spec for a ReasoningEngine. * If set, this ReasoningEngine and all sub-resources of this ReasoningEngine will be secured by this key. * Structure is documented below. */ readonly encryptionSpec: pulumi.Output; /** * The generated name of the ReasoningEngine, in the format * 'projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}' */ readonly name: 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; /** * The region of the reasoning engine. eg us-central1 */ readonly region: pulumi.Output; /** * Optional. Configurations of the ReasoningEngine. * Structure is documented below. */ readonly spec: pulumi.Output; /** * The timestamp of when the Index was last updated in RFC3339 UTC "Zulu" format, * with nanosecond resolution and up to nine fractional digits. */ readonly updateTime: pulumi.Output; /** * Create a AiReasoningEngine 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: AiReasoningEngineArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AiReasoningEngine resources. */ export interface AiReasoningEngineState { /** * The timestamp of when the Index was created in RFC3339 UTC "Zulu" format, * with nanosecond resolution and up to nine fractional digits. */ createTime?: pulumi.Input; /** * The description of the ReasoningEngine. */ description?: pulumi.Input; /** * The display name of the ReasoningEngine. */ displayName?: pulumi.Input; /** * Optional. Customer-managed encryption key spec for a ReasoningEngine. * If set, this ReasoningEngine and all sub-resources of this ReasoningEngine will be secured by this key. * Structure is documented below. */ encryptionSpec?: pulumi.Input; /** * The generated name of the ReasoningEngine, in the format * 'projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}' */ name?: 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; /** * The region of the reasoning engine. eg us-central1 */ region?: pulumi.Input; /** * Optional. Configurations of the ReasoningEngine. * Structure is documented below. */ spec?: pulumi.Input; /** * The timestamp of when the Index was last updated in RFC3339 UTC "Zulu" format, * with nanosecond resolution and up to nine fractional digits. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a AiReasoningEngine resource. */ export interface AiReasoningEngineArgs { /** * The description of the ReasoningEngine. */ description?: pulumi.Input; /** * The display name of the ReasoningEngine. */ displayName: pulumi.Input; /** * Optional. Customer-managed encryption key spec for a ReasoningEngine. * If set, this ReasoningEngine and all sub-resources of this ReasoningEngine will be secured by this key. * Structure is documented below. */ encryptionSpec?: 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; /** * The region of the reasoning engine. eg us-central1 */ region?: pulumi.Input; /** * Optional. Configurations of the ReasoningEngine. * Structure is documented below. */ spec?: pulumi.Input; }