gcp logo
Google Cloud Classic v6.52.0, Mar 22 23

gcp.diagflow.EntityType

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

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var basicAgent = new Gcp.Diagflow.Agent("basicAgent", new()
    {
        DisplayName = "example_agent",
        DefaultLanguageCode = "en",
        TimeZone = "America/New_York",
    });

    var basicEntityType = new Gcp.Diagflow.EntityType("basicEntityType", 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 = new[]
        {
            basicAgent,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/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, "basicAgent", &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, "basicEntityType", &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());

    }
}
import pulumi
import pulumi_gcp as gcp

basic_agent = gcp.diagflow.Agent("basicAgent",
    display_name="example_agent",
    default_language_code="en",
    time_zone="America/New_York")
basic_entity_type = gcp.diagflow.EntityType("basicEntityType",
    display_name="",
    kind="KIND_MAP",
    entities=[
        gcp.diagflow.EntityTypeEntityArgs(
            value="value1",
            synonyms=[
                "synonym1",
                "synonym2",
            ],
        ),
        gcp.diagflow.EntityTypeEntityArgs(
            value="value2",
            synonyms=[
                "synonym3",
                "synonym4",
            ],
        ),
    ],
    opts=pulumi.ResourceOptions(depends_on=[basic_agent]))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const basicAgent = new gcp.diagflow.Agent("basicAgent", {
    displayName: "example_agent",
    defaultLanguageCode: "en",
    timeZone: "America/New_York",
});
const basicEntityType = new gcp.diagflow.EntityType("basicEntityType", {
    displayName: "",
    kind: "KIND_MAP",
    entities: [
        {
            value: "value1",
            synonyms: [
                "synonym1",
                "synonym2",
            ],
        },
        {
            value: "value2",
            synonyms: [
                "synonym3",
                "synonym4",
            ],
        },
    ],
}, {
    dependsOn: [basicAgent],
});
resources:
  basicAgent:
    type: gcp:diagflow:Agent
    properties:
      displayName: example_agent
      defaultLanguageCode: en
      timeZone: America/New_York
  basicEntityType:
    type: gcp:diagflow:EntityType
    properties:
      displayName:
      kind: KIND_MAP
      entities:
        - value: value1
          synonyms:
            - synonym1
            - synonym2
        - value: value2
          synonyms:
            - synonym3
            - synonym4
    options:
      dependson:
        - ${basicAgent}

Create EntityType Resource

new EntityType(name: string, args: EntityTypeArgs, opts?: CustomResourceOptions);
@overload
def EntityType(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               display_name: Optional[str] = None,
               enable_fuzzy_extraction: Optional[bool] = None,
               entities: Optional[Sequence[EntityTypeEntityArgs]] = None,
               kind: Optional[str] = None,
               project: Optional[str] = None)
@overload
def EntityType(resource_name: str,
               args: EntityTypeArgs,
               opts: Optional[ResourceOptions] = None)
func NewEntityType(ctx *Context, name string, args EntityTypeArgs, opts ...ResourceOption) (*EntityType, error)
public EntityType(string name, EntityTypeArgs args, CustomResourceOptions? opts = null)
public EntityType(String name, EntityTypeArgs args)
public EntityType(String name, EntityTypeArgs args, CustomResourceOptions options)
type: gcp:diagflow:EntityType
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EntityTypeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EntityTypeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EntityTypeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EntityTypeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EntityTypeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EntityType Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The EntityType resource accepts the following input properties:

DisplayName string

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

Kind string

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
EnableFuzzyExtraction bool

Enables fuzzy entity extraction during classification.

Entities List<EntityTypeEntityArgs>

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

Project string

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

DisplayName string

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

Kind string

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
EnableFuzzyExtraction bool

Enables fuzzy entity extraction during classification.

Entities []EntityTypeEntityArgs

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

Project string

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

displayName String

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

kind String

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
enableFuzzyExtraction Boolean

Enables fuzzy entity extraction during classification.

entities List<EntityTypeEntityArgs>

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

project String

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

displayName string

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

kind string

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
enableFuzzyExtraction boolean

Enables fuzzy entity extraction during classification.

entities EntityTypeEntityArgs[]

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

project string

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

display_name str

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

kind str

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
enable_fuzzy_extraction bool

Enables fuzzy entity extraction during classification.

entities Sequence[EntityTypeEntityArgs]

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

project str

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

displayName String

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

kind String

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
enableFuzzyExtraction Boolean

Enables fuzzy entity extraction during classification.

entities List<Property Map>

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

project String

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

Outputs

All input properties are implicitly available as output properties. Additionally, the EntityType resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

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

Id string

The provider-assigned unique ID for this managed resource.

Name string

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

id String

The provider-assigned unique ID for this managed resource.

name String

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

id string

The provider-assigned unique ID for this managed resource.

name string

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

id str

The provider-assigned unique ID for this managed resource.

name str

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

id String

The provider-assigned unique ID for this managed resource.

name String

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

Look up Existing EntityType Resource

Get an existing EntityType resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EntityTypeState, opts?: CustomResourceOptions): EntityType
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        display_name: Optional[str] = None,
        enable_fuzzy_extraction: Optional[bool] = None,
        entities: Optional[Sequence[EntityTypeEntityArgs]] = None,
        kind: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None) -> EntityType
func GetEntityType(ctx *Context, name string, id IDInput, state *EntityTypeState, opts ...ResourceOption) (*EntityType, error)
public static EntityType Get(string name, Input<string> id, EntityTypeState? state, CustomResourceOptions? opts = null)
public static EntityType get(String name, Output<String> id, EntityTypeState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DisplayName string

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

EnableFuzzyExtraction bool

Enables fuzzy entity extraction during classification.

Entities List<EntityTypeEntityArgs>

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

Kind string

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
Name string

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

Project string

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

DisplayName string

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

EnableFuzzyExtraction bool

Enables fuzzy entity extraction during classification.

Entities []EntityTypeEntityArgs

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

Kind string

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
Name string

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

Project string

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

displayName String

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

enableFuzzyExtraction Boolean

Enables fuzzy entity extraction during classification.

entities List<EntityTypeEntityArgs>

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

kind String

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
name String

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

project String

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

displayName string

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

enableFuzzyExtraction boolean

Enables fuzzy entity extraction during classification.

entities EntityTypeEntityArgs[]

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

kind string

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
name string

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

project string

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

display_name str

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

enable_fuzzy_extraction bool

Enables fuzzy entity extraction during classification.

entities Sequence[EntityTypeEntityArgs]

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

kind str

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
name str

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

project str

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

displayName String

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

enableFuzzyExtraction Boolean

Enables fuzzy entity extraction during classification.

entities List<Property Map>

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

kind String

Indicates the kind of entity type.

  • KIND_MAP: Map entity types allow mapping of a group of synonyms to a reference value.
  • KIND_LIST: List entity types contain a set of entries that do not map to reference values. However, list entity types can contain references to other entity types (with or without aliases).
  • KIND_REGEXP: Regexp entity types allow to specify regular expressions in entries values. Possible values are KIND_MAP, KIND_LIST, and KIND_REGEXP.
name String

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

project String

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

Supporting Types

EntityTypeEntity

Synonyms List<string>

A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions. For KIND_LIST entity types:

  • This collection must contain exactly one synonym equal to value.
Value string

The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions. For KIND_MAP entity types:

  • A reference value to be used in place of synonyms. For KIND_LIST entity types:
  • A string that can contain references to other entity types (with or without aliases).
Synonyms []string

A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions. For KIND_LIST entity types:

  • This collection must contain exactly one synonym equal to value.
Value string

The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions. For KIND_MAP entity types:

  • A reference value to be used in place of synonyms. For KIND_LIST entity types:
  • A string that can contain references to other entity types (with or without aliases).
synonyms List<String>

A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions. For KIND_LIST entity types:

  • This collection must contain exactly one synonym equal to value.
value String

The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions. For KIND_MAP entity types:

  • A reference value to be used in place of synonyms. For KIND_LIST entity types:
  • A string that can contain references to other entity types (with or without aliases).
synonyms string[]

A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions. For KIND_LIST entity types:

  • This collection must contain exactly one synonym equal to value.
value string

The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions. For KIND_MAP entity types:

  • A reference value to be used in place of synonyms. For KIND_LIST entity types:
  • A string that can contain references to other entity types (with or without aliases).
synonyms Sequence[str]

A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions. For KIND_LIST entity types:

  • This collection must contain exactly one synonym equal to value.
value str

The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions. For KIND_MAP entity types:

  • A reference value to be used in place of synonyms. For KIND_LIST entity types:
  • A string that can contain references to other entity types (with or without aliases).
synonyms List<String>

A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions. For KIND_LIST entity types:

  • This collection must contain exactly one synonym equal to value.
value String

The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions. For KIND_MAP entity types:

  • A reference value to be used in place of synonyms. For KIND_LIST entity types:
  • A string that can contain references to other entity types (with or without aliases).

Import

EntityType can be imported using any of these accepted formats

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

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.