Class: AWSCDK::Lex::CfnBotProps

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

Overview

Properties for defining a CfnBot.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data_privacy:, idle_session_ttl_in_seconds:, name:, role_arn:, auto_build_bot_locales: nil, bot_file_s3_location: nil, bot_locales: nil, bot_tags: nil, description: nil, error_log_settings: nil, replication: nil, test_bot_alias_settings: nil, test_bot_alias_tags: nil) ⇒ CfnBotProps

Returns a new instance of CfnBotProps.

Parameters:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lex/cfn_bot_props.rb', line 22

def initialize(data_privacy:, idle_session_ttl_in_seconds:, name:, role_arn:, auto_build_bot_locales: nil, bot_file_s3_location: nil, bot_locales: nil, bot_tags: nil, description: nil, error_log_settings: nil, replication: nil, test_bot_alias_settings: nil, test_bot_alias_tags: nil)
  @data_privacy = data_privacy
  Jsii::Type.check_type(@data_privacy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "dataPrivacy")
  @idle_session_ttl_in_seconds = idle_session_ttl_in_seconds
  Jsii::Type.check_type(@idle_session_ttl_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "idleSessionTtlInSeconds")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "roleArn")
  @auto_build_bot_locales = auto_build_bot_locales
  Jsii::Type.check_type(@auto_build_bot_locales, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoBuildBotLocales") unless @auto_build_bot_locales.nil?
  @bot_file_s3_location = bot_file_s3_location.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::S3LocationProperty.new(**bot_file_s3_location.transform_keys(&:to_sym)) : bot_file_s3_location
  Jsii::Type.check_type(@bot_file_s3_location, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlMzTG9jYXRpb25Qcm9wZXJ0eSJ9XX19")), "botFileS3Location") unless @bot_file_s3_location.nil?
  @bot_locales = bot_locales
  Jsii::Type.check_type(@bot_locales, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdC5Cb3RMb2NhbGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "botLocales") unless @bot_locales.nil?
  @bot_tags = bot_tags.is_a?(Array) ? bot_tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : bot_tags
  Jsii::Type.check_type(@bot_tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "botTags") unless @bot_tags.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @error_log_settings = error_log_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::ErrorLogSettingsProperty.new(**error_log_settings.transform_keys(&:to_sym)) : error_log_settings
  Jsii::Type.check_type(@error_log_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkVycm9yTG9nU2V0dGluZ3NQcm9wZXJ0eSJ9XX19")), "errorLogSettings") unless @error_log_settings.nil?
  @replication = replication.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::ReplicationProperty.new(**replication.transform_keys(&:to_sym)) : replication
  Jsii::Type.check_type(@replication, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlJlcGxpY2F0aW9uUHJvcGVydHkifV19fQ==")), "replication") unless @replication.nil?
  @test_bot_alias_settings = test_bot_alias_settings.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::TestBotAliasSettingsProperty.new(**test_bot_alias_settings.transform_keys(&:to_sym)) : test_bot_alias_settings
  Jsii::Type.check_type(@test_bot_alias_settings, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LlRlc3RCb3RBbGlhc1NldHRpbmdzUHJvcGVydHkifV19fQ==")), "testBotAliasSettings") unless @test_bot_alias_settings.nil?
  @test_bot_alias_tags = test_bot_alias_tags
  Jsii::Type.check_type(@test_bot_alias_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UYWcifV19fSwia2luZCI6ImFycmF5In19XX19")), "testBotAliasTags") unless @test_bot_alias_tags.nil?
end

Instance Attribute Details

#auto_build_bot_localesBoolean, ... (readonly)

Indicates whether Amazon Lex V2 should automatically build the locales for the bot after a change.



81
82
83
# File 'lex/cfn_bot_props.rb', line 81

def auto_build_bot_locales
  @auto_build_bot_locales
end

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

The Amazon S3 location of files used to import a bot.

The files must be in the import format specified in JSON format for importing and exporting in the Amazon Lex developer guide.



88
89
90
# File 'lex/cfn_bot_props.rb', line 88

def bot_file_s3_location
  @bot_file_s3_location
end

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

A list of locales for the bot.



93
94
95
# File 'lex/cfn_bot_props.rb', line 93

def bot_locales
  @bot_locales
end

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

A list of tags to add to the bot.

You can only add tags when you import a bot. You can't use the UpdateBot operation to update tags. To update tags, use the TagResource operation.



100
101
102
# File 'lex/cfn_bot_props.rb', line 100

def bot_tags
  @bot_tags
end

#data_privacyObject (readonly)

By default, data stored by Amazon Lex is encrypted.

The DataPrivacy structure provides settings that determine how Amazon Lex handles special cases of securing the data for your bot.



57
58
59
# File 'lex/cfn_bot_props.rb', line 57

def data_privacy
  @data_privacy
end

#descriptionString? (readonly)

The description of the version.



105
106
107
# File 'lex/cfn_bot_props.rb', line 105

def description
  @description
end

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



108
109
110
# File 'lex/cfn_bot_props.rb', line 108

def error_log_settings
  @error_log_settings
end

#idle_session_ttl_in_secondsNumeric (readonly)

The time, in seconds, that Amazon Lex should keep information about a user's conversation with the bot.

A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Lex deletes any data provided before the timeout.

You can specify between 60 (1 minute) and 86,400 (24 hours) seconds.



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

def idle_session_ttl_in_seconds
  @idle_session_ttl_in_seconds
end

#nameString (readonly)

The name of the bot locale.



71
72
73
# File 'lex/cfn_bot_props.rb', line 71

def name
  @name
end

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



111
112
113
# File 'lex/cfn_bot_props.rb', line 111

def replication
  @replication
end

#role_arnString, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.



76
77
78
# File 'lex/cfn_bot_props.rb', line 76

def role_arn
  @role_arn
end

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

Specifies configuration settings for the alias used to test the bot.

If the TestBotAliasSettings property is not specified, the settings are configured with default values.



118
119
120
# File 'lex/cfn_bot_props.rb', line 118

def test_bot_alias_settings
  @test_bot_alias_settings
end

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

A list of tags to add to the test alias for a bot.

You can only add tags when you import a bot. You can't use the UpdateAlias operation to update tags. To update tags on the test alias, use the TagResource operation.



125
126
127
# File 'lex/cfn_bot_props.rb', line 125

def test_bot_alias_tags
  @test_bot_alias_tags
end

Class Method Details

.jsii_propertiesObject



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lex/cfn_bot_props.rb', line 127

def self.jsii_properties
  {
    :data_privacy => "dataPrivacy",
    :idle_session_ttl_in_seconds => "idleSessionTtlInSeconds",
    :name => "name",
    :role_arn => "roleArn",
    :auto_build_bot_locales => "autoBuildBotLocales",
    :bot_file_s3_location => "botFileS3Location",
    :bot_locales => "botLocales",
    :bot_tags => "botTags",
    :description => "description",
    :error_log_settings => "errorLogSettings",
    :replication => "replication",
    :test_bot_alias_settings => "testBotAliasSettings",
    :test_bot_alias_tags => "testBotAliasTags",
  }
end

Instance Method Details

#to_jsiiObject



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lex/cfn_bot_props.rb', line 145

def to_jsii
  result = {}
  result.merge!({
    "dataPrivacy" => @data_privacy,
    "idleSessionTtlInSeconds" => @idle_session_ttl_in_seconds,
    "name" => @name,
    "roleArn" => @role_arn,
    "autoBuildBotLocales" => @auto_build_bot_locales,
    "botFileS3Location" => @bot_file_s3_location,
    "botLocales" => @bot_locales,
    "botTags" => @bot_tags,
    "description" => @description,
    "errorLogSettings" => @error_log_settings,
    "replication" => @replication,
    "testBotAliasSettings" => @test_bot_alias_settings,
    "testBotAliasTags" => @test_bot_alias_tags,
  })
  result.compact
end