import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Description * * ## Example Usage * * ### Ces App Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as std from "@pulumi/std"; * * const project = gcp.organizations.getProject({}); * const fakePrivateKeySecret = new gcp.secretmanager.Secret("fake_private_key_secret", { * secretId: "fake-pk-secret-app-tf1", * replication: { * auto: {}, * }, * }); * const fakeSecretVersion = new gcp.secretmanager.SecretVersion("fake_secret_version", { * secret: fakePrivateKeySecret.id, * secretData: std.file({ * input: "test-fixtures/test.key", * }).then(invoke => invoke.result), * }); * const privateKeyAccessor = new gcp.secretmanager.SecretIamMember("private_key_accessor", { * project: fakePrivateKeySecret.project, * secretId: fakePrivateKeySecret.secretId, * role: "roles/secretmanager.secretAccessor", * member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-ces.iam.gserviceaccount.com`), * }); * const cesAppBasic = new gcp.ces.App("ces_app_basic", { * appId: "app-id", * location: "us", * description: "Basic CES App example", * displayName: "my-app", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * audioProcessingConfig: { * synthesizeSpeechConfigs: [ * { * languageCode: "en-US", * voice: "en-US-Standard-A", * speakingRate: 1, * }, * { * languageCode: "es-ES", * voice: "es-ES-Standard-A", * speakingRate: 0.95, * }, * ], * bargeInConfig: { * bargeInAwareness: true, * }, * inactivityTimeout: "300s", * ambientSoundConfig: { * prebuiltAmbientSound: "room_2", * volumeGainDb: -6, * }, * }, * loggingSettings: { * redactionConfig: { * enableRedaction: true, * inspectTemplate: "projects/fake-project/locations/us/inspectTemplates/example-inspect", * deidentifyTemplate: "projects/fake-project/locations/us/deidentifyTemplates/example-deidentify", * }, * audioRecordingConfig: { * gcsBucket: "gs://fake-app-audio-recordings", * gcsPathPrefix: "projects/fake-project/location/us/app/test-app/123/$session/123", * }, * bigqueryExportSettings: { * dataset: "projects/fake-project/datasets/fake_app_logs", * enabled: false, * project: "projects/fake-project", * }, * cloudLoggingSettings: { * enableCloudLogging: true, * }, * conversationLoggingSettings: { * disableConversationLogging: true, * }, * }, * modelSettings: { * model: "gemini-1.5-flash", * temperature: 0.5, * }, * evaluationMetricsThresholds: { * goldenEvaluationMetricsThresholds: { * turnLevelMetricsThresholds: { * semanticSimilaritySuccessThreshold: 3, * overallToolInvocationCorrectnessThreshold: 1, * }, * expectationLevelMetricsThresholds: { * toolInvocationParameterCorrectnessThreshold: 1, * }, * }, * }, * variableDeclarations: [{ * name: "test", * description: "test", * schema: { * 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", * }), * }, * }], * globalInstruction: "You are a virtual assistant for an e-commerce platform. Be friendly and helpful.", * guardrails: [], * defaultChannelProfile: { * channelType: "WEB_UI", * disableBargeInControl: false, * disableDtmf: true, * personaProperty: { * persona: "CONCISE", * }, * profileId: "profile-id", * webWidgetConfig: { * modality: "CHAT_ONLY", * theme: "LIGHT", * webWidgetTitle: "Help Assistant", * }, * }, * metadata: { * deployment_env: "test", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * clientCertificateSettings: { * tlsCertificate: std.file({ * input: "test-fixtures/cert.pem", * }).then(invoke => invoke.result), * privateKey: fakeSecretVersion.name, * passphrase: "fakepassphrase", * }, * }); * ``` * ### Ces App Ambient Sound Gcs Uri * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const cesAppAmbientSoundGcsUri = new gcp.ces.App("ces_app_ambient_sound_gcs_uri", { * appId: "app-id", * location: "us", * description: "Basic CES App example", * displayName: "my-app-ambient-sound-gcs-uri", * languageSettings: { * defaultLanguageCode: "en-US", * supportedLanguageCodes: [ * "es-ES", * "fr-FR", * ], * enableMultilingualSupport: true, * fallbackAction: "escalate", * }, * audioProcessingConfig: { * synthesizeSpeechConfigs: [ * { * languageCode: "en-US", * voice: "en-US-Standard-A", * speakingRate: 1, * }, * { * languageCode: "es-ES", * voice: "es-ES-Standard-A", * speakingRate: 0.95, * }, * ], * bargeInConfig: { * bargeInAwareness: true, * }, * inactivityTimeout: "300s", * ambientSoundConfig: { * gcsUri: "gs://fake-bucket/sounds/ambient.wav", * volumeGainDb: -6, * }, * }, * loggingSettings: { * redactionConfig: { * enableRedaction: true, * inspectTemplate: "projects/fake-project/locations/us/inspectTemplates/example-inspect", * deidentifyTemplate: "projects/fake-project/locations/us/deidentifyTemplates/example-deidentify", * }, * audioRecordingConfig: { * gcsBucket: "gs://fake-app-audio-recordings", * gcsPathPrefix: "projects/fake-project/location/us/app/fake-app/123/$session/123", * }, * bigqueryExportSettings: { * dataset: "projects/fake-project/datasets/fake_app_logs", * enabled: false, * project: "projects/fake-project", * }, * cloudLoggingSettings: { * enableCloudLogging: true, * }, * conversationLoggingSettings: { * disableConversationLogging: true, * }, * }, * modelSettings: { * model: "gemini-1.5-flash", * temperature: 0.5, * }, * evaluationMetricsThresholds: { * goldenEvaluationMetricsThresholds: { * turnLevelMetricsThresholds: { * semanticSimilaritySuccessThreshold: 3, * overallToolInvocationCorrectnessThreshold: 1, * }, * expectationLevelMetricsThresholds: { * toolInvocationParameterCorrectnessThreshold: 1, * }, * }, * }, * variableDeclarations: [{ * name: "test", * description: "test", * schema: { * 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", * }), * }, * }], * globalInstruction: "You are a virtual assistant for an e-commerce platform. Be friendly and helpful.", * guardrails: [], * defaultChannelProfile: { * channelType: "WEB_UI", * disableBargeInControl: false, * disableDtmf: true, * personaProperty: { * persona: "CONCISE", * }, * profileId: "profile-id", * webWidgetConfig: { * modality: "CHAT_ONLY", * theme: "LIGHT", * webWidgetTitle: "Help Assistant", * }, * }, * metadata: { * deployment_env: "test", * }, * timeZoneSettings: { * timeZone: "America/Los_Angeles", * }, * }); * ``` * * ## Import * * App can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/apps/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, App can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:ces/app:App default projects/{{project}}/locations/{{location}}/apps/{{name}} * ``` * * ```sh * $ pulumi import gcp:ces/app:App default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:ces/app:App default {{location}}/{{name}} * ``` */ export declare class App extends pulumi.CustomResource { /** * Get an existing App 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?: AppState, opts?: pulumi.CustomResourceOptions): App; /** * Returns true if the given object is an instance of App. 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 App; /** * The ID to use for the app, which will become the final component of * the app's resource name. If not provided, a unique ID will be * automatically assigned for the app. */ readonly appId: pulumi.Output; /** * Configuration for how the input and output audio should be processed and * delivered. * Structure is documented below. */ readonly audioProcessingConfig: pulumi.Output; /** * The default client certificate settings for the app. * Structure is documented below. */ readonly clientCertificateSettings: pulumi.Output; /** * Timestamp when the app was created. */ readonly createTime: pulumi.Output; /** * Data store related settings for the app. * Structure is documented below. */ readonly dataStoreSettings: pulumi.Output; /** * A ChannelProfile configures the agent's behavior for a specific communication * channel, such as web UI or telephony. * Structure is documented below. */ readonly defaultChannelProfile: pulumi.Output; /** * Number of deployments in the app. */ readonly deploymentCount: pulumi.Output; /** * Human-readable description of the app. */ readonly description: pulumi.Output; /** * Display name of the app. */ 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; /** * Threshold settings for metrics in an Evaluation. * Structure is documented below. */ readonly evaluationMetricsThresholds: pulumi.Output; /** * Instructions for all the agents in the app. * You can use this instruction to set up a stable identity or personality * across all the agents. */ readonly globalInstruction: pulumi.Output; /** * List of guardrails for the app. * Format: * `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` */ readonly guardrails: pulumi.Output; /** * Language settings of the app. * Structure is documented below. */ readonly languageSettings: 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; /** * Settings to describe the logging behaviors for the app. * Structure is documented below. */ readonly loggingSettings: pulumi.Output; /** * Metadata about the app. This field can be used to store additional * information relevant to the app's details or intended usages. */ readonly metadata: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Model settings contains various configurations for the LLM model. * Structure is documented below. */ readonly modelSettings: pulumi.Output; /** * Identifier. The unique identifier of the app. * Format: `projects/{project}/locations/{location}/apps/{app}` */ 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 root agent is the entry point of the app. * Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` */ readonly rootAgent: pulumi.Output; /** * TimeZone settings of the app. * Structure is documented below. */ readonly timeZoneSettings: pulumi.Output; /** * Timestamp when the app was last updated. */ readonly updateTime: pulumi.Output; /** * The declarations of the variables. * Structure is documented below. */ readonly variableDeclarations: pulumi.Output; /** * Create a App 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: AppArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering App resources. */ export interface AppState { /** * The ID to use for the app, which will become the final component of * the app's resource name. If not provided, a unique ID will be * automatically assigned for the app. */ appId?: pulumi.Input; /** * Configuration for how the input and output audio should be processed and * delivered. * Structure is documented below. */ audioProcessingConfig?: pulumi.Input; /** * The default client certificate settings for the app. * Structure is documented below. */ clientCertificateSettings?: pulumi.Input; /** * Timestamp when the app was created. */ createTime?: pulumi.Input; /** * Data store related settings for the app. * Structure is documented below. */ dataStoreSettings?: pulumi.Input; /** * A ChannelProfile configures the agent's behavior for a specific communication * channel, such as web UI or telephony. * Structure is documented below. */ defaultChannelProfile?: pulumi.Input; /** * Number of deployments in the app. */ deploymentCount?: pulumi.Input; /** * Human-readable description of the app. */ description?: pulumi.Input; /** * Display name of the app. */ 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; /** * Threshold settings for metrics in an Evaluation. * Structure is documented below. */ evaluationMetricsThresholds?: pulumi.Input; /** * Instructions for all the agents in the app. * You can use this instruction to set up a stable identity or personality * across all the agents. */ globalInstruction?: pulumi.Input; /** * List of guardrails for the app. * Format: * `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` */ guardrails?: pulumi.Input[]>; /** * Language settings of the app. * Structure is documented below. */ languageSettings?: 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; /** * Settings to describe the logging behaviors for the app. * Structure is documented below. */ loggingSettings?: pulumi.Input; /** * Metadata about the app. This field can be used to store additional * information relevant to the app's details or intended usages. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Model settings contains various configurations for the LLM model. * Structure is documented below. */ modelSettings?: pulumi.Input; /** * Identifier. The unique identifier of the app. * Format: `projects/{project}/locations/{location}/apps/{app}` */ 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 root agent is the entry point of the app. * Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` */ rootAgent?: pulumi.Input; /** * TimeZone settings of the app. * Structure is documented below. */ timeZoneSettings?: pulumi.Input; /** * Timestamp when the app was last updated. */ updateTime?: pulumi.Input; /** * The declarations of the variables. * Structure is documented below. */ variableDeclarations?: pulumi.Input[]>; } /** * The set of arguments for constructing a App resource. */ export interface AppArgs { /** * The ID to use for the app, which will become the final component of * the app's resource name. If not provided, a unique ID will be * automatically assigned for the app. */ appId: pulumi.Input; /** * Configuration for how the input and output audio should be processed and * delivered. * Structure is documented below. */ audioProcessingConfig?: pulumi.Input; /** * The default client certificate settings for the app. * Structure is documented below. */ clientCertificateSettings?: pulumi.Input; /** * Data store related settings for the app. * Structure is documented below. */ dataStoreSettings?: pulumi.Input; /** * A ChannelProfile configures the agent's behavior for a specific communication * channel, such as web UI or telephony. * Structure is documented below. */ defaultChannelProfile?: pulumi.Input; /** * Human-readable description of the app. */ description?: pulumi.Input; /** * Display name of the app. */ displayName: pulumi.Input; /** * Threshold settings for metrics in an Evaluation. * Structure is documented below. */ evaluationMetricsThresholds?: pulumi.Input; /** * Instructions for all the agents in the app. * You can use this instruction to set up a stable identity or personality * across all the agents. */ globalInstruction?: pulumi.Input; /** * List of guardrails for the app. * Format: * `projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}` */ guardrails?: pulumi.Input[]>; /** * Language settings of the app. * Structure is documented below. */ languageSettings?: 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; /** * Settings to describe the logging behaviors for the app. * Structure is documented below. */ loggingSettings?: pulumi.Input; /** * Metadata about the app. This field can be used to store additional * information relevant to the app's details or intended usages. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Model settings contains various configurations for the LLM model. * Structure is documented below. */ modelSettings?: 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 root agent is the entry point of the app. * Format: `projects/{project}/locations/{location}/apps/{app}/agents/{agent}` */ rootAgent?: pulumi.Input; /** * TimeZone settings of the app. * Structure is documented below. */ timeZoneSettings?: pulumi.Input; /** * The declarations of the variables. * Structure is documented below. */ variableDeclarations?: pulumi.Input[]>; }