Fulfillment

class Fulfillment : KotlinCustomResource

By default, your agent responds to a matched intent with a static response. If you're using one of the integration options, you can provide a more dynamic response by using fulfillment. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. For example, if an end-user wants to schedule a haircut on Friday, your service can check your database and respond to the end-user with availability information for Friday. To get more information about Fulfillment, see:

Example Usage

Dialogflow Fulfillment Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.diagflow.Agent;
import com.pulumi.gcp.diagflow.AgentArgs;
import com.pulumi.gcp.diagflow.Fulfillment;
import com.pulumi.gcp.diagflow.FulfillmentArgs;
import com.pulumi.gcp.diagflow.inputs.FulfillmentGenericWebServiceArgs;
import com.pulumi.resources.CustomResourceOptions;
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 basicAgent = new Agent("basicAgent", AgentArgs.builder()
.displayName("example_agent")
.defaultLanguageCode("en")
.timeZone("America/New_York")
.build());
var basicFulfillment = new Fulfillment("basicFulfillment", FulfillmentArgs.builder()
.displayName("basic-fulfillment")
.enabled(true)
.genericWebService(FulfillmentGenericWebServiceArgs.builder()
.uri("https://google.com")
.username("admin")
.password("password")
.requestHeaders(Map.of("name", "wrench"))
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(basicAgent)
.build());
}
}

Import

Fulfillment can be imported using any of these accepted formats:

$ pulumi import gcp:diagflow/fulfillment:Fulfillment default {{name}}

Properties

Link copied to clipboard
val displayName: Output<String>

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

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

Whether fulfillment is enabled.

Link copied to clipboard

The field defines whether the fulfillment is enabled for certain features. Structure is documented below.

Link copied to clipboard

Represents configuration for a generic web service. Dialogflow supports two mechanisms for authentications: - Basic authentication with username and password. - Authentication with additional authentication headers. 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 fulfillment. Format: projects//agent/fulfillment - projects//locations//agent/fulfillment

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

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