Google Cloud (GCP) Classic

v6.43.0 published on Tuesday, Nov 15, 2022 by Pulumi

CxIntent

An intent represents a user’s intent to interact with a conversational agent.

To get more information about Intent, see:

Example Usage

Dialogflowcx Intent Full

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

return await Deployment.RunAsync(() => 
{
    var agent = new Gcp.Diagflow.CxAgent("agent", new()
    {
        DisplayName = "dialogflowcx-agent",
        Location = "global",
        DefaultLanguageCode = "en",
        SupportedLanguageCodes = new[]
        {
            "fr",
            "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 = new Gcp.Diagflow.Inputs.CxAgentSpeechToTextSettingsArgs
        {
            EnableSpeechAdaptation = true,
        },
    });

    var basicIntent = new Gcp.Diagflow.CxIntent("basicIntent", new()
    {
        Parent = agent.Id,
        DisplayName = "Example",
        Priority = 1,
        Description = "Intent example",
        TrainingPhrases = new[]
        {
            new Gcp.Diagflow.Inputs.CxIntentTrainingPhraseArgs
            {
                Parts = new[]
                {
                    new Gcp.Diagflow.Inputs.CxIntentTrainingPhrasePartArgs
                    {
                        Text = "training",
                    },
                    new Gcp.Diagflow.Inputs.CxIntentTrainingPhrasePartArgs
                    {
                        Text = "phrase",
                    },
                    new Gcp.Diagflow.Inputs.CxIntentTrainingPhrasePartArgs
                    {
                        Text = "example",
                    },
                },
                RepeatCount = 1,
            },
        },
        Parameters = new[]
        {
            new Gcp.Diagflow.Inputs.CxIntentParameterArgs
            {
                Id = "param1",
                EntityType = "projects/-/locations/-/agents/-/entityTypes/sys.date",
            },
        },
        Labels = 
        {
            { "label1", "value1" },
            { "label2", "value2" },
        },
    });

});
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 {
		agent, err := diagflow.NewCxAgent(ctx, "agent", &diagflow.CxAgentArgs{
			DisplayName:         pulumi.String("dialogflowcx-agent"),
			Location:            pulumi.String("global"),
			DefaultLanguageCode: pulumi.String("en"),
			SupportedLanguageCodes: pulumi.StringArray{
				pulumi.String("fr"),
				pulumi.String("de"),
				pulumi.String("es"),
			},
			TimeZone:                 pulumi.String("America/New_York"),
			Description:              pulumi.String("Example description."),
			AvatarUri:                pulumi.String("https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"),
			EnableStackdriverLogging: pulumi.Bool(true),
			EnableSpellCorrection:    pulumi.Bool(true),
			SpeechToTextSettings: &diagflow.CxAgentSpeechToTextSettingsArgs{
				EnableSpeechAdaptation: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		_, err = diagflow.NewCxIntent(ctx, "basicIntent", &diagflow.CxIntentArgs{
			Parent:      agent.ID(),
			DisplayName: pulumi.String("Example"),
			Priority:    pulumi.Int(1),
			Description: pulumi.String("Intent example"),
			TrainingPhrases: diagflow.CxIntentTrainingPhraseArray{
				&diagflow.CxIntentTrainingPhraseArgs{
					Parts: diagflow.CxIntentTrainingPhrasePartArray{
						&diagflow.CxIntentTrainingPhrasePartArgs{
							Text: pulumi.String("training"),
						},
						&diagflow.CxIntentTrainingPhrasePartArgs{
							Text: pulumi.String("phrase"),
						},
						&diagflow.CxIntentTrainingPhrasePartArgs{
							Text: pulumi.String("example"),
						},
					},
					RepeatCount: pulumi.Int(1),
				},
			},
			Parameters: diagflow.CxIntentParameterArray{
				&diagflow.CxIntentParameterArgs{
					Id:         pulumi.String("param1"),
					EntityType: pulumi.String("projects/-/locations/-/agents/-/entityTypes/sys.date"),
				},
			},
			Labels: pulumi.StringMap{
				"label1": pulumi.String("value1"),
				"label2": pulumi.String("value2"),
			},
		})
		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.CxAgent;
import com.pulumi.gcp.diagflow.CxAgentArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentSpeechToTextSettingsArgs;
import com.pulumi.gcp.diagflow.CxIntent;
import com.pulumi.gcp.diagflow.CxIntentArgs;
import com.pulumi.gcp.diagflow.inputs.CxIntentTrainingPhraseArgs;
import com.pulumi.gcp.diagflow.inputs.CxIntentParameterArgs;
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(            
                "fr",
                "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 basicIntent = new CxIntent("basicIntent", CxIntentArgs.builder()        
            .parent(agent.id())
            .displayName("Example")
            .priority(1)
            .description("Intent example")
            .trainingPhrases(CxIntentTrainingPhraseArgs.builder()
                .parts(                
                    CxIntentTrainingPhrasePartArgs.builder()
                        .text("training")
                        .build(),
                    CxIntentTrainingPhrasePartArgs.builder()
                        .text("phrase")
                        .build(),
                    CxIntentTrainingPhrasePartArgs.builder()
                        .text("example")
                        .build())
                .repeatCount(1)
                .build())
            .parameters(CxIntentParameterArgs.builder()
                .id("param1")
                .entityType("projects/-/locations/-/agents/-/entityTypes/sys.date")
                .build())
            .labels(Map.ofEntries(
                Map.entry("label1", "value1"),
                Map.entry("label2", "value2")
            ))
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

agent = gcp.diagflow.CxAgent("agent",
    display_name="dialogflowcx-agent",
    location="global",
    default_language_code="en",
    supported_language_codes=[
        "fr",
        "de",
        "es",
    ],
    time_zone="America/New_York",
    description="Example description.",
    avatar_uri="https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
    enable_stackdriver_logging=True,
    enable_spell_correction=True,
    speech_to_text_settings=gcp.diagflow.CxAgentSpeechToTextSettingsArgs(
        enable_speech_adaptation=True,
    ))
basic_intent = gcp.diagflow.CxIntent("basicIntent",
    parent=agent.id,
    display_name="Example",
    priority=1,
    description="Intent example",
    training_phrases=[gcp.diagflow.CxIntentTrainingPhraseArgs(
        parts=[
            gcp.diagflow.CxIntentTrainingPhrasePartArgs(
                text="training",
            ),
            gcp.diagflow.CxIntentTrainingPhrasePartArgs(
                text="phrase",
            ),
            gcp.diagflow.CxIntentTrainingPhrasePartArgs(
                text="example",
            ),
        ],
        repeat_count=1,
    )],
    parameters=[gcp.diagflow.CxIntentParameterArgs(
        id="param1",
        entity_type="projects/-/locations/-/agents/-/entityTypes/sys.date",
    )],
    labels={
        "label1": "value1",
        "label2": "value2",
    })
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const agent = new gcp.diagflow.CxAgent("agent", {
    displayName: "dialogflowcx-agent",
    location: "global",
    defaultLanguageCode: "en",
    supportedLanguageCodes: [
        "fr",
        "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: {
        enableSpeechAdaptation: true,
    },
});
const basicIntent = new gcp.diagflow.CxIntent("basicIntent", {
    parent: agent.id,
    displayName: "Example",
    priority: 1,
    description: "Intent example",
    trainingPhrases: [{
        parts: [
            {
                text: "training",
            },
            {
                text: "phrase",
            },
            {
                text: "example",
            },
        ],
        repeatCount: 1,
    }],
    parameters: [{
        id: "param1",
        entityType: "projects/-/locations/-/agents/-/entityTypes/sys.date",
    }],
    labels: {
        label1: "value1",
        label2: "value2",
    },
});
resources:
  agent:
    type: gcp:diagflow:CxAgent
    properties:
      displayName: dialogflowcx-agent
      location: global
      defaultLanguageCode: en
      supportedLanguageCodes:
        - fr
        - 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:
        enableSpeechAdaptation: true
  basicIntent:
    type: gcp:diagflow:CxIntent
    properties:
      parent: ${agent.id}
      displayName: Example
      priority: 1
      description: Intent example
      trainingPhrases:
        - parts:
            - text: training
            - text: phrase
            - text: example
          repeatCount: 1
      parameters:
        - id: param1
          entityType: projects/-/locations/-/agents/-/entityTypes/sys.date
      labels:
        label1: value1
        label2: value2

Create CxIntent Resource

new CxIntent(name: string, args: CxIntentArgs, opts?: CustomResourceOptions);
@overload
def CxIntent(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             description: Optional[str] = None,
             display_name: Optional[str] = None,
             is_fallback: Optional[bool] = None,
             labels: Optional[Mapping[str, str]] = None,
             language_code: Optional[str] = None,
             parameters: Optional[Sequence[CxIntentParameterArgs]] = None,
             parent: Optional[str] = None,
             priority: Optional[int] = None,
             training_phrases: Optional[Sequence[CxIntentTrainingPhraseArgs]] = None)
@overload
def CxIntent(resource_name: str,
             args: CxIntentArgs,
             opts: Optional[ResourceOptions] = None)
func NewCxIntent(ctx *Context, name string, args CxIntentArgs, opts ...ResourceOption) (*CxIntent, error)
public CxIntent(string name, CxIntentArgs args, CustomResourceOptions? opts = null)
public CxIntent(String name, CxIntentArgs args)
public CxIntent(String name, CxIntentArgs args, CustomResourceOptions options)
type: gcp:diagflow:CxIntent
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CxIntentArgs
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 CxIntentArgs
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 CxIntentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CxIntentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CxIntentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CxIntent 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 CxIntent resource accepts the following input properties:

DisplayName string

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

Description string

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

IsFallback bool

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

Labels Dictionary<string, string>

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

LanguageCode string

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

Parameters List<CxIntentParameterArgs>

The collection of parameters associated with the intent. Structure is documented below.

Parent string

The agent to create an intent for. Format: projects//locations//agents/.

Priority int

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

TrainingPhrases List<CxIntentTrainingPhraseArgs>

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

DisplayName string

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

Description string

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

IsFallback bool

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

Labels map[string]string

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

LanguageCode string

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

Parameters []CxIntentParameterArgs

The collection of parameters associated with the intent. Structure is documented below.

Parent string

The agent to create an intent for. Format: projects//locations//agents/.

Priority int

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

TrainingPhrases []CxIntentTrainingPhraseArgs

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

displayName String

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

description String

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

isFallback Boolean

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels Map<String,String>

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

languageCode String

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

parameters List<CxIntentParameterArgs>

The collection of parameters associated with the intent. Structure is documented below.

parent String

The agent to create an intent for. Format: projects//locations//agents/.

priority Integer

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

trainingPhrases List<CxIntentTrainingPhraseArgs>

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

displayName string

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

description string

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

isFallback boolean

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels {[key: string]: string}

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

languageCode string

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

parameters CxIntentParameterArgs[]

The collection of parameters associated with the intent. Structure is documented below.

parent string

The agent to create an intent for. Format: projects//locations//agents/.

priority number

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

trainingPhrases CxIntentTrainingPhraseArgs[]

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

display_name str

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

description str

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

is_fallback bool

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels Mapping[str, str]

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

language_code str

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

parameters Sequence[CxIntentParameterArgs]

The collection of parameters associated with the intent. Structure is documented below.

parent str

The agent to create an intent for. Format: projects//locations//agents/.

priority int

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

training_phrases Sequence[CxIntentTrainingPhraseArgs]

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

displayName String

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

description String

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

isFallback Boolean

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels Map<String>

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

languageCode String

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

parameters List<Property Map>

The collection of parameters associated with the intent. Structure is documented below.

parent String

The agent to create an intent for. Format: projects//locations//agents/.

priority Number

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

trainingPhrases List<Property Map>

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Name string

The unique identifier of the intent. Format: projects//locations//agents//intents/.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The unique identifier of the intent. Format: projects//locations//agents//intents/.

id String

The provider-assigned unique ID for this managed resource.

name String

The unique identifier of the intent. Format: projects//locations//agents//intents/.

id string

The provider-assigned unique ID for this managed resource.

name string

The unique identifier of the intent. Format: projects//locations//agents//intents/.

id str

The provider-assigned unique ID for this managed resource.

name str

The unique identifier of the intent. Format: projects//locations//agents//intents/.

id String

The provider-assigned unique ID for this managed resource.

name String

The unique identifier of the intent. Format: projects//locations//agents//intents/.

Look up Existing CxIntent Resource

Get an existing CxIntent 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?: CxIntentState, opts?: CustomResourceOptions): CxIntent
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        is_fallback: Optional[bool] = None,
        labels: Optional[Mapping[str, str]] = None,
        language_code: Optional[str] = None,
        name: Optional[str] = None,
        parameters: Optional[Sequence[CxIntentParameterArgs]] = None,
        parent: Optional[str] = None,
        priority: Optional[int] = None,
        training_phrases: Optional[Sequence[CxIntentTrainingPhraseArgs]] = None) -> CxIntent
func GetCxIntent(ctx *Context, name string, id IDInput, state *CxIntentState, opts ...ResourceOption) (*CxIntent, error)
public static CxIntent Get(string name, Input<string> id, CxIntentState? state, CustomResourceOptions? opts = null)
public static CxIntent get(String name, Output<String> id, CxIntentState 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:
Description string

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

DisplayName string

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

IsFallback bool

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

Labels Dictionary<string, string>

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

LanguageCode string

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

Name string

The unique identifier of the intent. Format: projects//locations//agents//intents/.

Parameters List<CxIntentParameterArgs>

The collection of parameters associated with the intent. Structure is documented below.

Parent string

The agent to create an intent for. Format: projects//locations//agents/.

Priority int

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

TrainingPhrases List<CxIntentTrainingPhraseArgs>

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

Description string

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

DisplayName string

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

IsFallback bool

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

Labels map[string]string

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

LanguageCode string

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

Name string

The unique identifier of the intent. Format: projects//locations//agents//intents/.

Parameters []CxIntentParameterArgs

The collection of parameters associated with the intent. Structure is documented below.

Parent string

The agent to create an intent for. Format: projects//locations//agents/.

Priority int

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

TrainingPhrases []CxIntentTrainingPhraseArgs

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

description String

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

displayName String

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

isFallback Boolean

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels Map<String,String>

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

languageCode String

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

name String

The unique identifier of the intent. Format: projects//locations//agents//intents/.

parameters List<CxIntentParameterArgs>

The collection of parameters associated with the intent. Structure is documented below.

parent String

The agent to create an intent for. Format: projects//locations//agents/.

priority Integer

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

trainingPhrases List<CxIntentTrainingPhraseArgs>

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

description string

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

displayName string

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

isFallback boolean

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels {[key: string]: string}

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

languageCode string

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

name string

The unique identifier of the intent. Format: projects//locations//agents//intents/.

parameters CxIntentParameterArgs[]

The collection of parameters associated with the intent. Structure is documented below.

parent string

The agent to create an intent for. Format: projects//locations//agents/.

priority number

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

trainingPhrases CxIntentTrainingPhraseArgs[]

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

description str

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

display_name str

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

is_fallback bool

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels Mapping[str, str]

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

language_code str

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

name str

The unique identifier of the intent. Format: projects//locations//agents//intents/.

parameters Sequence[CxIntentParameterArgs]

The collection of parameters associated with the intent. Structure is documented below.

parent str

The agent to create an intent for. Format: projects//locations//agents/.

priority int

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

training_phrases Sequence[CxIntentTrainingPhraseArgs]

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

description String

Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.

displayName String

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

isFallback Boolean

Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.

labels Map<String>

The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys.contextual" means the intent is a contextual intent. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

languageCode String

The language of the following fields in intent: Intent.training_phrases.parts.text If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.

name String

The unique identifier of the intent. Format: projects//locations//agents//intents/.

parameters List<Property Map>

The collection of parameters associated with the intent. Structure is documented below.

parent String

The agent to create an intent for. Format: projects//locations//agents/.

priority Number

The priority of this intent. Higher numbers represent higher priorities. If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. If the supplied value is negative, the intent is ignored in runtime detect intent requests.

trainingPhrases List<Property Map>

The collection of training phrases the agent is trained on to identify the intent. Structure is documented below.

Supporting Types

CxIntentParameter

EntityType string

The entity type of the parameter. Format: projects/-/locations/-/agents/-/entityTypes/ for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects//locations//agents//entityTypes/ for developer entity types.

Id string

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

IsList bool

Indicates whether the parameter represents a list of values.

Redact bool

Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.

EntityType string

The entity type of the parameter. Format: projects/-/locations/-/agents/-/entityTypes/ for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects//locations//agents//entityTypes/ for developer entity types.

Id string

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

IsList bool

Indicates whether the parameter represents a list of values.

Redact bool

Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.

entityType String

The entity type of the parameter. Format: projects/-/locations/-/agents/-/entityTypes/ for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects//locations//agents//entityTypes/ for developer entity types.

id String

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

isList Boolean

Indicates whether the parameter represents a list of values.

redact Boolean

Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.

entityType string

The entity type of the parameter. Format: projects/-/locations/-/agents/-/entityTypes/ for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects//locations//agents//entityTypes/ for developer entity types.

id string

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

isList boolean

Indicates whether the parameter represents a list of values.

redact boolean

Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.

entity_type str

The entity type of the parameter. Format: projects/-/locations/-/agents/-/entityTypes/ for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects//locations//agents//entityTypes/ for developer entity types.

id str

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

is_list bool

Indicates whether the parameter represents a list of values.

redact bool

Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.

entityType String

The entity type of the parameter. Format: projects/-/locations/-/agents/-/entityTypes/ for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects//locations//agents//entityTypes/ for developer entity types.

id String

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

isList Boolean

Indicates whether the parameter represents a list of values.

redact Boolean

Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.

CxIntentTrainingPhrase

Parts List<CxIntentTrainingPhrasePart>

The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: Part.text is set to a part of the phrase that has no parameters. Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set. Structure is documented below.

Id string

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

RepeatCount int

Indicates how many times this example was added to the intent.

Parts []CxIntentTrainingPhrasePart

The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: Part.text is set to a part of the phrase that has no parameters. Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set. Structure is documented below.

Id string

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

RepeatCount int

Indicates how many times this example was added to the intent.

parts List<CxIntentTrainingPhrasePart>

The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: Part.text is set to a part of the phrase that has no parameters. Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set. Structure is documented below.

id String

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

repeatCount Integer

Indicates how many times this example was added to the intent.

parts CxIntentTrainingPhrasePart[]

The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: Part.text is set to a part of the phrase that has no parameters. Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set. Structure is documented below.

id string

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

repeatCount number

Indicates how many times this example was added to the intent.

parts Sequence[CxIntentTrainingPhrasePart]

The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: Part.text is set to a part of the phrase that has no parameters. Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set. Structure is documented below.

id str

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

repeat_count int

Indicates how many times this example was added to the intent.

parts List<Property Map>

The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: Part.text is set to a part of the phrase that has no parameters. Part.text is set to a part of the phrase that you want to annotate, and the parameterId field is set. Structure is documented below.

id String

The unique identifier of the parameter. This field is used by training phrases to annotate their parts.

repeatCount Number

Indicates how many times this example was added to the intent.

CxIntentTrainingPhrasePart

Text string

The text for this part.

ParameterId string

The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.

Text string

The text for this part.

ParameterId string

The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.

text String

The text for this part.

parameterId String

The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.

text string

The text for this part.

parameterId string

The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.

text str

The text for this part.

parameter_id str

The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.

text String

The text for this part.

parameterId String

The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.

Import

Intent can be imported using any of these accepted formats

 $ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/intents/{{name}}
 $ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/{{name}}

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

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