AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Class: Aws::LexModelBuildingService::Types::PutIntentRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb

Overview

Note:

When making an API call, you may pass PutIntentRequest data as a hash:

{
  name: "IntentName", # required
  description: "Description",
  slots: [
    {
      name: "SlotName", # required
      description: "Description",
      slot_constraint: "Required", # required, accepts Required, Optional
      slot_type: "CustomOrBuiltinSlotTypeName",
      slot_type_version: "Version",
      value_elicitation_prompt: {
        messages: [ # required
          {
            content_type: "PlainText", # required, accepts PlainText, SSML, CustomPayload
            content: "ContentString", # required
            group_number: 1,
          },
        ],
        max_attempts: 1, # required
        response_card: "ResponseCard",
      },
      priority: 1,
      sample_utterances: ["Utterance"],
      response_card: "ResponseCard",
      obfuscation_setting: "NONE", # accepts NONE, DEFAULT_OBFUSCATION
      default_value_spec: {
        default_value_list: [ # required
          {
            default_value: "SlotDefaultValueString", # required
          },
        ],
      },
    },
  ],
  sample_utterances: ["Utterance"],
  confirmation_prompt: {
    messages: [ # required
      {
        content_type: "PlainText", # required, accepts PlainText, SSML, CustomPayload
        content: "ContentString", # required
        group_number: 1,
      },
    ],
    max_attempts: 1, # required
    response_card: "ResponseCard",
  },
  rejection_statement: {
    messages: [ # required
      {
        content_type: "PlainText", # required, accepts PlainText, SSML, CustomPayload
        content: "ContentString", # required
        group_number: 1,
      },
    ],
    response_card: "ResponseCard",
  },
  follow_up_prompt: {
    prompt: { # required
      messages: [ # required
        {
          content_type: "PlainText", # required, accepts PlainText, SSML, CustomPayload
          content: "ContentString", # required
          group_number: 1,
        },
      ],
      max_attempts: 1, # required
      response_card: "ResponseCard",
    },
    rejection_statement: { # required
      messages: [ # required
        {
          content_type: "PlainText", # required, accepts PlainText, SSML, CustomPayload
          content: "ContentString", # required
          group_number: 1,
        },
      ],
      response_card: "ResponseCard",
    },
  },
  conclusion_statement: {
    messages: [ # required
      {
        content_type: "PlainText", # required, accepts PlainText, SSML, CustomPayload
        content: "ContentString", # required
        group_number: 1,
      },
    ],
    response_card: "ResponseCard",
  },
  dialog_code_hook: {
    uri: "LambdaARN", # required
    message_version: "MessageVersion", # required
  },
  fulfillment_activity: {
    type: "ReturnIntent", # required, accepts ReturnIntent, CodeHook
    code_hook: {
      uri: "LambdaARN", # required
      message_version: "MessageVersion", # required
    },
  },
  parent_intent_signature: "BuiltinIntentSignature",
  checksum: "String",
  create_version: false,
  kendra_configuration: {
    kendra_index: "KendraIndexArn", # required
    query_filter_string: "QueryFilterString",
    role: "roleArn", # required
  },
  input_contexts: [
    {
      name: "InputContextName", # required
    },
  ],
  output_contexts: [
    {
      name: "OutputContextName", # required
      time_to_live_in_seconds: 1, # required
      turns_to_live: 1, # required
    },
  ],
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#checksumString

Identifies a specific revision of the $LATEST version.

When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception.

When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.

Returns:

  • (String)


4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#conclusion_statementTypes::Statement

The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.

This element is relevant only if you provide a Lambda function in the fulfillmentActivity. If you return the intent to the client application, you can't specify this element.

The followUpPrompt and conclusionStatement are mutually exclusive. You can specify only one.

Returns:



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#confirmation_promptTypes::Prompt

Prompts the user to confirm the intent. This question should have a yes or no answer.

Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.

You you must provide both the rejectionStatement and the confirmationPrompt, or neither.

Returns:



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#create_versionBoolean

When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false.

Returns:

  • (Boolean)


4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#descriptionString

A description of the intent.

Returns:

  • (String)


4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#dialog_code_hookTypes::CodeHook

Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.

For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, GlutenIntolerant, to true. You might find John's phone number and set the corresponding session attribute.

Returns:



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#follow_up_promptTypes::FollowUpPrompt

Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the user to order a drink.

The action that Amazon Lex takes depends on the user's response, as follows:

  • If the user says "Yes" it responds with the clarification prompt that is configured for the bot.

  • if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.

  • If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.

  • If it doesn't recognize the utterance it repeats the follow-up prompt again.

The followUpPrompt field and the conclusionStatement field are mutually exclusive. You can specify only one.



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#fulfillment_activityTypes::FulfillmentActivity

Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, fulfillmentActivity defines how the bot places an order with a local pizza store.

You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#input_contextsArray<Types::InputContext>

An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.

Returns:



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#kendra_configurationTypes::KendraConfiguration

Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#nameString

The name of the intent. The name is not case sensitive.

The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent.

For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.

Returns:

  • (String)


4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#output_contextsArray<Types::OutputContext>

An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.

Returns:



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#parent_intent_signatureString

A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.

Returns:

  • (String)


4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#rejection_statementTypes::Statement

When the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.

You must provide both the rejectionStatement and the confirmationPrompt, or neither.

Returns:



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#sample_utterancesArray<String>

An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize\} pizza", "Order {Quantity\} {PizzaSize\} pizzas".

In each utterance, a slot name is enclosed in curly braces.

Returns:

  • (Array<String>)


4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end

#slotsArray<Types::Slot>

An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.

Returns:



4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'gems/aws-sdk-lexmodelbuildingservice/lib/aws-sdk-lexmodelbuildingservice/types.rb', line 4254

class PutIntentRequest < Struct.new(
  :name,
  :description,
  :slots,
  :sample_utterances,
  :confirmation_prompt,
  :rejection_statement,
  :follow_up_prompt,
  :conclusion_statement,
  :dialog_code_hook,
  :fulfillment_activity,
  :parent_intent_signature,
  :checksum,
  :create_version,
  :kendra_configuration,
  :input_contexts,
  :output_contexts)
  SENSITIVE = []
  include Aws::Structure
end