Class: AWSCDK::Lex::CfnBotAliasProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lex/cfn_bot_alias_props.rb

Overview

Properties for defining a CfnBotAlias.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bot_alias_name:, bot_id:, bot_alias_locale_settings: nil, bot_alias_tags: nil, bot_version: nil, conversation_log_settings: nil, description: nil, sentiment_analysis_settings: nil) ⇒ CfnBotAliasProps

Returns a new instance of CfnBotAliasProps.

Parameters:

  • bot_alias_name (String)

    The name of the bot alias.

  • bot_id (String)

    The unique identifier of the bot.

  • bot_alias_locale_settings (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Lex::CfnBotAlias::BotAliasLocaleSettingsItemProperty>, nil) (defaults to: nil)

    Specifies settings that are unique to a locale.

  • bot_alias_tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.

  • bot_version (String, nil) (defaults to: nil)

    The version of the bot that the bot alias references.

  • conversation_log_settings (AWSCDK::IResolvable, AWSCDK::Lex::CfnBotAlias::ConversationLogSettingsProperty, nil) (defaults to: nil)

    Specifies whether Amazon Lex logs text and audio for conversations with the bot.

  • description (String, nil) (defaults to: nil)

    The description of the bot alias.

  • sentiment_analysis_settings (Object, nil) (defaults to: nil)

    Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lex/cfn_bot_alias_props.rb', line 17

def initialize(bot_alias_name:, bot_id:, bot_alias_locale_settings: nil, bot_alias_tags: nil, bot_version: nil, conversation_log_settings: nil, description: nil, sentiment_analysis_settings: nil)
  @bot_alias_name = bot_alias_name
  Jsii::Type.check_type(@bot_alias_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "botAliasName")
  @bot_id = bot_id
  Jsii::Type.check_type(@bot_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "botId")
  @bot_alias_locale_settings = bot_alias_locale_settings
  Jsii::Type.check_type(@bot_alias_locale_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdEFsaWFzLkJvdEFsaWFzTG9jYWxlU2V0dGluZ3NJdGVtUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "botAliasLocaleSettings") unless @bot_alias_locale_settings.nil?
  @bot_alias_tags = bot_alias_tags.is_a?(Array) ? bot_alias_tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : bot_alias_tags
  Jsii::Type.check_type(@bot_alias_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "botAliasTags") unless @bot_alias_tags.nil?
  @bot_version = bot_version
  Jsii::Type.check_type(@bot_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "botVersion") unless @bot_version.nil?
  @conversation_log_settings = conversation_log_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBotAlias::ConversationLogSettingsProperty.new(**conversation_log_settings.transform_keys(&:to_sym)) : conversation_log_settings
  Jsii::Type.check_type(@conversation_log_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90QWxpYXMuQ29udmVyc2F0aW9uTG9nU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "conversationLogSettings") unless @conversation_log_settings.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @sentiment_analysis_settings = sentiment_analysis_settings
  Jsii::Type.check_type(@sentiment_analysis_settings, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "sentimentAnalysisSettings") unless @sentiment_analysis_settings.nil?
end

Instance Attribute Details

#bot_alias_locale_settingsAWSCDK::IResolvable, ... (readonly)

Specifies settings that are unique to a locale.

For example, you can use different Lambda function depending on the bot's locale.



52
53
54
# File 'lex/cfn_bot_alias_props.rb', line 52

def bot_alias_locale_settings
  @bot_alias_locale_settings
end

#bot_alias_nameString (readonly)

The name of the bot alias.



40
41
42
# File 'lex/cfn_bot_alias_props.rb', line 40

def bot_alias_name
  @bot_alias_name
end

#bot_alias_tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.

You can only add tags when you specify an alias.

For more information, see Tag .



61
62
63
# File 'lex/cfn_bot_alias_props.rb', line 61

def bot_alias_tags
  @bot_alias_tags
end

#bot_idString (readonly)

The unique identifier of the bot.



45
46
47
# File 'lex/cfn_bot_alias_props.rb', line 45

def bot_id
  @bot_id
end

#bot_versionString? (readonly)

The version of the bot that the bot alias references.



66
67
68
# File 'lex/cfn_bot_alias_props.rb', line 66

def bot_version
  @bot_version
end

#conversation_log_settingsAWSCDK::IResolvable, ... (readonly)

Specifies whether Amazon Lex logs text and audio for conversations with the bot.

When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch logs. Audio logs store input in Amazon S3 .



73
74
75
# File 'lex/cfn_bot_alias_props.rb', line 73

def conversation_log_settings
  @conversation_log_settings
end

#descriptionString? (readonly)

The description of the bot alias.



78
79
80
# File 'lex/cfn_bot_alias_props.rb', line 78

def description
  @description
end

#sentiment_analysis_settingsObject? (readonly)

Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.



83
84
85
# File 'lex/cfn_bot_alias_props.rb', line 83

def sentiment_analysis_settings
  @sentiment_analysis_settings
end

Class Method Details

.jsii_propertiesObject



85
86
87
88
89
90
91
92
93
94
95
96
# File 'lex/cfn_bot_alias_props.rb', line 85

def self.jsii_properties
  {
    :bot_alias_name => "botAliasName",
    :bot_id => "botId",
    :bot_alias_locale_settings => "botAliasLocaleSettings",
    :bot_alias_tags => "botAliasTags",
    :bot_version => "botVersion",
    :conversation_log_settings => "conversationLogSettings",
    :description => "description",
    :sentiment_analysis_settings => "sentimentAnalysisSettings",
  }
end

Instance Method Details

#to_jsiiObject



98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lex/cfn_bot_alias_props.rb', line 98

def to_jsii
  result = {}
  result.merge!({
    "botAliasName" => @bot_alias_name,
    "botId" => @bot_id,
    "botAliasLocaleSettings" => @bot_alias_locale_settings,
    "botAliasTags" => @bot_alias_tags,
    "botVersion" => @bot_version,
    "conversationLogSettings" => @conversation_log_settings,
    "description" => @description,
    "sentimentAnalysisSettings" => @sentiment_analysis_settings,
  })
  result.compact
end