aws-sdk-lexmodelsv2 1.3.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b253026c4990cc2405291342012919dc31d257ab49b2e4174d17de16fb9c495
4
- data.tar.gz: 1f532da8491cffbeb75b02b50f2843bf8a0af8131e295c1975c133d7f2bf87b3
3
+ metadata.gz: fdd8abbfed36bd8d5c712473cd82676a2affb7d5cacd29938a442735be50bf56
4
+ data.tar.gz: be70c3bc25c41eb2f831a246fe2a0ea0d37811afad302b17304de284e43569e8
5
5
  SHA512:
6
- metadata.gz: 348dde856044652c80b0d1ab7a961a4eb530c94564e7b15de27842ddd9a258cacd5405efc2e23db4ddbaaef9bcb3b75bc8ae866bf84d8a5de9a5fa07cfabe872
7
- data.tar.gz: d27a2bbb50e4004b42f0a3f852df563caee482059713d163bdc7d2d338414884afeeaeb9217bb92df71b6188051d0086737a8760aca75ef12f0e33d75a518b92
6
+ metadata.gz: 53dbe1783043447ede2965cc60c271e7130820ba12645ea5fb6844349ae0429c2d519dd9916649517e7cf6985586a7eee7a4c92e5c270afdb763dfabc10db801
7
+ data.tar.gz: a8e3846b71fda94f7fbc99eadc514e81d9d65364e93ff6286b5c780b0243311b5fa9eaa227b48b1d24fdee32000bb3724cb3e668a8f924c6b6dc52f0485c7506
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.7.0 (2021-07-28)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.6.0 (2021-07-27)
10
+ ------------------
11
+
12
+ * Feature - Add waiters that automatically poll for resource status for asynchronous operations, such as building a bot
13
+
14
+ 1.5.0 (2021-06-15)
15
+ ------------------
16
+
17
+ * Feature - This release adds support for Multi Valued slots in Amazon Lex V2 APIs for model building
18
+
19
+ 1.4.0 (2021-05-20)
20
+ ------------------
21
+
22
+ * Feature - Customers can now use resource-based policies to control access to their Lex V2 bots. This release adds APIs to attach and manage permissions for a bot or a bot alias. For details, see: https://docs.aws.amazon.com/lexv2/latest/dg/security_iam_service-with-iam.html
23
+
4
24
  1.3.0 (2021-05-18)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.7.0
@@ -15,6 +15,7 @@ require_relative 'aws-sdk-lexmodelsv2/types'
15
15
  require_relative 'aws-sdk-lexmodelsv2/client_api'
16
16
  require_relative 'aws-sdk-lexmodelsv2/client'
17
17
  require_relative 'aws-sdk-lexmodelsv2/errors'
18
+ require_relative 'aws-sdk-lexmodelsv2/waiters'
18
19
  require_relative 'aws-sdk-lexmodelsv2/resource'
19
20
  require_relative 'aws-sdk-lexmodelsv2/customizations'
20
21
 
@@ -48,6 +49,6 @@ require_relative 'aws-sdk-lexmodelsv2/customizations'
48
49
  # @!group service
49
50
  module Aws::LexModelsV2
50
51
 
51
- GEM_VERSION = '1.3.0'
52
+ GEM_VERSION = '1.7.0'
52
53
 
53
54
  end
@@ -1305,6 +1305,154 @@ module Aws::LexModelsV2
1305
1305
  req.send_request(options)
1306
1306
  end
1307
1307
 
1308
+ # Creates a new resource policy with the specified policy statements.
1309
+ #
1310
+ # @option params [required, String] :resource_arn
1311
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
1312
+ # resource policy is attached to.
1313
+ #
1314
+ # @option params [required, String] :policy
1315
+ # A resource policy to add to the resource. The policy is a JSON
1316
+ # structure that contains one or more statements that define the policy.
1317
+ # The policy must follow the IAM syntax. For more information about the
1318
+ # contents of a JSON policy document, see [ IAM JSON policy reference
1319
+ # ][1].
1320
+ #
1321
+ # If the policy isn't valid, Amazon Lex returns a validation exception.
1322
+ #
1323
+ #
1324
+ #
1325
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1326
+ #
1327
+ # @return [Types::CreateResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1328
+ #
1329
+ # * {Types::CreateResourcePolicyResponse#resource_arn #resource_arn} => String
1330
+ # * {Types::CreateResourcePolicyResponse#revision_id #revision_id} => String
1331
+ #
1332
+ # @example Request syntax with placeholder values
1333
+ #
1334
+ # resp = client.create_resource_policy({
1335
+ # resource_arn: "AmazonResourceName", # required
1336
+ # policy: "Policy", # required
1337
+ # })
1338
+ #
1339
+ # @example Response structure
1340
+ #
1341
+ # resp.resource_arn #=> String
1342
+ # resp.revision_id #=> String
1343
+ #
1344
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicy AWS API Documentation
1345
+ #
1346
+ # @overload create_resource_policy(params = {})
1347
+ # @param [Hash] params ({})
1348
+ def create_resource_policy(params = {}, options = {})
1349
+ req = build_request(:create_resource_policy, params)
1350
+ req.send_request(options)
1351
+ end
1352
+
1353
+ # Adds a new resource policy statement to a bot or bot alias. If a
1354
+ # resource policy exists, the statement is added to the current resource
1355
+ # policy. If a policy doesn't exist, a new policy is created.
1356
+ #
1357
+ # You can't create a resource policy statement that allows
1358
+ # cross-account access.
1359
+ #
1360
+ # @option params [required, String] :resource_arn
1361
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
1362
+ # resource policy is attached to.
1363
+ #
1364
+ # @option params [required, String] :statement_id
1365
+ # The name of the statement. The ID is the same as the `Sid` IAM
1366
+ # property. The statement name must be unique within the policy. For
1367
+ # more information, see [IAM JSON policy elements: Sid][1].
1368
+ #
1369
+ #
1370
+ #
1371
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html
1372
+ #
1373
+ # @option params [required, String] :effect
1374
+ # Determines whether the statement allows or denies access to the
1375
+ # resource.
1376
+ #
1377
+ # @option params [required, Array<Types::Principal>] :principal
1378
+ # An IAM principal, such as an IAM users, IAM roles, or AWS services
1379
+ # that is allowed or denied access to a resource. For more information,
1380
+ # see [AWS JSON policy elements: Principal][1].
1381
+ #
1382
+ #
1383
+ #
1384
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
1385
+ #
1386
+ # @option params [required, Array<String>] :action
1387
+ # The Amazon Lex action that this policy either allows or denies. The
1388
+ # action must apply to the resource type of the specified ARN. For more
1389
+ # information, see [ Actions, resources, and condition keys for Amazon
1390
+ # Lex V2][1].
1391
+ #
1392
+ #
1393
+ #
1394
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlexv2.html
1395
+ #
1396
+ # @option params [Hash<String,Hash>] :condition
1397
+ # Specifies a condition when the policy is in effect. If the principal
1398
+ # of the policy is a service principal, you must provide two condition
1399
+ # blocks, one with a SourceAccount global condition key and one with a
1400
+ # SourceArn global condition key.
1401
+ #
1402
+ # For more information, see [IAM JSON policy elements: Condition ][1].
1403
+ #
1404
+ #
1405
+ #
1406
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html
1407
+ #
1408
+ # @option params [String] :expected_revision_id
1409
+ # The identifier of the revision of the policy to edit. If this revision
1410
+ # ID doesn't match the current revision ID, Amazon Lex throws an
1411
+ # exception.
1412
+ #
1413
+ # If you don't specify a revision, Amazon Lex overwrites the contents
1414
+ # of the policy with the new values.
1415
+ #
1416
+ # @return [Types::CreateResourcePolicyStatementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1417
+ #
1418
+ # * {Types::CreateResourcePolicyStatementResponse#resource_arn #resource_arn} => String
1419
+ # * {Types::CreateResourcePolicyStatementResponse#revision_id #revision_id} => String
1420
+ #
1421
+ # @example Request syntax with placeholder values
1422
+ #
1423
+ # resp = client.create_resource_policy_statement({
1424
+ # resource_arn: "AmazonResourceName", # required
1425
+ # statement_id: "Name", # required
1426
+ # effect: "Allow", # required, accepts Allow, Deny
1427
+ # principal: [ # required
1428
+ # {
1429
+ # service: "ServicePrincipal",
1430
+ # arn: "PrincipalArn",
1431
+ # },
1432
+ # ],
1433
+ # action: ["Operation"], # required
1434
+ # condition: {
1435
+ # "ConditionOperator" => {
1436
+ # "ConditionKey" => "ConditionValue",
1437
+ # },
1438
+ # },
1439
+ # expected_revision_id: "RevisionId",
1440
+ # })
1441
+ #
1442
+ # @example Response structure
1443
+ #
1444
+ # resp.resource_arn #=> String
1445
+ # resp.revision_id #=> String
1446
+ #
1447
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicyStatement AWS API Documentation
1448
+ #
1449
+ # @overload create_resource_policy_statement(params = {})
1450
+ # @param [Hash] params ({})
1451
+ def create_resource_policy_statement(params = {}, options = {})
1452
+ req = build_request(:create_resource_policy_statement, params)
1453
+ req.send_request(options)
1454
+ end
1455
+
1308
1456
  # Creates a slot in an intent. A slot is a variable needed to fulfill an
1309
1457
  # intent. For example, an `OrderPizza` intent might need slots for size,
1310
1458
  # crust, and number of pizzas. For each slot, you define one or more
@@ -1353,6 +1501,15 @@ module Aws::LexModelsV2
1353
1501
  # @option params [required, String] :intent_id
1354
1502
  # The identifier of the intent that contains the slot.
1355
1503
  #
1504
+ # @option params [Types::MultipleValuesSetting] :multiple_values_setting
1505
+ # Indicates whether the slot returns multiple values in one response.
1506
+ # Multi-value slots are only available in the en-US locale. If you set
1507
+ # this value to `true` in any other locale, Amazon Lex throws a
1508
+ # `ValidationException`.
1509
+ #
1510
+ # If the `multipleValuesSetting` is not set, the default value is
1511
+ # `false`.
1512
+ #
1356
1513
  # @return [Types::CreateSlotResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1357
1514
  #
1358
1515
  # * {Types::CreateSlotResponse#slot_id #slot_id} => String
@@ -1366,6 +1523,7 @@ module Aws::LexModelsV2
1366
1523
  # * {Types::CreateSlotResponse#locale_id #locale_id} => String
1367
1524
  # * {Types::CreateSlotResponse#intent_id #intent_id} => String
1368
1525
  # * {Types::CreateSlotResponse#creation_date_time #creation_date_time} => Time
1526
+ # * {Types::CreateSlotResponse#multiple_values_setting #multiple_values_setting} => Types::MultipleValuesSetting
1369
1527
  #
1370
1528
  # @example Request syntax with placeholder values
1371
1529
  #
@@ -1612,6 +1770,9 @@ module Aws::LexModelsV2
1612
1770
  # bot_version: "DraftBotVersion", # required
1613
1771
  # locale_id: "LocaleId", # required
1614
1772
  # intent_id: "Id", # required
1773
+ # multiple_values_setting: {
1774
+ # allow_multiple_values: false,
1775
+ # },
1615
1776
  # })
1616
1777
  #
1617
1778
  # @example Response structure
@@ -1718,6 +1879,7 @@ module Aws::LexModelsV2
1718
1879
  # resp.locale_id #=> String
1719
1880
  # resp.intent_id #=> String
1720
1881
  # resp.creation_date_time #=> Time
1882
+ # resp.multiple_values_setting.allow_multiple_values #=> Boolean
1721
1883
  #
1722
1884
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateSlot AWS API Documentation
1723
1885
  #
@@ -2161,6 +2323,94 @@ module Aws::LexModelsV2
2161
2323
  req.send_request(options)
2162
2324
  end
2163
2325
 
2326
+ # Removes an existing policy from a bot or bot alias. If the resource
2327
+ # doesn't have a policy attached, Amazon Lex returns an exception.
2328
+ #
2329
+ # @option params [required, String] :resource_arn
2330
+ # The Amazon Resource Name (ARN) of the bot or bot alias that has the
2331
+ # resource policy attached.
2332
+ #
2333
+ # @option params [String] :expected_revision_id
2334
+ # The identifier of the revision to edit. If this ID doesn't match the
2335
+ # current revision number, Amazon Lex returns an exception
2336
+ #
2337
+ # If you don't specify a revision ID, Amazon Lex will delete the
2338
+ # current policy.
2339
+ #
2340
+ # @return [Types::DeleteResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2341
+ #
2342
+ # * {Types::DeleteResourcePolicyResponse#resource_arn #resource_arn} => String
2343
+ # * {Types::DeleteResourcePolicyResponse#revision_id #revision_id} => String
2344
+ #
2345
+ # @example Request syntax with placeholder values
2346
+ #
2347
+ # resp = client.delete_resource_policy({
2348
+ # resource_arn: "AmazonResourceName", # required
2349
+ # expected_revision_id: "RevisionId",
2350
+ # })
2351
+ #
2352
+ # @example Response structure
2353
+ #
2354
+ # resp.resource_arn #=> String
2355
+ # resp.revision_id #=> String
2356
+ #
2357
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicy AWS API Documentation
2358
+ #
2359
+ # @overload delete_resource_policy(params = {})
2360
+ # @param [Hash] params ({})
2361
+ def delete_resource_policy(params = {}, options = {})
2362
+ req = build_request(:delete_resource_policy, params)
2363
+ req.send_request(options)
2364
+ end
2365
+
2366
+ # Deletes a policy statement from a resource policy. If you delete the
2367
+ # last statement from a policy, the policy is deleted. If you specify a
2368
+ # statement ID that doesn't exist in the policy, or if the bot or bot
2369
+ # alias doesn't have a policy attached, Amazon Lex returns an
2370
+ # exception.
2371
+ #
2372
+ # @option params [required, String] :resource_arn
2373
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
2374
+ # resource policy is attached to.
2375
+ #
2376
+ # @option params [required, String] :statement_id
2377
+ # The name of the statement (SID) to delete from the policy.
2378
+ #
2379
+ # @option params [String] :expected_revision_id
2380
+ # The identifier of the revision of the policy to delete the statement
2381
+ # from. If this revision ID doesn't match the current revision ID,
2382
+ # Amazon Lex throws an exception.
2383
+ #
2384
+ # If you don't specify a revision, Amazon Lex removes the current
2385
+ # contents of the statement.
2386
+ #
2387
+ # @return [Types::DeleteResourcePolicyStatementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2388
+ #
2389
+ # * {Types::DeleteResourcePolicyStatementResponse#resource_arn #resource_arn} => String
2390
+ # * {Types::DeleteResourcePolicyStatementResponse#revision_id #revision_id} => String
2391
+ #
2392
+ # @example Request syntax with placeholder values
2393
+ #
2394
+ # resp = client.delete_resource_policy_statement({
2395
+ # resource_arn: "AmazonResourceName", # required
2396
+ # statement_id: "Name", # required
2397
+ # expected_revision_id: "RevisionId",
2398
+ # })
2399
+ #
2400
+ # @example Response structure
2401
+ #
2402
+ # resp.resource_arn #=> String
2403
+ # resp.revision_id #=> String
2404
+ #
2405
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyStatement AWS API Documentation
2406
+ #
2407
+ # @overload delete_resource_policy_statement(params = {})
2408
+ # @param [Hash] params ({})
2409
+ def delete_resource_policy_statement(params = {}, options = {})
2410
+ req = build_request(:delete_resource_policy_statement, params)
2411
+ req.send_request(options)
2412
+ end
2413
+
2164
2414
  # Deletes the specified slot from an intent.
2165
2415
  #
2166
2416
  # @option params [required, String] :slot_id
@@ -2291,6 +2541,11 @@ module Aws::LexModelsV2
2291
2541
  # resp.creation_date_time #=> Time
2292
2542
  # resp.last_updated_date_time #=> Time
2293
2543
  #
2544
+ #
2545
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
2546
+ #
2547
+ # * bot_available
2548
+ #
2294
2549
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeBot AWS API Documentation
2295
2550
  #
2296
2551
  # @overload describe_bot(params = {})
@@ -2359,6 +2614,11 @@ module Aws::LexModelsV2
2359
2614
  # resp.creation_date_time #=> Time
2360
2615
  # resp.last_updated_date_time #=> Time
2361
2616
  #
2617
+ #
2618
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
2619
+ #
2620
+ # * bot_alias_available
2621
+ #
2362
2622
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeBotAlias AWS API Documentation
2363
2623
  #
2364
2624
  # @overload describe_bot_alias(params = {})
@@ -2432,6 +2692,13 @@ module Aws::LexModelsV2
2432
2692
  # resp.bot_locale_history_events[0].event #=> String
2433
2693
  # resp.bot_locale_history_events[0].event_date #=> Time
2434
2694
  #
2695
+ #
2696
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
2697
+ #
2698
+ # * bot_locale_built
2699
+ # * bot_locale_created
2700
+ # * bot_locale_express_testing_available
2701
+ #
2435
2702
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeBotLocale AWS API Documentation
2436
2703
  #
2437
2704
  # @overload describe_bot_locale(params = {})
@@ -2484,6 +2751,11 @@ module Aws::LexModelsV2
2484
2751
  # resp.failure_reasons[0] #=> String
2485
2752
  # resp.creation_date_time #=> Time
2486
2753
  #
2754
+ #
2755
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
2756
+ #
2757
+ # * bot_version_available
2758
+ #
2487
2759
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeBotVersion AWS API Documentation
2488
2760
  #
2489
2761
  # @overload describe_bot_version(params = {})
@@ -2531,6 +2803,11 @@ module Aws::LexModelsV2
2531
2803
  # resp.creation_date_time #=> Time
2532
2804
  # resp.last_updated_date_time #=> Time
2533
2805
  #
2806
+ #
2807
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
2808
+ #
2809
+ # * bot_export_completed
2810
+ #
2534
2811
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeExport AWS API Documentation
2535
2812
  #
2536
2813
  # @overload describe_export(params = {})
@@ -2588,6 +2865,11 @@ module Aws::LexModelsV2
2588
2865
  # resp.creation_date_time #=> Time
2589
2866
  # resp.last_updated_date_time #=> Time
2590
2867
  #
2868
+ #
2869
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
2870
+ #
2871
+ # * bot_import_completed
2872
+ #
2591
2873
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeImport AWS API Documentation
2592
2874
  #
2593
2875
  # @overload describe_import(params = {})
@@ -2748,6 +3030,39 @@ module Aws::LexModelsV2
2748
3030
  req.send_request(options)
2749
3031
  end
2750
3032
 
3033
+ # Gets the resource policy and policy revision for a bot or bot alias.
3034
+ #
3035
+ # @option params [required, String] :resource_arn
3036
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
3037
+ # resource policy is attached to.
3038
+ #
3039
+ # @return [Types::DescribeResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3040
+ #
3041
+ # * {Types::DescribeResourcePolicyResponse#resource_arn #resource_arn} => String
3042
+ # * {Types::DescribeResourcePolicyResponse#policy #policy} => String
3043
+ # * {Types::DescribeResourcePolicyResponse#revision_id #revision_id} => String
3044
+ #
3045
+ # @example Request syntax with placeholder values
3046
+ #
3047
+ # resp = client.describe_resource_policy({
3048
+ # resource_arn: "AmazonResourceName", # required
3049
+ # })
3050
+ #
3051
+ # @example Response structure
3052
+ #
3053
+ # resp.resource_arn #=> String
3054
+ # resp.policy #=> String
3055
+ # resp.revision_id #=> String
3056
+ #
3057
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeResourcePolicy AWS API Documentation
3058
+ #
3059
+ # @overload describe_resource_policy(params = {})
3060
+ # @param [Hash] params ({})
3061
+ def describe_resource_policy(params = {}, options = {})
3062
+ req = build_request(:describe_resource_policy, params)
3063
+ req.send_request(options)
3064
+ end
3065
+
2751
3066
  # Gets metadata information about a slot.
2752
3067
  #
2753
3068
  # @option params [required, String] :slot_id
@@ -2785,6 +3100,7 @@ module Aws::LexModelsV2
2785
3100
  # * {Types::DescribeSlotResponse#intent_id #intent_id} => String
2786
3101
  # * {Types::DescribeSlotResponse#creation_date_time #creation_date_time} => Time
2787
3102
  # * {Types::DescribeSlotResponse#last_updated_date_time #last_updated_date_time} => Time
3103
+ # * {Types::DescribeSlotResponse#multiple_values_setting #multiple_values_setting} => Types::MultipleValuesSetting
2788
3104
  #
2789
3105
  # @example Request syntax with placeholder values
2790
3106
  #
@@ -2901,6 +3217,7 @@ module Aws::LexModelsV2
2901
3217
  # resp.intent_id #=> String
2902
3218
  # resp.creation_date_time #=> Time
2903
3219
  # resp.last_updated_date_time #=> Time
3220
+ # resp.multiple_values_setting.allow_multiple_values #=> Boolean
2904
3221
  #
2905
3222
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeSlot AWS API Documentation
2906
3223
  #
@@ -4323,7 +4640,12 @@ module Aws::LexModelsV2
4323
4640
  req.send_request(options)
4324
4641
  end
4325
4642
 
4326
- # Updates the password used to encrypt an export zip archive.
4643
+ # Updates the password used to protect an export zip archive.
4644
+ #
4645
+ # The password is not required. If you don't supply a password, Amazon
4646
+ # Lex generates a zip file that is not protected by a password. This is
4647
+ # the archive that is available at the pre-signed S3 URL provided by the
4648
+ # operation.
4327
4649
  #
4328
4650
  # @option params [required, String] :export_id
4329
4651
  # The unique identifier Amazon Lex assigned to the export.
@@ -4765,6 +5087,62 @@ module Aws::LexModelsV2
4765
5087
  req.send_request(options)
4766
5088
  end
4767
5089
 
5090
+ # Replaces the existing resource policy for a bot or bot alias with a
5091
+ # new one. If the policy doesn't exist, Amazon Lex returns an
5092
+ # exception.
5093
+ #
5094
+ # @option params [required, String] :resource_arn
5095
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
5096
+ # resource policy is attached to.
5097
+ #
5098
+ # @option params [required, String] :policy
5099
+ # A resource policy to add to the resource. The policy is a JSON
5100
+ # structure that contains one or more statements that define the policy.
5101
+ # The policy must follow the IAM syntax. For more information about the
5102
+ # contents of a JSON policy document, see [ IAM JSON policy reference
5103
+ # ][1].
5104
+ #
5105
+ # If the policy isn't valid, Amazon Lex returns a validation exception.
5106
+ #
5107
+ #
5108
+ #
5109
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
5110
+ #
5111
+ # @option params [String] :expected_revision_id
5112
+ # The identifier of the revision of the policy to update. If this
5113
+ # revision ID doesn't match the current revision ID, Amazon Lex throws
5114
+ # an exception.
5115
+ #
5116
+ # If you don't specify a revision, Amazon Lex overwrites the contents
5117
+ # of the policy with the new values.
5118
+ #
5119
+ # @return [Types::UpdateResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5120
+ #
5121
+ # * {Types::UpdateResourcePolicyResponse#resource_arn #resource_arn} => String
5122
+ # * {Types::UpdateResourcePolicyResponse#revision_id #revision_id} => String
5123
+ #
5124
+ # @example Request syntax with placeholder values
5125
+ #
5126
+ # resp = client.update_resource_policy({
5127
+ # resource_arn: "AmazonResourceName", # required
5128
+ # policy: "Policy", # required
5129
+ # expected_revision_id: "RevisionId",
5130
+ # })
5131
+ #
5132
+ # @example Response structure
5133
+ #
5134
+ # resp.resource_arn #=> String
5135
+ # resp.revision_id #=> String
5136
+ #
5137
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/UpdateResourcePolicy AWS API Documentation
5138
+ #
5139
+ # @overload update_resource_policy(params = {})
5140
+ # @param [Hash] params ({})
5141
+ def update_resource_policy(params = {}, options = {})
5142
+ req = build_request(:update_resource_policy, params)
5143
+ req.send_request(options)
5144
+ end
5145
+
4768
5146
  # Updates the settings for a slot.
4769
5147
  #
4770
5148
  # @option params [required, String] :slot_id
@@ -4806,6 +5184,15 @@ module Aws::LexModelsV2
4806
5184
  # @option params [required, String] :intent_id
4807
5185
  # The identifier of the intent that contains the slot.
4808
5186
  #
5187
+ # @option params [Types::MultipleValuesSetting] :multiple_values_setting
5188
+ # Determines whether the slot accepts multiple values in one response.
5189
+ # Multiple value slots are only available in the en-US locale. If you
5190
+ # set this value to `true` in any other locale, Amazon Lex throws a
5191
+ # `ValidationException`.
5192
+ #
5193
+ # If the `multipleValuesSetting` is not set, the default value is
5194
+ # `false`.
5195
+ #
4809
5196
  # @return [Types::UpdateSlotResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4810
5197
  #
4811
5198
  # * {Types::UpdateSlotResponse#slot_id #slot_id} => String
@@ -4820,6 +5207,7 @@ module Aws::LexModelsV2
4820
5207
  # * {Types::UpdateSlotResponse#intent_id #intent_id} => String
4821
5208
  # * {Types::UpdateSlotResponse#creation_date_time #creation_date_time} => Time
4822
5209
  # * {Types::UpdateSlotResponse#last_updated_date_time #last_updated_date_time} => Time
5210
+ # * {Types::UpdateSlotResponse#multiple_values_setting #multiple_values_setting} => Types::MultipleValuesSetting
4823
5211
  #
4824
5212
  # @example Request syntax with placeholder values
4825
5213
  #
@@ -5067,6 +5455,9 @@ module Aws::LexModelsV2
5067
5455
  # bot_version: "DraftBotVersion", # required
5068
5456
  # locale_id: "LocaleId", # required
5069
5457
  # intent_id: "Id", # required
5458
+ # multiple_values_setting: {
5459
+ # allow_multiple_values: false,
5460
+ # },
5070
5461
  # })
5071
5462
  #
5072
5463
  # @example Response structure
@@ -5174,6 +5565,7 @@ module Aws::LexModelsV2
5174
5565
  # resp.intent_id #=> String
5175
5566
  # resp.creation_date_time #=> Time
5176
5567
  # resp.last_updated_date_time #=> Time
5568
+ # resp.multiple_values_setting.allow_multiple_values #=> Boolean
5177
5569
  #
5178
5570
  # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/UpdateSlot AWS API Documentation
5179
5571
  #
@@ -5306,14 +5698,141 @@ module Aws::LexModelsV2
5306
5698
  params: params,
5307
5699
  config: config)
5308
5700
  context[:gem_name] = 'aws-sdk-lexmodelsv2'
5309
- context[:gem_version] = '1.3.0'
5701
+ context[:gem_version] = '1.7.0'
5310
5702
  Seahorse::Client::Request.new(handlers, context)
5311
5703
  end
5312
5704
 
5705
+ # Polls an API operation until a resource enters a desired state.
5706
+ #
5707
+ # ## Basic Usage
5708
+ #
5709
+ # A waiter will call an API operation until:
5710
+ #
5711
+ # * It is successful
5712
+ # * It enters a terminal state
5713
+ # * It makes the maximum number of attempts
5714
+ #
5715
+ # In between attempts, the waiter will sleep.
5716
+ #
5717
+ # # polls in a loop, sleeping between attempts
5718
+ # client.wait_until(waiter_name, params)
5719
+ #
5720
+ # ## Configuration
5721
+ #
5722
+ # You can configure the maximum number of polling attempts, and the
5723
+ # delay (in seconds) between each polling attempt. You can pass
5724
+ # configuration as the final arguments hash.
5725
+ #
5726
+ # # poll for ~25 seconds
5727
+ # client.wait_until(waiter_name, params, {
5728
+ # max_attempts: 5,
5729
+ # delay: 5,
5730
+ # })
5731
+ #
5732
+ # ## Callbacks
5733
+ #
5734
+ # You can be notified before each polling attempt and before each
5735
+ # delay. If you throw `:success` or `:failure` from these callbacks,
5736
+ # it will terminate the waiter.
5737
+ #
5738
+ # started_at = Time.now
5739
+ # client.wait_until(waiter_name, params, {
5740
+ #
5741
+ # # disable max attempts
5742
+ # max_attempts: nil,
5743
+ #
5744
+ # # poll for 1 hour, instead of a number of attempts
5745
+ # before_wait: -> (attempts, response) do
5746
+ # throw :failure if Time.now - started_at > 3600
5747
+ # end
5748
+ # })
5749
+ #
5750
+ # ## Handling Errors
5751
+ #
5752
+ # When a waiter is unsuccessful, it will raise an error.
5753
+ # All of the failure errors extend from
5754
+ # {Aws::Waiters::Errors::WaiterFailed}.
5755
+ #
5756
+ # begin
5757
+ # client.wait_until(...)
5758
+ # rescue Aws::Waiters::Errors::WaiterFailed
5759
+ # # resource did not enter the desired state in time
5760
+ # end
5761
+ #
5762
+ # ## Valid Waiters
5763
+ #
5764
+ # The following table lists the valid waiter names, the operations they call,
5765
+ # and the default `:delay` and `:max_attempts` values.
5766
+ #
5767
+ # | waiter_name | params | :delay | :max_attempts |
5768
+ # | ------------------------------------ | ----------------------------- | -------- | ------------- |
5769
+ # | bot_alias_available | {Client#describe_bot_alias} | 10 | 35 |
5770
+ # | bot_available | {Client#describe_bot} | 10 | 35 |
5771
+ # | bot_export_completed | {Client#describe_export} | 10 | 35 |
5772
+ # | bot_import_completed | {Client#describe_import} | 10 | 35 |
5773
+ # | bot_locale_built | {Client#describe_bot_locale} | 10 | 35 |
5774
+ # | bot_locale_created | {Client#describe_bot_locale} | 10 | 35 |
5775
+ # | bot_locale_express_testing_available | {Client#describe_bot_locale} | 10 | 35 |
5776
+ # | bot_version_available | {Client#describe_bot_version} | 10 | 35 |
5777
+ #
5778
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
5779
+ # because the waiter has entered a state that it will not transition
5780
+ # out of, preventing success.
5781
+ #
5782
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
5783
+ # maximum number of attempts have been made, and the waiter is not
5784
+ # yet successful.
5785
+ #
5786
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
5787
+ # while polling for a resource that is not expected.
5788
+ #
5789
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
5790
+ # for an unknown state.
5791
+ #
5792
+ # @return [Boolean] Returns `true` if the waiter was successful.
5793
+ # @param [Symbol] waiter_name
5794
+ # @param [Hash] params ({})
5795
+ # @param [Hash] options ({})
5796
+ # @option options [Integer] :max_attempts
5797
+ # @option options [Integer] :delay
5798
+ # @option options [Proc] :before_attempt
5799
+ # @option options [Proc] :before_wait
5800
+ def wait_until(waiter_name, params = {}, options = {})
5801
+ w = waiter(waiter_name, options)
5802
+ yield(w.waiter) if block_given? # deprecated
5803
+ w.wait(params)
5804
+ end
5805
+
5313
5806
  # @api private
5314
5807
  # @deprecated
5315
5808
  def waiter_names
5316
- []
5809
+ waiters.keys
5810
+ end
5811
+
5812
+ private
5813
+
5814
+ # @param [Symbol] waiter_name
5815
+ # @param [Hash] options ({})
5816
+ def waiter(waiter_name, options = {})
5817
+ waiter_class = waiters[waiter_name]
5818
+ if waiter_class
5819
+ waiter_class.new(options.merge(client: self))
5820
+ else
5821
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
5822
+ end
5823
+ end
5824
+
5825
+ def waiters
5826
+ {
5827
+ bot_alias_available: Waiters::BotAliasAvailable,
5828
+ bot_available: Waiters::BotAvailable,
5829
+ bot_export_completed: Waiters::BotExportCompleted,
5830
+ bot_import_completed: Waiters::BotImportCompleted,
5831
+ bot_locale_built: Waiters::BotLocaleBuilt,
5832
+ bot_locale_created: Waiters::BotLocaleCreated,
5833
+ bot_locale_express_testing_available: Waiters::BotLocaleExpressTestingAvailable,
5834
+ bot_version_available: Waiters::BotVersionAvailable
5835
+ }
5317
5836
  end
5318
5837
 
5319
5838
  class << self