CxWebhook

class CxWebhook : KotlinCustomResource

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:

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());
}
}

Import

Webhook can be imported using any of these accepted formats

$ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/webhooks/{{name}}
$ pulumi import gcp:diagflow/cxWebhook:CxWebhook default {{parent}}/{{name}}

Properties

Link copied to clipboard
val disabled: Output<Boolean>?

Indicates whether the webhook is disabled.

Link copied to clipboard
val displayName: Output<String>

The human-readable name of the webhook, unique within the agent.

Link copied to clipboard

Indicates if automatic spell correction is enabled in detect intent requests.

Link copied to clipboard

Determines whether this agent should log conversation queries.

Link copied to clipboard

Configuration for a generic web service. Structure is documented below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The unique identifier of the webhook. Format: projects//locations//agents//webhooks/.

Link copied to clipboard
val parent: Output<String>?

The agent to create a webhook for. Format: projects//locations//agents/.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val securitySettings: Output<String>?

Name of the SecuritySettings reference for the agent. Format: projects//locations//securitySettings/.

Link copied to clipboard

Configuration for a Service Directory service. Structure is documented below.

Link copied to clipboard
val startFlow: Output<String>

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/.

Link copied to clipboard
val timeout: Output<String>?

Webhook execution timeout.

Link copied to clipboard
val urn: Output<String>