import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Agents are best described as Natural Language Understanding (NLU) modules that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way. * * To get more information about Agent, see: * * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) * * ## Example Usage * * ### Dialogflowcx Agent Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bucket = new gcp.storage.Bucket("bucket", { * name: "dialogflowcx-bucket", * location: "US", * uniformBucketLevelAccess: true, * }); * const fullAgent = new gcp.diagflow.CxAgent("full_agent", { * displayName: "dialogflowcx-agent", * location: "global", * defaultLanguageCode: "en", * supportedLanguageCodes: [ * "fr", * "de", * "es", * ], * timeZone: "America/New_York", * description: "Example description.", * avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png", * enableStackdriverLogging: true, * enableSpellCorrection: true, * speechToTextSettings: { * enableSpeechAdaptation: true, * }, * advancedSettings: { * audioExportGcsDestination: { * uri: pulumi.interpolate`${bucket.url}/prefix-`, * }, * speechSettings: { * endpointerSensitivity: 30, * noSpeechTimeout: "3.500s", * useTimeoutBasedEndpointing: true, * models: { * name: "wrench", * mass: "1.3kg", * count: "3", * }, * }, * dtmfSettings: { * enabled: true, * maxDigits: 1, * finishDigit: "#", * }, * loggingSettings: { * enableStackdriverLogging: true, * enableInteractionLogging: true, * enableConsentBasedRedaction: true, * }, * }, * gitIntegrationSettings: { * githubSettings: { * displayName: "Github Repo", * repositoryUri: "https://api.github.com/repos/githubtraining/hellogitworld", * trackingBranch: "main", * accessToken: "secret-token", * branches: ["main"], * }, * }, * textToSpeechSettings: { * synthesizeSpeechConfigs: JSON.stringify({ * en: { * voice: { * name: "en-US-Neural2-A", * }, * }, * fr: { * voice: { * name: "fr-CA-Neural2-A", * }, * }, * }), * }, * genAppBuilderSettings: { * engine: "projects/-/locations/-/collections/-/engines/-", * }, * startPlaybook: "projects/-/locations/-/agents/-/playbooks/00000000-0000-0000-0000-000000000000", * enableMultiLanguageTraining: false, * locked: false, * answerFeedbackSettings: { * enableAnswerFeedback: false, * }, * clientCertificateSettings: { * passphrase: "projects/example-proj/secrets/example-secret/versions/example-version", * privateKey: "projects/example-proj/secrets/example-secret/versions/example-version", * sslCertificate: `-----BEGIN CERTIFICATE----- * MIIDdDCCAlygAwIBAgIJANg0gKeB5LKmMA0GCSqGSIb3DQEBCwUAMIGSMQswCQYD * VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5j * aXNjbzEZMBcGA1UECgwQR2l0SHViLCBJbmMuMRkwFwYDVQQLDBBHb3Zlcm5tZW50 * IFRlYW0xGTAXBgNVBAMMEGdvdnN0YWNrLmdpdGh1Yi5pbzAeFw0yMDA1MDUxNzM2 * MzVaFw0zMDA1MDMxNzM2MzVaMIGSMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2Fs * aWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEZMBcGA1UECgwQR2l0SHVi * LCBJbmMuMRkwFwYDVQQLDBBHb3Zlcm5tZW50IFRlYW0xGTAXBgNVBAMMEGdvdnN0 * YWNrLmdpdGh1Yi5pbzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK5P * 4d9qWZPjZ2eA4eYV2Q8Z3Zp4g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * g8e6g8e6g8e6g8e6g8e6AgMBAAGjggEaMIIBFjAdBgNVHQ4EFgQUCneA9H8fC+tC * g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6g8e6 * -----END CERTIFICATE----- * `, * }, * personalizationSettings: { * defaultEndUserMetadata: "{\"example-key\": \"example-value\"}", * }, * }); * ``` * * ## Import * * Agent can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/agents/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Agent can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:diagflow/cxAgent:CxAgent default projects/{{project}}/locations/{{location}}/agents/{{name}} * ``` * * ```sh * $ pulumi import gcp:diagflow/cxAgent:CxAgent default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:diagflow/cxAgent:CxAgent default {{location}}/{{name}} * ``` */ export declare class CxAgent extends pulumi.CustomResource { /** * Get an existing CxAgent 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?: CxAgentState, opts?: pulumi.CustomResourceOptions): CxAgent; /** * Returns true if the given object is an instance of CxAgent. 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 CxAgent; /** * Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level. * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. * Structure is documented below. */ readonly advancedSettings: pulumi.Output; /** * Answer feedback collection settings. * Structure is documented below. */ readonly answerFeedbackSettings: pulumi.Output; /** * The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration. */ readonly avatarUri: pulumi.Output; /** * Settings for custom client certificates. * Structure is documented below. */ readonly clientCertificateSettings: pulumi.Output; /** * The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) * for a list of the currently supported language codes. This field cannot be updated after creation. */ readonly defaultLanguageCode: pulumi.Output; readonly deleteChatEngineOnDestroy: pulumi.Output; /** * The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected. */ readonly description: pulumi.Output; /** * The human-readable name of the agent, unique within the location. */ readonly displayName: pulumi.Output; /** * Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent. */ readonly enableMultiLanguageTraining: pulumi.Output; /** * Indicates if automatic spell correction is enabled in detect intent requests. */ readonly enableSpellCorrection: pulumi.Output; /** * (Optional, Deprecated) * Determines whether this agent should log conversation queries. * * > **Warning:** `enableStackdriverLogging` is deprecated and will be removed in a future major release. Please use `advanced_settings.logging_settings.enable_stackdriver_logging`instead. * * @deprecated `enableStackdriverLogging` is deprecated and will be removed in a future major release. Please use `advanced_settings.logging_settings.enable_stackdriver_logging`instead. */ readonly enableStackdriverLogging: pulumi.Output; /** * Gen App Builder-related agent-level settings. * Structure is documented below. */ readonly genAppBuilderSettings: pulumi.Output; /** * Git integration settings for this agent. * Structure is documented below. */ readonly gitIntegrationSettings: pulumi.Output; /** * The name of the location this agent is located in. * > **Note:** The first time you are deploying an Agent in your project you must configure location settings. * This is a one time step but at the moment you can only [configure location settings](https://cloud.google.com/dialogflow/cx/docs/concept/region#location-settings) via the Dialogflow CX console. * Another options is to use global location so you don't need to manually configure location settings. */ readonly location: pulumi.Output; /** * Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for [agents.restore][]. */ readonly locked: pulumi.Output; /** * The unique identifier of the agent. */ readonly name: pulumi.Output; /** * Settings for end user personalization. * Structure is documented below. */ readonly personalizationSettings: 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 read only boolean field reflecting Zone Isolation status of the agent. */ readonly satisfiesPzi: pulumi.Output; /** * A read only boolean field reflecting Zone Separation status of the agent. */ readonly satisfiesPzs: pulumi.Output; /** * Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/. */ readonly securitySettings: pulumi.Output; /** * Settings related to speech recognition. * Structure is documented below. */ readonly speechToTextSettings: pulumi.Output; /** * Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: projects//locations//agents//flows/. */ readonly startFlow: pulumi.Output; /** * Name of the start playbook in this agent. A start playbook will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: **projects//locations//agents//playbooks/**. Currently only the default playbook with id "00000000-0000-0000-0000-000000000000" is allowed. */ readonly startPlaybook: pulumi.Output; /** * The list of all languages supported by this agent (except for the default_language_code). */ readonly supportedLanguageCodes: pulumi.Output; /** * Settings related to speech synthesizing. * Structure is documented below. */ readonly textToSpeechSettings: pulumi.Output; /** * The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, * Europe/Paris. */ readonly timeZone: pulumi.Output; /** * Create a CxAgent 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: CxAgentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CxAgent resources. */ export interface CxAgentState { /** * Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level. * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. * Structure is documented below. */ advancedSettings?: pulumi.Input; /** * Answer feedback collection settings. * Structure is documented below. */ answerFeedbackSettings?: pulumi.Input; /** * The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration. */ avatarUri?: pulumi.Input; /** * Settings for custom client certificates. * Structure is documented below. */ clientCertificateSettings?: pulumi.Input; /** * The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) * for a list of the currently supported language codes. This field cannot be updated after creation. */ defaultLanguageCode?: pulumi.Input; deleteChatEngineOnDestroy?: pulumi.Input; /** * The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: pulumi.Input; /** * The human-readable name of the agent, unique within the location. */ displayName?: pulumi.Input; /** * Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent. */ enableMultiLanguageTraining?: pulumi.Input; /** * Indicates if automatic spell correction is enabled in detect intent requests. */ enableSpellCorrection?: pulumi.Input; /** * (Optional, Deprecated) * Determines whether this agent should log conversation queries. * * > **Warning:** `enableStackdriverLogging` is deprecated and will be removed in a future major release. Please use `advanced_settings.logging_settings.enable_stackdriver_logging`instead. * * @deprecated `enableStackdriverLogging` is deprecated and will be removed in a future major release. Please use `advanced_settings.logging_settings.enable_stackdriver_logging`instead. */ enableStackdriverLogging?: pulumi.Input; /** * Gen App Builder-related agent-level settings. * Structure is documented below. */ genAppBuilderSettings?: pulumi.Input; /** * Git integration settings for this agent. * Structure is documented below. */ gitIntegrationSettings?: pulumi.Input; /** * The name of the location this agent is located in. * > **Note:** The first time you are deploying an Agent in your project you must configure location settings. * This is a one time step but at the moment you can only [configure location settings](https://cloud.google.com/dialogflow/cx/docs/concept/region#location-settings) via the Dialogflow CX console. * Another options is to use global location so you don't need to manually configure location settings. */ location?: pulumi.Input; /** * Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for [agents.restore][]. */ locked?: pulumi.Input; /** * The unique identifier of the agent. */ name?: pulumi.Input; /** * Settings for end user personalization. * Structure is documented below. */ personalizationSettings?: 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 read only boolean field reflecting Zone Isolation status of the agent. */ satisfiesPzi?: pulumi.Input; /** * A read only boolean field reflecting Zone Separation status of the agent. */ satisfiesPzs?: pulumi.Input; /** * Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/. */ securitySettings?: pulumi.Input; /** * Settings related to speech recognition. * Structure is documented below. */ speechToTextSettings?: pulumi.Input; /** * Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: projects//locations//agents//flows/. */ startFlow?: pulumi.Input; /** * Name of the start playbook in this agent. A start playbook will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: **projects//locations//agents//playbooks/**. Currently only the default playbook with id "00000000-0000-0000-0000-000000000000" is allowed. */ startPlaybook?: pulumi.Input; /** * The list of all languages supported by this agent (except for the default_language_code). */ supportedLanguageCodes?: pulumi.Input[]>; /** * Settings related to speech synthesizing. * Structure is documented below. */ textToSpeechSettings?: pulumi.Input; /** * The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, * Europe/Paris. */ timeZone?: pulumi.Input; } /** * The set of arguments for constructing a CxAgent resource. */ export interface CxAgentArgs { /** * Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level. * Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. * Structure is documented below. */ advancedSettings?: pulumi.Input; /** * Answer feedback collection settings. * Structure is documented below. */ answerFeedbackSettings?: pulumi.Input; /** * The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted Web Demo integration. */ avatarUri?: pulumi.Input; /** * Settings for custom client certificates. * Structure is documented below. */ clientCertificateSettings?: pulumi.Input; /** * The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) * for a list of the currently supported language codes. This field cannot be updated after creation. */ defaultLanguageCode: pulumi.Input; deleteChatEngineOnDestroy?: pulumi.Input; /** * The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: pulumi.Input; /** * The human-readable name of the agent, unique within the location. */ displayName: pulumi.Input; /** * Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent. */ enableMultiLanguageTraining?: pulumi.Input; /** * Indicates if automatic spell correction is enabled in detect intent requests. */ enableSpellCorrection?: pulumi.Input; /** * (Optional, Deprecated) * Determines whether this agent should log conversation queries. * * > **Warning:** `enableStackdriverLogging` is deprecated and will be removed in a future major release. Please use `advanced_settings.logging_settings.enable_stackdriver_logging`instead. * * @deprecated `enableStackdriverLogging` is deprecated and will be removed in a future major release. Please use `advanced_settings.logging_settings.enable_stackdriver_logging`instead. */ enableStackdriverLogging?: pulumi.Input; /** * Gen App Builder-related agent-level settings. * Structure is documented below. */ genAppBuilderSettings?: pulumi.Input; /** * Git integration settings for this agent. * Structure is documented below. */ gitIntegrationSettings?: pulumi.Input; /** * The name of the location this agent is located in. * > **Note:** The first time you are deploying an Agent in your project you must configure location settings. * This is a one time step but at the moment you can only [configure location settings](https://cloud.google.com/dialogflow/cx/docs/concept/region#location-settings) via the Dialogflow CX console. * Another options is to use global location so you don't need to manually configure location settings. */ location: pulumi.Input; /** * Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for [agents.restore][]. */ locked?: pulumi.Input; /** * Settings for end user personalization. * Structure is documented below. */ personalizationSettings?: 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; /** * Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/. */ securitySettings?: pulumi.Input; /** * Settings related to speech recognition. * Structure is documented below. */ speechToTextSettings?: pulumi.Input; /** * Name of the start playbook in this agent. A start playbook will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: **projects//locations//agents//playbooks/**. Currently only the default playbook with id "00000000-0000-0000-0000-000000000000" is allowed. */ startPlaybook?: pulumi.Input; /** * The list of all languages supported by this agent (except for the default_language_code). */ supportedLanguageCodes?: pulumi.Input[]>; /** * Settings related to speech synthesizing. * Structure is documented below. */ textToSpeechSettings?: pulumi.Input; /** * The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, * Europe/Paris. */ timeZone: pulumi.Input; }