Class: Aws::LexModelsV2::Types::FulfillmentCodeHookSettings

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

Overview

Note:

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

{
  enabled: false, # required
  post_fulfillment_status_specification: {
    success_response: {
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
    failure_response: {
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
    timeout_response: {
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
    success_next_step: {
      dialog_action: {
        type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
        slot_to_elicit: "Name",
        suppress_next_message: false,
      },
      intent: {
        name: "Name",
        slots: {
          "Name" => {
            shape: "Scalar", # accepts Scalar, List
            value: {
              interpreted_value: "NonEmptyString",
            },
            values: [
              {
                # recursive SlotValueOverride
              },
            ],
          },
        },
      },
      session_attributes: {
        "NonEmptyString" => "String",
      },
    },
    success_conditional: {
      active: false, # required
      conditional_branches: [ # required
        {
          name: "Name", # required
          condition: { # required
            expression_string: "ConditionExpression", # required
          },
          next_step: { # required
            dialog_action: {
              type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
              slot_to_elicit: "Name",
              suppress_next_message: false,
            },
            intent: {
              name: "Name",
              slots: {
                "Name" => {
                  shape: "Scalar", # accepts Scalar, List
                  value: {
                    interpreted_value: "NonEmptyString",
                  },
                  values: [
                    {
                      # recursive SlotValueOverride
                    },
                  ],
                },
              },
            },
            session_attributes: {
              "NonEmptyString" => "String",
            },
          },
          response: {
            message_groups: [ # required
              {
                message: { # required
                  plain_text_message: {
                    value: "PlainTextMessageValue", # required
                  },
                  custom_payload: {
                    value: "CustomPayloadValue", # required
                  },
                  ssml_message: {
                    value: "SSMLMessageValue", # required
                  },
                  image_response_card: {
                    title: "AttachmentTitle", # required
                    subtitle: "AttachmentTitle",
                    image_url: "AttachmentUrl",
                    buttons: [
                      {
                        text: "ButtonText", # required
                        value: "ButtonValue", # required
                      },
                    ],
                  },
                },
                variations: [
                  {
                    plain_text_message: {
                      value: "PlainTextMessageValue", # required
                    },
                    custom_payload: {
                      value: "CustomPayloadValue", # required
                    },
                    ssml_message: {
                      value: "SSMLMessageValue", # required
                    },
                    image_response_card: {
                      title: "AttachmentTitle", # required
                      subtitle: "AttachmentTitle",
                      image_url: "AttachmentUrl",
                      buttons: [
                        {
                          text: "ButtonText", # required
                          value: "ButtonValue", # required
                        },
                      ],
                    },
                  },
                ],
              },
            ],
            allow_interrupt: false,
          },
        },
      ],
      default_branch: { # required
        next_step: {
          dialog_action: {
            type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
            slot_to_elicit: "Name",
            suppress_next_message: false,
          },
          intent: {
            name: "Name",
            slots: {
              "Name" => {
                shape: "Scalar", # accepts Scalar, List
                value: {
                  interpreted_value: "NonEmptyString",
                },
                values: [
                  {
                    # recursive SlotValueOverride
                  },
                ],
              },
            },
          },
          session_attributes: {
            "NonEmptyString" => "String",
          },
        },
        response: {
          message_groups: [ # required
            {
              message: { # required
                plain_text_message: {
                  value: "PlainTextMessageValue", # required
                },
                custom_payload: {
                  value: "CustomPayloadValue", # required
                },
                ssml_message: {
                  value: "SSMLMessageValue", # required
                },
                image_response_card: {
                  title: "AttachmentTitle", # required
                  subtitle: "AttachmentTitle",
                  image_url: "AttachmentUrl",
                  buttons: [
                    {
                      text: "ButtonText", # required
                      value: "ButtonValue", # required
                    },
                  ],
                },
              },
              variations: [
                {
                  plain_text_message: {
                    value: "PlainTextMessageValue", # required
                  },
                  custom_payload: {
                    value: "CustomPayloadValue", # required
                  },
                  ssml_message: {
                    value: "SSMLMessageValue", # required
                  },
                  image_response_card: {
                    title: "AttachmentTitle", # required
                    subtitle: "AttachmentTitle",
                    image_url: "AttachmentUrl",
                    buttons: [
                      {
                        text: "ButtonText", # required
                        value: "ButtonValue", # required
                      },
                    ],
                  },
                },
              ],
            },
          ],
          allow_interrupt: false,
        },
      },
    },
    failure_next_step: {
      dialog_action: {
        type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
        slot_to_elicit: "Name",
        suppress_next_message: false,
      },
      intent: {
        name: "Name",
        slots: {
          "Name" => {
            shape: "Scalar", # accepts Scalar, List
            value: {
              interpreted_value: "NonEmptyString",
            },
            values: [
              {
                # recursive SlotValueOverride
              },
            ],
          },
        },
      },
      session_attributes: {
        "NonEmptyString" => "String",
      },
    },
    failure_conditional: {
      active: false, # required
      conditional_branches: [ # required
        {
          name: "Name", # required
          condition: { # required
            expression_string: "ConditionExpression", # required
          },
          next_step: { # required
            dialog_action: {
              type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
              slot_to_elicit: "Name",
              suppress_next_message: false,
            },
            intent: {
              name: "Name",
              slots: {
                "Name" => {
                  shape: "Scalar", # accepts Scalar, List
                  value: {
                    interpreted_value: "NonEmptyString",
                  },
                  values: [
                    {
                      # recursive SlotValueOverride
                    },
                  ],
                },
              },
            },
            session_attributes: {
              "NonEmptyString" => "String",
            },
          },
          response: {
            message_groups: [ # required
              {
                message: { # required
                  plain_text_message: {
                    value: "PlainTextMessageValue", # required
                  },
                  custom_payload: {
                    value: "CustomPayloadValue", # required
                  },
                  ssml_message: {
                    value: "SSMLMessageValue", # required
                  },
                  image_response_card: {
                    title: "AttachmentTitle", # required
                    subtitle: "AttachmentTitle",
                    image_url: "AttachmentUrl",
                    buttons: [
                      {
                        text: "ButtonText", # required
                        value: "ButtonValue", # required
                      },
                    ],
                  },
                },
                variations: [
                  {
                    plain_text_message: {
                      value: "PlainTextMessageValue", # required
                    },
                    custom_payload: {
                      value: "CustomPayloadValue", # required
                    },
                    ssml_message: {
                      value: "SSMLMessageValue", # required
                    },
                    image_response_card: {
                      title: "AttachmentTitle", # required
                      subtitle: "AttachmentTitle",
                      image_url: "AttachmentUrl",
                      buttons: [
                        {
                          text: "ButtonText", # required
                          value: "ButtonValue", # required
                        },
                      ],
                    },
                  },
                ],
              },
            ],
            allow_interrupt: false,
          },
        },
      ],
      default_branch: { # required
        next_step: {
          dialog_action: {
            type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
            slot_to_elicit: "Name",
            suppress_next_message: false,
          },
          intent: {
            name: "Name",
            slots: {
              "Name" => {
                shape: "Scalar", # accepts Scalar, List
                value: {
                  interpreted_value: "NonEmptyString",
                },
                values: [
                  {
                    # recursive SlotValueOverride
                  },
                ],
              },
            },
          },
          session_attributes: {
            "NonEmptyString" => "String",
          },
        },
        response: {
          message_groups: [ # required
            {
              message: { # required
                plain_text_message: {
                  value: "PlainTextMessageValue", # required
                },
                custom_payload: {
                  value: "CustomPayloadValue", # required
                },
                ssml_message: {
                  value: "SSMLMessageValue", # required
                },
                image_response_card: {
                  title: "AttachmentTitle", # required
                  subtitle: "AttachmentTitle",
                  image_url: "AttachmentUrl",
                  buttons: [
                    {
                      text: "ButtonText", # required
                      value: "ButtonValue", # required
                    },
                  ],
                },
              },
              variations: [
                {
                  plain_text_message: {
                    value: "PlainTextMessageValue", # required
                  },
                  custom_payload: {
                    value: "CustomPayloadValue", # required
                  },
                  ssml_message: {
                    value: "SSMLMessageValue", # required
                  },
                  image_response_card: {
                    title: "AttachmentTitle", # required
                    subtitle: "AttachmentTitle",
                    image_url: "AttachmentUrl",
                    buttons: [
                      {
                        text: "ButtonText", # required
                        value: "ButtonValue", # required
                      },
                    ],
                  },
                },
              ],
            },
          ],
          allow_interrupt: false,
        },
      },
    },
    timeout_next_step: {
      dialog_action: {
        type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
        slot_to_elicit: "Name",
        suppress_next_message: false,
      },
      intent: {
        name: "Name",
        slots: {
          "Name" => {
            shape: "Scalar", # accepts Scalar, List
            value: {
              interpreted_value: "NonEmptyString",
            },
            values: [
              {
                # recursive SlotValueOverride
              },
            ],
          },
        },
      },
      session_attributes: {
        "NonEmptyString" => "String",
      },
    },
    timeout_conditional: {
      active: false, # required
      conditional_branches: [ # required
        {
          name: "Name", # required
          condition: { # required
            expression_string: "ConditionExpression", # required
          },
          next_step: { # required
            dialog_action: {
              type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
              slot_to_elicit: "Name",
              suppress_next_message: false,
            },
            intent: {
              name: "Name",
              slots: {
                "Name" => {
                  shape: "Scalar", # accepts Scalar, List
                  value: {
                    interpreted_value: "NonEmptyString",
                  },
                  values: [
                    {
                      # recursive SlotValueOverride
                    },
                  ],
                },
              },
            },
            session_attributes: {
              "NonEmptyString" => "String",
            },
          },
          response: {
            message_groups: [ # required
              {
                message: { # required
                  plain_text_message: {
                    value: "PlainTextMessageValue", # required
                  },
                  custom_payload: {
                    value: "CustomPayloadValue", # required
                  },
                  ssml_message: {
                    value: "SSMLMessageValue", # required
                  },
                  image_response_card: {
                    title: "AttachmentTitle", # required
                    subtitle: "AttachmentTitle",
                    image_url: "AttachmentUrl",
                    buttons: [
                      {
                        text: "ButtonText", # required
                        value: "ButtonValue", # required
                      },
                    ],
                  },
                },
                variations: [
                  {
                    plain_text_message: {
                      value: "PlainTextMessageValue", # required
                    },
                    custom_payload: {
                      value: "CustomPayloadValue", # required
                    },
                    ssml_message: {
                      value: "SSMLMessageValue", # required
                    },
                    image_response_card: {
                      title: "AttachmentTitle", # required
                      subtitle: "AttachmentTitle",
                      image_url: "AttachmentUrl",
                      buttons: [
                        {
                          text: "ButtonText", # required
                          value: "ButtonValue", # required
                        },
                      ],
                    },
                  },
                ],
              },
            ],
            allow_interrupt: false,
          },
        },
      ],
      default_branch: { # required
        next_step: {
          dialog_action: {
            type: "ElicitIntent", # required, accepts ElicitIntent, StartIntent, ElicitSlot, EvaluateConditional, InvokeDialogCodeHook, ConfirmIntent, FulfillIntent, CloseIntent, EndConversation
            slot_to_elicit: "Name",
            suppress_next_message: false,
          },
          intent: {
            name: "Name",
            slots: {
              "Name" => {
                shape: "Scalar", # accepts Scalar, List
                value: {
                  interpreted_value: "NonEmptyString",
                },
                values: [
                  {
                    # recursive SlotValueOverride
                  },
                ],
              },
            },
          },
          session_attributes: {
            "NonEmptyString" => "String",
          },
        },
        response: {
          message_groups: [ # required
            {
              message: { # required
                plain_text_message: {
                  value: "PlainTextMessageValue", # required
                },
                custom_payload: {
                  value: "CustomPayloadValue", # required
                },
                ssml_message: {
                  value: "SSMLMessageValue", # required
                },
                image_response_card: {
                  title: "AttachmentTitle", # required
                  subtitle: "AttachmentTitle",
                  image_url: "AttachmentUrl",
                  buttons: [
                    {
                      text: "ButtonText", # required
                      value: "ButtonValue", # required
                    },
                  ],
                },
              },
              variations: [
                {
                  plain_text_message: {
                    value: "PlainTextMessageValue", # required
                  },
                  custom_payload: {
                    value: "CustomPayloadValue", # required
                  },
                  ssml_message: {
                    value: "SSMLMessageValue", # required
                  },
                  image_response_card: {
                    title: "AttachmentTitle", # required
                    subtitle: "AttachmentTitle",
                    image_url: "AttachmentUrl",
                    buttons: [
                      {
                        text: "ButtonText", # required
                        value: "ButtonValue", # required
                      },
                    ],
                  },
                },
              ],
            },
          ],
          allow_interrupt: false,
        },
      },
    },
  },
  fulfillment_updates_specification: {
    active: false, # required
    start_response: {
      delay_in_seconds: 1, # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
    update_response: {
      frequency_in_seconds: 1, # required
      message_groups: [ # required
        {
          message: { # required
            plain_text_message: {
              value: "PlainTextMessageValue", # required
            },
            custom_payload: {
              value: "CustomPayloadValue", # required
            },
            ssml_message: {
              value: "SSMLMessageValue", # required
            },
            image_response_card: {
              title: "AttachmentTitle", # required
              subtitle: "AttachmentTitle",
              image_url: "AttachmentUrl",
              buttons: [
                {
                  text: "ButtonText", # required
                  value: "ButtonValue", # required
                },
              ],
            },
          },
          variations: [
            {
              plain_text_message: {
                value: "PlainTextMessageValue", # required
              },
              custom_payload: {
                value: "CustomPayloadValue", # required
              },
              ssml_message: {
                value: "SSMLMessageValue", # required
              },
              image_response_card: {
                title: "AttachmentTitle", # required
                subtitle: "AttachmentTitle",
                image_url: "AttachmentUrl",
                buttons: [
                  {
                    text: "ButtonText", # required
                    value: "ButtonValue", # required
                  },
                ],
              },
            },
          ],
        },
      ],
      allow_interrupt: false,
    },
    timeout_in_seconds: 1,
  },
  active: false,
}

Determines if a Lambda function should be invoked for a specific intent.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#activeBoolean

Determines whether the fulfillment code hook is used. When active is false, the code hook doesn't run.

Returns:

  • (Boolean)


12550
12551
12552
12553
12554
12555
12556
12557
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/types.rb', line 12550

class FulfillmentCodeHookSettings < Struct.new(
  :enabled,
  :post_fulfillment_status_specification,
  :fulfillment_updates_specification,
  :active)
  SENSITIVE = []
  include Aws::Structure
end

#enabledBoolean

Indicates whether a Lambda function should be invoked to fulfill a specific intent.

Returns:

  • (Boolean)


12550
12551
12552
12553
12554
12555
12556
12557
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/types.rb', line 12550

class FulfillmentCodeHookSettings < Struct.new(
  :enabled,
  :post_fulfillment_status_specification,
  :fulfillment_updates_specification,
  :active)
  SENSITIVE = []
  include Aws::Structure
end

#fulfillment_updates_specificationTypes::FulfillmentUpdatesSpecification

Provides settings for update messages sent to the user for long-running Lambda fulfillment functions. Fulfillment updates can be used only with streaming conversations.



12550
12551
12552
12553
12554
12555
12556
12557
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/types.rb', line 12550

class FulfillmentCodeHookSettings < Struct.new(
  :enabled,
  :post_fulfillment_status_specification,
  :fulfillment_updates_specification,
  :active)
  SENSITIVE = []
  include Aws::Structure
end

#post_fulfillment_status_specificationTypes::PostFulfillmentStatusSpecification

Provides settings for messages sent to the user for after the Lambda fulfillment function completes. Post-fulfillment messages can be sent for both streaming and non-streaming conversations.



12550
12551
12552
12553
12554
12555
12556
12557
# File 'gems/aws-sdk-lexmodelsv2/lib/aws-sdk-lexmodelsv2/types.rb', line 12550

class FulfillmentCodeHookSettings < Struct.new(
  :enabled,
  :post_fulfillment_status_specification,
  :fulfillment_updates_specification,
  :active)
  SENSITIVE = []
  include Aws::Structure
end