IntentArgs

data class IntentArgs(val action: Output<String>? = null, val defaultResponsePlatforms: Output<List<String>>? = null, val displayName: Output<String>? = null, val events: Output<List<String>>? = null, val inputContextNames: Output<List<String>>? = null, val isFallback: Output<Boolean>? = null, val mlDisabled: Output<Boolean>? = null, val parentFollowupIntentName: Output<String>? = null, val priority: Output<Int>? = null, val project: Output<String>? = null, val resetContexts: Output<Boolean>? = null, val webhookState: Output<String>? = null) : ConvertibleToJava<IntentArgs>

Represents a Dialogflow intent. Intents convert a number of user expressions or patterns into an action. An action is an extraction of a user command or sentence semantics. To get more information about Intent, see:

Example Usage

Dialogflow Intent 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.Intent;
import com.pulumi.gcp.diagflow.IntentArgs;
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 basicIntent = new Intent("basicIntent", IntentArgs.builder()
.displayName("basic-intent")
.build(), CustomResourceOptions.builder()
.dependsOn(basicAgent)
.build());
}
}

Dialogflow Intent Full

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.serviceAccount.Account;
import com.pulumi.gcp.serviceAccount.AccountArgs;
import com.pulumi.gcp.projects.IAMMember;
import com.pulumi.gcp.projects.IAMMemberArgs;
import com.pulumi.gcp.diagflow.Agent;
import com.pulumi.gcp.diagflow.AgentArgs;
import com.pulumi.gcp.diagflow.Intent;
import com.pulumi.gcp.diagflow.IntentArgs;
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 agentProjectProject = new Project("agentProjectProject", ProjectArgs.builder()
.projectId("my-project")
.orgId("123456789")
.build());
var agentProjectService = new Service("agentProjectService", ServiceArgs.builder()
.project(agentProjectProject.projectId())
.service("dialogflow.googleapis.com")
.disableDependentServices(false)
.build());
var dialogflowServiceAccount = new Account("dialogflowServiceAccount", AccountArgs.builder()
.accountId("my-account")
.build());
var agentCreate = new IAMMember("agentCreate", IAMMemberArgs.builder()
.project(agentProjectService.project())
.role("roles/dialogflow.admin")
.member(dialogflowServiceAccount.email().applyValue(email -> String.format("serviceAccount:%s", email)))
.build());
var basicAgent = new Agent("basicAgent", AgentArgs.builder()
.project(agentProjectProject.projectId())
.displayName("example_agent")
.defaultLanguageCode("en")
.timeZone("America/New_York")
.build());
var fullIntent = new Intent("fullIntent", IntentArgs.builder()
.project(agentProjectProject.projectId())
.displayName("full-intent")
.webhookState("WEBHOOK_STATE_ENABLED")
.priority(1)
.isFallback(false)
.mlDisabled(true)
.action("some_action")
.resetContexts(true)
.inputContextNames(agentProjectProject.projectId().applyValue(projectId -> String.format("projects/%s/agent/sessions/-/contexts/some_id", projectId)))
.events("some_event")
.defaultResponsePlatforms(
"FACEBOOK",
"SLACK")
.build(), CustomResourceOptions.builder()
.dependsOn(basicAgent)
.build());
}
}

Import

Intent can be imported using any of these accepted formats:

$ pulumi import gcp:diagflow/intent:Intent default {{name}}

Constructors

Link copied to clipboard
constructor(action: Output<String>? = null, defaultResponsePlatforms: Output<List<String>>? = null, displayName: Output<String>? = null, events: Output<List<String>>? = null, inputContextNames: Output<List<String>>? = null, isFallback: Output<Boolean>? = null, mlDisabled: Output<Boolean>? = null, parentFollowupIntentName: Output<String>? = null, priority: Output<Int>? = null, project: Output<String>? = null, resetContexts: Output<Boolean>? = null, webhookState: Output<String>? = null)

Properties

Link copied to clipboard
val action: Output<String>? = null

The name of the action associated with the intent. Note: The action name must not contain whitespaces.

Link copied to clipboard
val defaultResponsePlatforms: Output<List<String>>? = null

The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). Each value may be one of: FACEBOOK, SLACK, TELEGRAM, KIK, SKYPE, LINE, VIBER, ACTIONS_ON_GOOGLE, GOOGLE_HANGOUTS.

Link copied to clipboard
val displayName: Output<String>? = null

The name of this intent to be displayed on the console.

Link copied to clipboard
val events: Output<List<String>>? = null

The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. See the events reference for more details.

Link copied to clipboard
val inputContextNames: Output<List<String>>? = null

The list of context names required for this intent to be triggered. Format: projects//agent/sessions/-/contexts/.

Link copied to clipboard
val isFallback: Output<Boolean>? = null

Indicates whether this is a fallback intent.

Link copied to clipboard
val mlDisabled: Output<Boolean>? = null

Indicates whether Machine Learning is disabled for the intent. Note: If mlDisabled setting is set to true, then this intent is not taken into account during inference in ML ONLY match mode. Also, auto-markup in the UI is turned off.

Link copied to clipboard
val parentFollowupIntentName: Output<String>? = null

The unique identifier of the parent intent in the chain of followup intents. Format: projects//agent/intents/.

Link copied to clipboard
val priority: Output<Int>? = null

The priority of this intent. Higher numbers represent higher priorities.

Link copied to clipboard
val project: Output<String>? = null

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 resetContexts: Output<Boolean>? = null

Indicates whether to delete all contexts in the current session when this intent is matched.

Link copied to clipboard
val webhookState: Output<String>? = null

Indicates whether webhooks are enabled for the intent.

Functions

Link copied to clipboard
open override fun toJava(): IntentArgs