Class: Aws::LexRuntimeV2::Types::ActiveContext

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

Overview

Note:

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

{
  name: "ActiveContextName", # required
  time_to_live: { # required
    time_to_live_in_seconds: 1, # required
    turns_to_live: 1, # required
  },
  context_attributes: { # required
    "ParameterName" => "Text",
  },
}

Contains information about the contexts that a user is using in a session. You can configure Amazon Lex V2 to set a context when an intent is fulfilled, or you can set a context using the , , or operations.

Use a context to indicate to Amazon Lex V2 intents that should be used as follow-up intents. For example, if the active context is order-fulfilled, only intents that have order-fulfilled configured as a trigger are considered for follow up.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#context_attributesHash<String,String>

A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request.

If you don't specify a list of contexts, Amazon Lex V2 will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared.

Returns:

  • (Hash<String,String>)


71
72
73
74
75
76
77
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 71

class ActiveContext < Struct.new(
  :name,
  :time_to_live,
  :context_attributes)
  SENSITIVE = []
  include Aws::Structure
end

#nameString

The name of the context.

Returns:

  • (String)


71
72
73
74
75
76
77
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 71

class ActiveContext < Struct.new(
  :name,
  :time_to_live,
  :context_attributes)
  SENSITIVE = []
  include Aws::Structure
end

#time_to_liveTypes::ActiveContextTimeToLive

Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context is no longer returned in a response.



71
72
73
74
75
76
77
# File 'gems/aws-sdk-lexruntimev2/lib/aws-sdk-lexruntimev2/types.rb', line 71

class ActiveContext < Struct.new(
  :name,
  :time_to_live,
  :context_attributes)
  SENSITIVE = []
  include Aws::Structure
end