Cx Agent
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:
How-to Guides
Example Usage
Dialogflowcx Agent Full
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.diagflow.CxAgent;
import com.pulumi.gcp.diagflow.CxAgentArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentSpeechToTextSettingsArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentAdvancedSettingsArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentAdvancedSettingsAudioExportGcsDestinationArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentAdvancedSettingsDtmfSettingsArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentGitIntegrationSettingsArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentGitIntegrationSettingsGithubSettingsArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentTextToSpeechSettingsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var bucket = new Bucket("bucket", BucketArgs.builder()
.location("US")
.uniformBucketLevelAccess(true)
.build());
var fullAgent = new CxAgent("fullAgent", CxAgentArgs.builder()
.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(CxAgentSpeechToTextSettingsArgs.builder()
.enableSpeechAdaptation(true)
.build())
.advancedSettings(CxAgentAdvancedSettingsArgs.builder()
.audioExportGcsDestination(CxAgentAdvancedSettingsAudioExportGcsDestinationArgs.builder()
.uri(bucket.url().applyValue(url -> String.format("%s/prefix-", url)))
.build())
.dtmfSettings(CxAgentAdvancedSettingsDtmfSettingsArgs.builder()
.enabled(true)
.maxDigits(1)
.finishDigit("#")
.build())
.build())
.gitIntegrationSettings(CxAgentGitIntegrationSettingsArgs.builder()
.githubSettings(CxAgentGitIntegrationSettingsGithubSettingsArgs.builder()
.displayName("Github Repo")
.repositoryUri("https://api.github.com/repos/githubtraining/hellogitworld")
.trackingBranch("main")
.accessToken("secret-token")
.branches("main")
.build())
.build())
.textToSpeechSettings(CxAgentTextToSpeechSettingsArgs.builder()
.synthesizeSpeechConfigs(serializeJson(
jsonObject(
jsonProperty("en", jsonObject(
jsonProperty("voice", jsonObject(
jsonProperty("name", "en-US-Neural2-A")
))
)),
jsonProperty("fr", jsonObject(
jsonProperty("voice", jsonObject(
jsonProperty("name", "fr-CA-Neural2-A")
))
))
)))
.build())
.build());
}
}Import
Agent can be imported using any of these accepted formats* projects/{{project}}/locations/{{location}}/agents/{{name}} * {{project}}/{{location}}/{{name}} * {{location}}/{{name}} In Terraform v1.5.0 and later, use an import block to import Agent using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/{{location}}/agents/{{name}}" to = google_dialogflow_cx_agent.default }
$ pulumi import gcp:diagflow/cxAgent:CxAgent When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Agent can be imported using one of the formats above. For example$ pulumi import gcp:diagflow/cxAgent:CxAgent default projects/{{project}}/locations/{{location}}/agents/{{name}}$ pulumi import gcp:diagflow/cxAgent:CxAgent default {{project}}/{{location}}/{{name}}$ pulumi import gcp:diagflow/cxAgent:CxAgent default {{location}}/{{name}}Properties
The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes. This field cannot be updated after creation.
The time zone of this agent from the time zone database, e.g., America/New_York, Europe/Paris.