EntityType

class EntityType : KotlinCustomResource

Represents an entity type. Entity types serve as a tool for extracting parameter values from natural language queries. To get more information about EntityType, see:

Example Usage

Dialogflow Entity Type Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const basicAgent = new gcp.diagflow.Agent("basic_agent", {
displayName: "example_agent",
defaultLanguageCode: "en",
timeZone: "America/New_York",
});
const basicEntityType = new gcp.diagflow.EntityType("basic_entity_type", {
displayName: "",
kind: "KIND_MAP",
entities: [
{
value: "value1",
synonyms: [
"synonym1",
"synonym2",
],
},
{
value: "value2",
synonyms: [
"synonym3",
"synonym4",
],
},
],
}, {
dependsOn: [basicAgent],
});
import pulumi
import pulumi_gcp as gcp
basic_agent = gcp.diagflow.Agent("basic_agent",
display_name="example_agent",
default_language_code="en",
time_zone="America/New_York")
basic_entity_type = gcp.diagflow.EntityType("basic_entity_type",
display_name="",
kind="KIND_MAP",
entities=[
{
"value": "value1",
"synonyms": [
"synonym1",
"synonym2",
],
},
{
"value": "value2",
"synonyms": [
"synonym3",
"synonym4",
],
},
],
opts = pulumi.ResourceOptions(depends_on=[basic_agent]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var basicAgent = new Gcp.Diagflow.Agent("basic_agent", new()
{
DisplayName = "example_agent",
DefaultLanguageCode = "en",
TimeZone = "America/New_York",
});
var basicEntityType = new Gcp.Diagflow.EntityType("basic_entity_type", new()
{
DisplayName = "",
Kind = "KIND_MAP",
Entities = new[]
{
new Gcp.Diagflow.Inputs.EntityTypeEntityArgs
{
Value = "value1",
Synonyms = new[]
{
"synonym1",
"synonym2",
},
},
new Gcp.Diagflow.Inputs.EntityTypeEntityArgs
{
Value = "value2",
Synonyms = new[]
{
"synonym3",
"synonym4",
},
},
},
}, new CustomResourceOptions
{
DependsOn =
{
basicAgent,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/diagflow"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
basicAgent, err := diagflow.NewAgent(ctx, "basic_agent", &diagflow.AgentArgs{
DisplayName: pulumi.String("example_agent"),
DefaultLanguageCode: pulumi.String("en"),
TimeZone: pulumi.String("America/New_York"),
})
if err != nil {
return err
}
_, err = diagflow.NewEntityType(ctx, "basic_entity_type", &diagflow.EntityTypeArgs{
DisplayName: pulumi.String(""),
Kind: pulumi.String("KIND_MAP"),
Entities: diagflow.EntityTypeEntityArray{
&diagflow.EntityTypeEntityArgs{
Value: pulumi.String("value1"),
Synonyms: pulumi.StringArray{
pulumi.String("synonym1"),
pulumi.String("synonym2"),
},
},
&diagflow.EntityTypeEntityArgs{
Value: pulumi.String("value2"),
Synonyms: pulumi.StringArray{
pulumi.String("synonym3"),
pulumi.String("synonym4"),
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
basicAgent,
}))
if err != nil {
return err
}
return nil
})
}
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.EntityType;
import com.pulumi.gcp.diagflow.EntityTypeArgs;
import com.pulumi.gcp.diagflow.inputs.EntityTypeEntityArgs;
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 basicEntityType = new EntityType("basicEntityType", EntityTypeArgs.builder()
.displayName("")
.kind("KIND_MAP")
.entities(
EntityTypeEntityArgs.builder()
.value("value1")
.synonyms(
"synonym1",
"synonym2")
.build(),
EntityTypeEntityArgs.builder()
.value("value2")
.synonyms(
"synonym3",
"synonym4")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(basicAgent)
.build());
}
}
resources:
basicAgent:
type: gcp:diagflow:Agent
name: basic_agent
properties:
displayName: example_agent
defaultLanguageCode: en
timeZone: America/New_York
basicEntityType:
type: gcp:diagflow:EntityType
name: basic_entity_type
properties:
displayName:
kind: KIND_MAP
entities:
- value: value1
synonyms:
- synonym1
- synonym2
- value: value2
synonyms:
- synonym3
- synonym4
options:
dependson:
- ${basicAgent}

Import

EntityType can be imported using any of these accepted formats:

  • {{name}} When using the pulumi import command, EntityType can be imported using one of the formats above. For example:

$ pulumi import gcp:diagflow/entityType:EntityType default {{name}}

Properties

Link copied to clipboard
val displayName: Output<String>

The name of this entity type to be displayed on the console.

Link copied to clipboard

Enables fuzzy entity extraction during classification.

Link copied to clipboard

The collection of entity entries associated with the entity type. Structure is documented below.

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

Indicates the kind of entity type.

Link copied to clipboard
val name: Output<String>

The unique identifier of the entity type. Format: projects//agent/entityTypes/.

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>