Cx Webhook Args
data class CxWebhookArgs(val disabled: Output<Boolean>? = null, val displayName: Output<String>? = null, val enableSpellCorrection: Output<Boolean>? = null, val enableStackdriverLogging: Output<Boolean>? = null, val genericWebService: Output<CxWebhookGenericWebServiceArgs>? = null, val parent: Output<String>? = null, val securitySettings: Output<String>? = null, val serviceDirectory: Output<CxWebhookServiceDirectoryArgs>? = null, val timeout: Output<String>? = null) : ConvertibleToJava<CxWebhookArgs>
Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend. To get more information about Webhook, see:
How-to Guides
Example Usage
Dialogflowcx Webhook Full
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.diagflow.CxAgent;
import com.pulumi.gcp.diagflow.CxAgentArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentSpeechToTextSettingsArgs;
import com.pulumi.gcp.diagflow.CxWebhook;
import com.pulumi.gcp.diagflow.CxWebhookArgs;
import com.pulumi.gcp.diagflow.inputs.CxWebhookGenericWebServiceArgs;
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 agent = new CxAgent("agent", CxAgentArgs.builder()
.displayName("dialogflowcx-agent")
.location("global")
.defaultLanguageCode("en")
.supportedLanguageCodes(
"it",
"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())
.build());
var basicWebhook = new CxWebhook("basicWebhook", CxWebhookArgs.builder()
.parent(agent.id())
.displayName("MyFlow")
.genericWebService(CxWebhookGenericWebServiceArgs.builder()
.uri("https://example.com")
.build())
.build());
}
}
Content copied to clipboard
Import
Webhook can be imported using any of these accepted formats
$ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/webhooks/{{name}}
Content copied to clipboard
$ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/{{name}}
Content copied to clipboard
Constructors
Link copied to clipboard
fun CxWebhookArgs(disabled: Output<Boolean>? = null, displayName: Output<String>? = null, enableSpellCorrection: Output<Boolean>? = null, enableStackdriverLogging: Output<Boolean>? = null, genericWebService: Output<CxWebhookGenericWebServiceArgs>? = null, parent: Output<String>? = null, securitySettings: Output<String>? = null, serviceDirectory: Output<CxWebhookServiceDirectoryArgs>? = null, timeout: Output<String>? = null)