Skip to content

googleDialogflowCxVersion

You can create multiple versions of your agent flows and deploy them to separate serving environments. When you edit a flow, you are editing a draft flow. At any point, you can save a draft flow as a flow version. A flow version is an immutable snapshot of your flow data and associated agent data like intents, entities, webhooks, pages, route groups, etc.

To get more information about Version, see:

Example Usage - Dialogflowcx Version Full

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleDialogflowCxAgentAgent =
  new google.dialogflowCxAgent.DialogflowCxAgent(this, "agent", {
    avatar_uri:
      "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
    default_language_code: "en",
    description: "Example description.",
    display_name: "dialogflowcx-agent",
    enable_spell_correction: true,
    enable_stackdriver_logging: true,
    location: "global",
    speech_to_text_settings: [
      {
        enable_speech_adaptation: true,
      },
    ],
    supported_language_codes: ["fr", "de", "es"],
    time_zone: "America/New_York",
  });
new google.dialogflowCxVersion.DialogflowCxVersion(this, "version_1", {
  description: "version 1.0.0",
  display_name: "1.0.0",
  parent: googleDialogflowCxAgentAgent.startFlow,
});

Argument Reference

The following arguments are supported:

  • displayName - (Required) The human-readable name of the version. Limit of 64 characters.

  • description - (Optional) The description of the version. The maximum length is 500 characters. If exceeded, the request is rejected.

  • parent - (Optional) The Flow to create an Version for. Format: projects//locations//agents//flows/.

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format {{parent}}/versions/{{name}}

  • name - Format: projects//locations//agents//flows//versions/. Version ID is a self-increasing number generated by Dialogflow upon version creation.

  • nluSettings - The NLU settings of the flow at version creation. Structure is documented below.

  • createTime - A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

  • state - The state of this version.

    • RUNNING: Version is not ready to serve (e.g. training is running).
    • SUCCEEDED: Training has succeeded and this version is ready to serve.
    • FAILED: Version training failed.

The nluSettings block contains:

  • modelType - (Optional) Indicates the type of NLU model.

    • MODEL_TYPE_STANDARD: Use standard NLU model.
    • MODEL_TYPE_ADVANCED: Use advanced NLU model. Possible values are modelTypeStandard and modelTypeAdvanced.
  • classificationThreshold - (Optional) To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a no-match event will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.

  • modelTrainingMode - (Optional) Indicates NLU model training mode.

    • MODEL_TRAINING_MODE_AUTOMATIC: NLU model training is automatically triggered when a flow gets modified. User can also manually trigger model training in this mode.
    • MODEL_TRAINING_MODE_MANUAL: User needs to manually trigger NLU model training. Best for large flows whose models take long time to train. Possible values are modelTrainingModeAutomatic and modelTrainingModeManual.

Timeouts

This resource provides the following Timeouts configuration options: configuration options:

  • create - Default is 40 minutes.
  • update - Default is 40 minutes.
  • delete - Default is 20 minutes.

Import

Version can be imported using any of these accepted formats:

$ terraform import google_dialogflow_cx_version.default {{parent}}/versions/{{name}}
$ terraform import google_dialogflow_cx_version.default {{parent}}/{{name}}