aws-sdk-lexmodelsv2 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b253026c4990cc2405291342012919dc31d257ab49b2e4174d17de16fb9c495
4
- data.tar.gz: 1f532da8491cffbeb75b02b50f2843bf8a0af8131e295c1975c133d7f2bf87b3
3
+ metadata.gz: dbd5c99d5bfb133ba82cd3ef06fcf3b460659d217b4977a4f22dfb86f0df8ab5
4
+ data.tar.gz: 7c10d9d7a366ca1cd919883e8ccb38c1edbedf38bf5b416173e98377c7e52fd5
5
5
  SHA512:
6
- metadata.gz: 348dde856044652c80b0d1ab7a961a4eb530c94564e7b15de27842ddd9a258cacd5405efc2e23db4ddbaaef9bcb3b75bc8ae866bf84d8a5de9a5fa07cfabe872
7
- data.tar.gz: d27a2bbb50e4004b42f0a3f852df563caee482059713d163bdc7d2d338414884afeeaeb9217bb92df71b6188051d0086737a8760aca75ef12f0e33d75a518b92
6
+ metadata.gz: c99eb903424dff1e76991a0aba3fdda20c3a2d3eb7303e4742f20962733c7f9357f38e833c3ec9f62b49a741a9dc9f5222137ccd07886cec20926f8246d0898c
7
+ data.tar.gz: dc30dd61ddd22cc274dbb59a4b7631e5d7982769d7a0a17246a69c4a3e01afba5b8e3ea9e7d159f2d75193cead2cc7409f1596669d812a122b1c3e20b15914de
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.4.0 (2021-05-20)
5
+ ------------------
6
+
7
+ * 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
8
+
4
9
  1.3.0 (2021-05-18)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.4.0
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-lexmodelsv2/customizations'
48
48
  # @!group service
49
49
  module Aws::LexModelsV2
50
50
 
51
- GEM_VERSION = '1.3.0'
51
+ GEM_VERSION = '1.4.0'
52
52
 
53
53
  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 create a resource policy statement that allows cross-account
1358
+ # 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
@@ -2161,6 +2309,94 @@ module Aws::LexModelsV2
2161
2309
  req.send_request(options)
2162
2310
  end
2163
2311
 
2312
+ # Removes an existing policy from a bot or bot alias. If the resource
2313
+ # doesn't have a policy attached, Amazon Lex returns an exception.
2314
+ #
2315
+ # @option params [required, String] :resource_arn
2316
+ # The Amazon Resource Name (ARN) of the bot or bot alias that has the
2317
+ # resource policy attached.
2318
+ #
2319
+ # @option params [String] :expected_revision_id
2320
+ # The identifier of the revision to edit. If this ID doesn't match the
2321
+ # current revision number, Amazon Lex returns an exception
2322
+ #
2323
+ # If you don't specify a revision ID, Amazon Lex will delete the
2324
+ # current policy.
2325
+ #
2326
+ # @return [Types::DeleteResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2327
+ #
2328
+ # * {Types::DeleteResourcePolicyResponse#resource_arn #resource_arn} => String
2329
+ # * {Types::DeleteResourcePolicyResponse#revision_id #revision_id} => String
2330
+ #
2331
+ # @example Request syntax with placeholder values
2332
+ #
2333
+ # resp = client.delete_resource_policy({
2334
+ # resource_arn: "AmazonResourceName", # required
2335
+ # expected_revision_id: "RevisionId",
2336
+ # })
2337
+ #
2338
+ # @example Response structure
2339
+ #
2340
+ # resp.resource_arn #=> String
2341
+ # resp.revision_id #=> String
2342
+ #
2343
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicy AWS API Documentation
2344
+ #
2345
+ # @overload delete_resource_policy(params = {})
2346
+ # @param [Hash] params ({})
2347
+ def delete_resource_policy(params = {}, options = {})
2348
+ req = build_request(:delete_resource_policy, params)
2349
+ req.send_request(options)
2350
+ end
2351
+
2352
+ # Deletes a policy statement from a resource policy. If you delete the
2353
+ # last statement from a policy, the policy is deleted. If you specify a
2354
+ # statement ID that doesn't exist in the policy, or if the bot or bot
2355
+ # alias doesn't have a policy attached, Amazon Lex returns an
2356
+ # exception.
2357
+ #
2358
+ # @option params [required, String] :resource_arn
2359
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
2360
+ # resource policy is attached to.
2361
+ #
2362
+ # @option params [required, String] :statement_id
2363
+ # The name of the statement (SID) to delete from the policy.
2364
+ #
2365
+ # @option params [String] :expected_revision_id
2366
+ # The identifier of the revision of the policy to delete the statement
2367
+ # from. If this revision ID doesn't match the current revision ID,
2368
+ # Amazon Lex throws an exception.
2369
+ #
2370
+ # If you don't specify a revision, Amazon Lex removes the current
2371
+ # contents of the statement.
2372
+ #
2373
+ # @return [Types::DeleteResourcePolicyStatementResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2374
+ #
2375
+ # * {Types::DeleteResourcePolicyStatementResponse#resource_arn #resource_arn} => String
2376
+ # * {Types::DeleteResourcePolicyStatementResponse#revision_id #revision_id} => String
2377
+ #
2378
+ # @example Request syntax with placeholder values
2379
+ #
2380
+ # resp = client.delete_resource_policy_statement({
2381
+ # resource_arn: "AmazonResourceName", # required
2382
+ # statement_id: "Name", # required
2383
+ # expected_revision_id: "RevisionId",
2384
+ # })
2385
+ #
2386
+ # @example Response structure
2387
+ #
2388
+ # resp.resource_arn #=> String
2389
+ # resp.revision_id #=> String
2390
+ #
2391
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyStatement AWS API Documentation
2392
+ #
2393
+ # @overload delete_resource_policy_statement(params = {})
2394
+ # @param [Hash] params ({})
2395
+ def delete_resource_policy_statement(params = {}, options = {})
2396
+ req = build_request(:delete_resource_policy_statement, params)
2397
+ req.send_request(options)
2398
+ end
2399
+
2164
2400
  # Deletes the specified slot from an intent.
2165
2401
  #
2166
2402
  # @option params [required, String] :slot_id
@@ -2748,6 +2984,39 @@ module Aws::LexModelsV2
2748
2984
  req.send_request(options)
2749
2985
  end
2750
2986
 
2987
+ # Gets the resource policy and policy revision for a bot or bot alias.
2988
+ #
2989
+ # @option params [required, String] :resource_arn
2990
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
2991
+ # resource policy is attached to.
2992
+ #
2993
+ # @return [Types::DescribeResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2994
+ #
2995
+ # * {Types::DescribeResourcePolicyResponse#resource_arn #resource_arn} => String
2996
+ # * {Types::DescribeResourcePolicyResponse#policy #policy} => String
2997
+ # * {Types::DescribeResourcePolicyResponse#revision_id #revision_id} => String
2998
+ #
2999
+ # @example Request syntax with placeholder values
3000
+ #
3001
+ # resp = client.describe_resource_policy({
3002
+ # resource_arn: "AmazonResourceName", # required
3003
+ # })
3004
+ #
3005
+ # @example Response structure
3006
+ #
3007
+ # resp.resource_arn #=> String
3008
+ # resp.policy #=> String
3009
+ # resp.revision_id #=> String
3010
+ #
3011
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeResourcePolicy AWS API Documentation
3012
+ #
3013
+ # @overload describe_resource_policy(params = {})
3014
+ # @param [Hash] params ({})
3015
+ def describe_resource_policy(params = {}, options = {})
3016
+ req = build_request(:describe_resource_policy, params)
3017
+ req.send_request(options)
3018
+ end
3019
+
2751
3020
  # Gets metadata information about a slot.
2752
3021
  #
2753
3022
  # @option params [required, String] :slot_id
@@ -4765,6 +5034,62 @@ module Aws::LexModelsV2
4765
5034
  req.send_request(options)
4766
5035
  end
4767
5036
 
5037
+ # Replaces the existing resource policy for a bot or bot alias with a
5038
+ # new one. If the policy doesn't exist, Amazon Lex returns an
5039
+ # exception.
5040
+ #
5041
+ # @option params [required, String] :resource_arn
5042
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
5043
+ # resource policy is attached to.
5044
+ #
5045
+ # @option params [required, String] :policy
5046
+ # A resource policy to add to the resource. The policy is a JSON
5047
+ # structure that contains one or more statements that define the policy.
5048
+ # The policy must follow the IAM syntax. For more information about the
5049
+ # contents of a JSON policy document, see [ IAM JSON policy reference
5050
+ # ][1].
5051
+ #
5052
+ # If the policy isn't valid, Amazon Lex returns a validation exception.
5053
+ #
5054
+ #
5055
+ #
5056
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
5057
+ #
5058
+ # @option params [String] :expected_revision_id
5059
+ # The identifier of the revision of the policy to update. If this
5060
+ # revision ID doesn't match the current revision ID, Amazon Lex throws
5061
+ # an exception.
5062
+ #
5063
+ # If you don't specify a revision, Amazon Lex overwrites the contents
5064
+ # of the policy with the new values.
5065
+ #
5066
+ # @return [Types::UpdateResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5067
+ #
5068
+ # * {Types::UpdateResourcePolicyResponse#resource_arn #resource_arn} => String
5069
+ # * {Types::UpdateResourcePolicyResponse#revision_id #revision_id} => String
5070
+ #
5071
+ # @example Request syntax with placeholder values
5072
+ #
5073
+ # resp = client.update_resource_policy({
5074
+ # resource_arn: "AmazonResourceName", # required
5075
+ # policy: "Policy", # required
5076
+ # expected_revision_id: "RevisionId",
5077
+ # })
5078
+ #
5079
+ # @example Response structure
5080
+ #
5081
+ # resp.resource_arn #=> String
5082
+ # resp.revision_id #=> String
5083
+ #
5084
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/UpdateResourcePolicy AWS API Documentation
5085
+ #
5086
+ # @overload update_resource_policy(params = {})
5087
+ # @param [Hash] params ({})
5088
+ def update_resource_policy(params = {}, options = {})
5089
+ req = build_request(:update_resource_policy, params)
5090
+ req.send_request(options)
5091
+ end
5092
+
4768
5093
  # Updates the settings for a slot.
4769
5094
  #
4770
5095
  # @option params [required, String] :slot_id
@@ -5306,7 +5631,7 @@ module Aws::LexModelsV2
5306
5631
  params: params,
5307
5632
  config: config)
5308
5633
  context[:gem_name] = 'aws-sdk-lexmodelsv2'
5309
- context[:gem_version] = '1.3.0'
5634
+ context[:gem_version] = '1.4.0'
5310
5635
  Seahorse::Client::Request.new(handlers, context)
5311
5636
  end
5312
5637
 
@@ -82,6 +82,11 @@ module Aws::LexModelsV2
82
82
  CloudWatchLogGroupLogDestination = Shapes::StructureShape.new(name: 'CloudWatchLogGroupLogDestination')
83
83
  CodeHookInterfaceVersion = Shapes::StringShape.new(name: 'CodeHookInterfaceVersion')
84
84
  CodeHookSpecification = Shapes::StructureShape.new(name: 'CodeHookSpecification')
85
+ ConditionKey = Shapes::StringShape.new(name: 'ConditionKey')
86
+ ConditionKeyValueMap = Shapes::MapShape.new(name: 'ConditionKeyValueMap')
87
+ ConditionMap = Shapes::MapShape.new(name: 'ConditionMap')
88
+ ConditionOperator = Shapes::StringShape.new(name: 'ConditionOperator')
89
+ ConditionValue = Shapes::StringShape.new(name: 'ConditionValue')
85
90
  ConfidenceThreshold = Shapes::FloatShape.new(name: 'ConfidenceThreshold')
86
91
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
87
92
  ContextTimeToLiveInSeconds = Shapes::IntegerShape.new(name: 'ContextTimeToLiveInSeconds')
@@ -99,6 +104,10 @@ module Aws::LexModelsV2
99
104
  CreateExportResponse = Shapes::StructureShape.new(name: 'CreateExportResponse')
100
105
  CreateIntentRequest = Shapes::StructureShape.new(name: 'CreateIntentRequest')
101
106
  CreateIntentResponse = Shapes::StructureShape.new(name: 'CreateIntentResponse')
107
+ CreateResourcePolicyRequest = Shapes::StructureShape.new(name: 'CreateResourcePolicyRequest')
108
+ CreateResourcePolicyResponse = Shapes::StructureShape.new(name: 'CreateResourcePolicyResponse')
109
+ CreateResourcePolicyStatementRequest = Shapes::StructureShape.new(name: 'CreateResourcePolicyStatementRequest')
110
+ CreateResourcePolicyStatementResponse = Shapes::StructureShape.new(name: 'CreateResourcePolicyStatementResponse')
102
111
  CreateSlotRequest = Shapes::StructureShape.new(name: 'CreateSlotRequest')
103
112
  CreateSlotResponse = Shapes::StructureShape.new(name: 'CreateSlotResponse')
104
113
  CreateSlotTypeRequest = Shapes::StructureShape.new(name: 'CreateSlotTypeRequest')
@@ -121,6 +130,10 @@ module Aws::LexModelsV2
121
130
  DeleteImportRequest = Shapes::StructureShape.new(name: 'DeleteImportRequest')
122
131
  DeleteImportResponse = Shapes::StructureShape.new(name: 'DeleteImportResponse')
123
132
  DeleteIntentRequest = Shapes::StructureShape.new(name: 'DeleteIntentRequest')
133
+ DeleteResourcePolicyRequest = Shapes::StructureShape.new(name: 'DeleteResourcePolicyRequest')
134
+ DeleteResourcePolicyResponse = Shapes::StructureShape.new(name: 'DeleteResourcePolicyResponse')
135
+ DeleteResourcePolicyStatementRequest = Shapes::StructureShape.new(name: 'DeleteResourcePolicyStatementRequest')
136
+ DeleteResourcePolicyStatementResponse = Shapes::StructureShape.new(name: 'DeleteResourcePolicyStatementResponse')
124
137
  DeleteSlotRequest = Shapes::StructureShape.new(name: 'DeleteSlotRequest')
125
138
  DeleteSlotTypeRequest = Shapes::StructureShape.new(name: 'DeleteSlotTypeRequest')
126
139
  DescribeBotAliasRequest = Shapes::StructureShape.new(name: 'DescribeBotAliasRequest')
@@ -137,6 +150,8 @@ module Aws::LexModelsV2
137
150
  DescribeImportResponse = Shapes::StructureShape.new(name: 'DescribeImportResponse')
138
151
  DescribeIntentRequest = Shapes::StructureShape.new(name: 'DescribeIntentRequest')
139
152
  DescribeIntentResponse = Shapes::StructureShape.new(name: 'DescribeIntentResponse')
153
+ DescribeResourcePolicyRequest = Shapes::StructureShape.new(name: 'DescribeResourcePolicyRequest')
154
+ DescribeResourcePolicyResponse = Shapes::StructureShape.new(name: 'DescribeResourcePolicyResponse')
140
155
  DescribeSlotRequest = Shapes::StructureShape.new(name: 'DescribeSlotRequest')
141
156
  DescribeSlotResponse = Shapes::StructureShape.new(name: 'DescribeSlotResponse')
142
157
  DescribeSlotTypeRequest = Shapes::StructureShape.new(name: 'DescribeSlotTypeRequest')
@@ -144,6 +159,7 @@ module Aws::LexModelsV2
144
159
  Description = Shapes::StringShape.new(name: 'Description')
145
160
  DialogCodeHookSettings = Shapes::StructureShape.new(name: 'DialogCodeHookSettings')
146
161
  DraftBotVersion = Shapes::StringShape.new(name: 'DraftBotVersion')
162
+ Effect = Shapes::StringShape.new(name: 'Effect')
147
163
  ExceptionMessage = Shapes::StringShape.new(name: 'ExceptionMessage')
148
164
  ExportFilter = Shapes::StructureShape.new(name: 'ExportFilter')
149
165
  ExportFilterName = Shapes::StringShape.new(name: 'ExportFilterName')
@@ -232,12 +248,18 @@ module Aws::LexModelsV2
232
248
  NumericalBotVersion = Shapes::StringShape.new(name: 'NumericalBotVersion')
233
249
  ObfuscationSetting = Shapes::StructureShape.new(name: 'ObfuscationSetting')
234
250
  ObfuscationSettingType = Shapes::StringShape.new(name: 'ObfuscationSettingType')
251
+ Operation = Shapes::StringShape.new(name: 'Operation')
252
+ OperationList = Shapes::ListShape.new(name: 'OperationList')
235
253
  OutputContext = Shapes::StructureShape.new(name: 'OutputContext')
236
254
  OutputContextsList = Shapes::ListShape.new(name: 'OutputContextsList')
237
255
  PlainTextMessage = Shapes::StructureShape.new(name: 'PlainTextMessage')
238
256
  PlainTextMessageValue = Shapes::StringShape.new(name: 'PlainTextMessageValue')
257
+ Policy = Shapes::StringShape.new(name: 'Policy')
239
258
  PreconditionFailedException = Shapes::StructureShape.new(name: 'PreconditionFailedException')
240
259
  PresignedS3Url = Shapes::StringShape.new(name: 'PresignedS3Url')
260
+ Principal = Shapes::StructureShape.new(name: 'Principal')
261
+ PrincipalArn = Shapes::StringShape.new(name: 'PrincipalArn')
262
+ PrincipalList = Shapes::ListShape.new(name: 'PrincipalList')
241
263
  PriorityValue = Shapes::IntegerShape.new(name: 'PriorityValue')
242
264
  PromptMaxRetries = Shapes::IntegerShape.new(name: 'PromptMaxRetries')
243
265
  PromptSpecification = Shapes::StructureShape.new(name: 'PromptSpecification')
@@ -247,6 +269,7 @@ module Aws::LexModelsV2
247
269
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
248
270
  ResponseSpecification = Shapes::StructureShape.new(name: 'ResponseSpecification')
249
271
  RetryAfterSeconds = Shapes::IntegerShape.new(name: 'RetryAfterSeconds')
272
+ RevisionId = Shapes::StringShape.new(name: 'RevisionId')
250
273
  RoleArn = Shapes::StringShape.new(name: 'RoleArn')
251
274
  S3BucketArn = Shapes::StringShape.new(name: 'S3BucketArn')
252
275
  S3BucketLogDestination = Shapes::StructureShape.new(name: 'S3BucketLogDestination')
@@ -256,6 +279,7 @@ module Aws::LexModelsV2
256
279
  SampleUtterancesList = Shapes::ListShape.new(name: 'SampleUtterancesList')
257
280
  SampleValue = Shapes::StructureShape.new(name: 'SampleValue')
258
281
  SentimentAnalysisSettings = Shapes::StructureShape.new(name: 'SentimentAnalysisSettings')
282
+ ServicePrincipal = Shapes::StringShape.new(name: 'ServicePrincipal')
259
283
  ServiceQuotaExceededException = Shapes::StructureShape.new(name: 'ServiceQuotaExceededException')
260
284
  SessionTTL = Shapes::IntegerShape.new(name: 'SessionTTL')
261
285
  SkipResourceInUseCheck = Shapes::BooleanShape.new(name: 'SkipResourceInUseCheck')
@@ -319,6 +343,8 @@ module Aws::LexModelsV2
319
343
  UpdateExportResponse = Shapes::StructureShape.new(name: 'UpdateExportResponse')
320
344
  UpdateIntentRequest = Shapes::StructureShape.new(name: 'UpdateIntentRequest')
321
345
  UpdateIntentResponse = Shapes::StructureShape.new(name: 'UpdateIntentResponse')
346
+ UpdateResourcePolicyRequest = Shapes::StructureShape.new(name: 'UpdateResourcePolicyRequest')
347
+ UpdateResourcePolicyResponse = Shapes::StructureShape.new(name: 'UpdateResourcePolicyResponse')
322
348
  UpdateSlotRequest = Shapes::StructureShape.new(name: 'UpdateSlotRequest')
323
349
  UpdateSlotResponse = Shapes::StructureShape.new(name: 'UpdateSlotResponse')
324
350
  UpdateSlotTypeRequest = Shapes::StructureShape.new(name: 'UpdateSlotTypeRequest')
@@ -500,6 +526,12 @@ module Aws::LexModelsV2
500
526
  CodeHookSpecification.add_member(:lambda_code_hook, Shapes::ShapeRef.new(shape: LambdaCodeHook, required: true, location_name: "lambdaCodeHook"))
501
527
  CodeHookSpecification.struct_class = Types::CodeHookSpecification
502
528
 
529
+ ConditionKeyValueMap.key = Shapes::ShapeRef.new(shape: ConditionKey)
530
+ ConditionKeyValueMap.value = Shapes::ShapeRef.new(shape: ConditionValue)
531
+
532
+ ConditionMap.key = Shapes::ShapeRef.new(shape: ConditionOperator)
533
+ ConditionMap.value = Shapes::ShapeRef.new(shape: ConditionKeyValueMap)
534
+
503
535
  ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
504
536
  ConflictException.struct_class = Types::ConflictException
505
537
 
@@ -629,6 +661,27 @@ module Aws::LexModelsV2
629
661
  CreateIntentResponse.add_member(:creation_date_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "creationDateTime"))
630
662
  CreateIntentResponse.struct_class = Types::CreateIntentResponse
631
663
 
664
+ CreateResourcePolicyRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location: "uri", location_name: "resourceArn"))
665
+ CreateResourcePolicyRequest.add_member(:policy, Shapes::ShapeRef.new(shape: Policy, required: true, location_name: "policy"))
666
+ CreateResourcePolicyRequest.struct_class = Types::CreateResourcePolicyRequest
667
+
668
+ CreateResourcePolicyResponse.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, location_name: "resourceArn"))
669
+ CreateResourcePolicyResponse.add_member(:revision_id, Shapes::ShapeRef.new(shape: RevisionId, location_name: "revisionId"))
670
+ CreateResourcePolicyResponse.struct_class = Types::CreateResourcePolicyResponse
671
+
672
+ CreateResourcePolicyStatementRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location: "uri", location_name: "resourceArn"))
673
+ CreateResourcePolicyStatementRequest.add_member(:statement_id, Shapes::ShapeRef.new(shape: Name, required: true, location_name: "statementId"))
674
+ CreateResourcePolicyStatementRequest.add_member(:effect, Shapes::ShapeRef.new(shape: Effect, required: true, location_name: "effect"))
675
+ CreateResourcePolicyStatementRequest.add_member(:principal, Shapes::ShapeRef.new(shape: PrincipalList, required: true, location_name: "principal"))
676
+ CreateResourcePolicyStatementRequest.add_member(:action, Shapes::ShapeRef.new(shape: OperationList, required: true, location_name: "action"))
677
+ CreateResourcePolicyStatementRequest.add_member(:condition, Shapes::ShapeRef.new(shape: ConditionMap, location_name: "condition"))
678
+ CreateResourcePolicyStatementRequest.add_member(:expected_revision_id, Shapes::ShapeRef.new(shape: RevisionId, location: "querystring", location_name: "expectedRevisionId"))
679
+ CreateResourcePolicyStatementRequest.struct_class = Types::CreateResourcePolicyStatementRequest
680
+
681
+ CreateResourcePolicyStatementResponse.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, location_name: "resourceArn"))
682
+ CreateResourcePolicyStatementResponse.add_member(:revision_id, Shapes::ShapeRef.new(shape: RevisionId, location_name: "revisionId"))
683
+ CreateResourcePolicyStatementResponse.struct_class = Types::CreateResourcePolicyStatementResponse
684
+
632
685
  CreateSlotRequest.add_member(:slot_name, Shapes::ShapeRef.new(shape: Name, required: true, location_name: "slotName"))
633
686
  CreateSlotRequest.add_member(:description, Shapes::ShapeRef.new(shape: Description, location_name: "description"))
634
687
  CreateSlotRequest.add_member(:slot_type_id, Shapes::ShapeRef.new(shape: BuiltInOrCustomSlotTypeId, required: true, location_name: "slotTypeId"))
@@ -746,6 +799,23 @@ module Aws::LexModelsV2
746
799
  DeleteIntentRequest.add_member(:locale_id, Shapes::ShapeRef.new(shape: LocaleId, required: true, location: "uri", location_name: "localeId"))
747
800
  DeleteIntentRequest.struct_class = Types::DeleteIntentRequest
748
801
 
802
+ DeleteResourcePolicyRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location: "uri", location_name: "resourceArn"))
803
+ DeleteResourcePolicyRequest.add_member(:expected_revision_id, Shapes::ShapeRef.new(shape: RevisionId, location: "querystring", location_name: "expectedRevisionId"))
804
+ DeleteResourcePolicyRequest.struct_class = Types::DeleteResourcePolicyRequest
805
+
806
+ DeleteResourcePolicyResponse.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, location_name: "resourceArn"))
807
+ DeleteResourcePolicyResponse.add_member(:revision_id, Shapes::ShapeRef.new(shape: RevisionId, location_name: "revisionId"))
808
+ DeleteResourcePolicyResponse.struct_class = Types::DeleteResourcePolicyResponse
809
+
810
+ DeleteResourcePolicyStatementRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location: "uri", location_name: "resourceArn"))
811
+ DeleteResourcePolicyStatementRequest.add_member(:statement_id, Shapes::ShapeRef.new(shape: Name, required: true, location: "uri", location_name: "statementId"))
812
+ DeleteResourcePolicyStatementRequest.add_member(:expected_revision_id, Shapes::ShapeRef.new(shape: RevisionId, location: "querystring", location_name: "expectedRevisionId"))
813
+ DeleteResourcePolicyStatementRequest.struct_class = Types::DeleteResourcePolicyStatementRequest
814
+
815
+ DeleteResourcePolicyStatementResponse.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, location_name: "resourceArn"))
816
+ DeleteResourcePolicyStatementResponse.add_member(:revision_id, Shapes::ShapeRef.new(shape: RevisionId, location_name: "revisionId"))
817
+ DeleteResourcePolicyStatementResponse.struct_class = Types::DeleteResourcePolicyStatementResponse
818
+
749
819
  DeleteSlotRequest.add_member(:slot_id, Shapes::ShapeRef.new(shape: Id, required: true, location: "uri", location_name: "slotId"))
750
820
  DeleteSlotRequest.add_member(:bot_id, Shapes::ShapeRef.new(shape: Id, required: true, location: "uri", location_name: "botId"))
751
821
  DeleteSlotRequest.add_member(:bot_version, Shapes::ShapeRef.new(shape: DraftBotVersion, required: true, location: "uri", location_name: "botVersion"))
@@ -883,6 +953,14 @@ module Aws::LexModelsV2
883
953
  DescribeIntentResponse.add_member(:last_updated_date_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "lastUpdatedDateTime"))
884
954
  DescribeIntentResponse.struct_class = Types::DescribeIntentResponse
885
955
 
956
+ DescribeResourcePolicyRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location: "uri", location_name: "resourceArn"))
957
+ DescribeResourcePolicyRequest.struct_class = Types::DescribeResourcePolicyRequest
958
+
959
+ DescribeResourcePolicyResponse.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, location_name: "resourceArn"))
960
+ DescribeResourcePolicyResponse.add_member(:policy, Shapes::ShapeRef.new(shape: Policy, location_name: "policy"))
961
+ DescribeResourcePolicyResponse.add_member(:revision_id, Shapes::ShapeRef.new(shape: RevisionId, location_name: "revisionId"))
962
+ DescribeResourcePolicyResponse.struct_class = Types::DescribeResourcePolicyResponse
963
+
886
964
  DescribeSlotRequest.add_member(:slot_id, Shapes::ShapeRef.new(shape: Id, required: true, location: "uri", location_name: "slotId"))
887
965
  DescribeSlotRequest.add_member(:bot_id, Shapes::ShapeRef.new(shape: Id, required: true, location: "uri", location_name: "botId"))
888
966
  DescribeSlotRequest.add_member(:bot_version, Shapes::ShapeRef.new(shape: BotVersion, required: true, location: "uri", location_name: "botVersion"))
@@ -1204,6 +1282,8 @@ module Aws::LexModelsV2
1204
1282
  ObfuscationSetting.add_member(:obfuscation_setting_type, Shapes::ShapeRef.new(shape: ObfuscationSettingType, required: true, location_name: "obfuscationSettingType"))
1205
1283
  ObfuscationSetting.struct_class = Types::ObfuscationSetting
1206
1284
 
1285
+ OperationList.member = Shapes::ShapeRef.new(shape: Operation)
1286
+
1207
1287
  OutputContext.add_member(:name, Shapes::ShapeRef.new(shape: Name, required: true, location_name: "name"))
1208
1288
  OutputContext.add_member(:time_to_live_in_seconds, Shapes::ShapeRef.new(shape: ContextTimeToLiveInSeconds, required: true, location_name: "timeToLiveInSeconds"))
1209
1289
  OutputContext.add_member(:turns_to_live, Shapes::ShapeRef.new(shape: ContextTurnsToLive, required: true, location_name: "turnsToLive"))
@@ -1217,6 +1297,12 @@ module Aws::LexModelsV2
1217
1297
  PreconditionFailedException.add_member(:message, Shapes::ShapeRef.new(shape: ExceptionMessage, location_name: "message"))
1218
1298
  PreconditionFailedException.struct_class = Types::PreconditionFailedException
1219
1299
 
1300
+ Principal.add_member(:service, Shapes::ShapeRef.new(shape: ServicePrincipal, location_name: "service"))
1301
+ Principal.add_member(:arn, Shapes::ShapeRef.new(shape: PrincipalArn, location_name: "arn"))
1302
+ Principal.struct_class = Types::Principal
1303
+
1304
+ PrincipalList.member = Shapes::ShapeRef.new(shape: Principal)
1305
+
1220
1306
  PromptSpecification.add_member(:message_groups, Shapes::ShapeRef.new(shape: MessageGroupsList, required: true, location_name: "messageGroups"))
1221
1307
  PromptSpecification.add_member(:max_retries, Shapes::ShapeRef.new(shape: PromptMaxRetries, required: true, location_name: "maxRetries"))
1222
1308
  PromptSpecification.add_member(:allow_interrupt, Shapes::ShapeRef.new(shape: BoxedBoolean, location_name: "allowInterrupt"))
@@ -1491,6 +1577,15 @@ module Aws::LexModelsV2
1491
1577
  UpdateIntentResponse.add_member(:last_updated_date_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "lastUpdatedDateTime"))
1492
1578
  UpdateIntentResponse.struct_class = Types::UpdateIntentResponse
1493
1579
 
1580
+ UpdateResourcePolicyRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, required: true, location: "uri", location_name: "resourceArn"))
1581
+ UpdateResourcePolicyRequest.add_member(:policy, Shapes::ShapeRef.new(shape: Policy, required: true, location_name: "policy"))
1582
+ UpdateResourcePolicyRequest.add_member(:expected_revision_id, Shapes::ShapeRef.new(shape: RevisionId, location: "querystring", location_name: "expectedRevisionId"))
1583
+ UpdateResourcePolicyRequest.struct_class = Types::UpdateResourcePolicyRequest
1584
+
1585
+ UpdateResourcePolicyResponse.add_member(:resource_arn, Shapes::ShapeRef.new(shape: AmazonResourceName, location_name: "resourceArn"))
1586
+ UpdateResourcePolicyResponse.add_member(:revision_id, Shapes::ShapeRef.new(shape: RevisionId, location_name: "revisionId"))
1587
+ UpdateResourcePolicyResponse.struct_class = Types::UpdateResourcePolicyResponse
1588
+
1494
1589
  UpdateSlotRequest.add_member(:slot_id, Shapes::ShapeRef.new(shape: Id, required: true, location: "uri", location_name: "slotId"))
1495
1590
  UpdateSlotRequest.add_member(:slot_name, Shapes::ShapeRef.new(shape: Name, required: true, location_name: "slotName"))
1496
1591
  UpdateSlotRequest.add_member(:description, Shapes::ShapeRef.new(shape: Description, location_name: "description"))
@@ -1669,6 +1764,35 @@ module Aws::LexModelsV2
1669
1764
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1670
1765
  end)
1671
1766
 
1767
+ api.add_operation(:create_resource_policy, Seahorse::Model::Operation.new.tap do |o|
1768
+ o.name = "CreateResourcePolicy"
1769
+ o.http_method = "POST"
1770
+ o.http_request_uri = "/policy/{resourceArn}/"
1771
+ o.input = Shapes::ShapeRef.new(shape: CreateResourcePolicyRequest)
1772
+ o.output = Shapes::ShapeRef.new(shape: CreateResourcePolicyResponse)
1773
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1774
+ o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
1775
+ o.errors << Shapes::ShapeRef.new(shape: PreconditionFailedException)
1776
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
1777
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1778
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1779
+ end)
1780
+
1781
+ api.add_operation(:create_resource_policy_statement, Seahorse::Model::Operation.new.tap do |o|
1782
+ o.name = "CreateResourcePolicyStatement"
1783
+ o.http_method = "POST"
1784
+ o.http_request_uri = "/policy/{resourceArn}/statements/"
1785
+ o.input = Shapes::ShapeRef.new(shape: CreateResourcePolicyStatementRequest)
1786
+ o.output = Shapes::ShapeRef.new(shape: CreateResourcePolicyStatementResponse)
1787
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1788
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
1789
+ o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
1790
+ o.errors << Shapes::ShapeRef.new(shape: PreconditionFailedException)
1791
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
1792
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1793
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1794
+ end)
1795
+
1672
1796
  api.add_operation(:create_slot, Seahorse::Model::Operation.new.tap do |o|
1673
1797
  o.name = "CreateSlot"
1674
1798
  o.http_method = "PUT"
@@ -1806,6 +1930,30 @@ module Aws::LexModelsV2
1806
1930
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1807
1931
  end)
1808
1932
 
1933
+ api.add_operation(:delete_resource_policy, Seahorse::Model::Operation.new.tap do |o|
1934
+ o.name = "DeleteResourcePolicy"
1935
+ o.http_method = "DELETE"
1936
+ o.http_request_uri = "/policy/{resourceArn}/"
1937
+ o.input = Shapes::ShapeRef.new(shape: DeleteResourcePolicyRequest)
1938
+ o.output = Shapes::ShapeRef.new(shape: DeleteResourcePolicyResponse)
1939
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1940
+ o.errors << Shapes::ShapeRef.new(shape: PreconditionFailedException)
1941
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1942
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1943
+ end)
1944
+
1945
+ api.add_operation(:delete_resource_policy_statement, Seahorse::Model::Operation.new.tap do |o|
1946
+ o.name = "DeleteResourcePolicyStatement"
1947
+ o.http_method = "DELETE"
1948
+ o.http_request_uri = "/policy/{resourceArn}/statements/{statementId}/"
1949
+ o.input = Shapes::ShapeRef.new(shape: DeleteResourcePolicyStatementRequest)
1950
+ o.output = Shapes::ShapeRef.new(shape: DeleteResourcePolicyStatementResponse)
1951
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1952
+ o.errors << Shapes::ShapeRef.new(shape: PreconditionFailedException)
1953
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1954
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1955
+ end)
1956
+
1809
1957
  api.add_operation(:delete_slot, Seahorse::Model::Operation.new.tap do |o|
1810
1958
  o.name = "DeleteSlot"
1811
1959
  o.http_method = "DELETE"
@@ -1923,6 +2071,17 @@ module Aws::LexModelsV2
1923
2071
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1924
2072
  end)
1925
2073
 
2074
+ api.add_operation(:describe_resource_policy, Seahorse::Model::Operation.new.tap do |o|
2075
+ o.name = "DescribeResourcePolicy"
2076
+ o.http_method = "GET"
2077
+ o.http_request_uri = "/policy/{resourceArn}/"
2078
+ o.input = Shapes::ShapeRef.new(shape: DescribeResourcePolicyRequest)
2079
+ o.output = Shapes::ShapeRef.new(shape: DescribeResourcePolicyResponse)
2080
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
2081
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
2082
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
2083
+ end)
2084
+
1926
2085
  api.add_operation(:describe_slot, Seahorse::Model::Operation.new.tap do |o|
1927
2086
  o.name = "DescribeSlot"
1928
2087
  o.http_method = "GET"
@@ -2265,6 +2424,20 @@ module Aws::LexModelsV2
2265
2424
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
2266
2425
  end)
2267
2426
 
2427
+ api.add_operation(:update_resource_policy, Seahorse::Model::Operation.new.tap do |o|
2428
+ o.name = "UpdateResourcePolicy"
2429
+ o.http_method = "PUT"
2430
+ o.http_request_uri = "/policy/{resourceArn}/"
2431
+ o.input = Shapes::ShapeRef.new(shape: UpdateResourcePolicyRequest)
2432
+ o.output = Shapes::ShapeRef.new(shape: UpdateResourcePolicyResponse)
2433
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
2434
+ o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
2435
+ o.errors << Shapes::ShapeRef.new(shape: PreconditionFailedException)
2436
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
2437
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
2438
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
2439
+ end)
2440
+
2268
2441
  api.add_operation(:update_slot, Seahorse::Model::Operation.new.tap do |o|
2269
2442
  o.name = "UpdateSlot"
2270
2443
  o.http_method = "PUT"
@@ -2081,6 +2081,184 @@ module Aws::LexModelsV2
2081
2081
  include Aws::Structure
2082
2082
  end
2083
2083
 
2084
+ # @note When making an API call, you may pass CreateResourcePolicyRequest
2085
+ # data as a hash:
2086
+ #
2087
+ # {
2088
+ # resource_arn: "AmazonResourceName", # required
2089
+ # policy: "Policy", # required
2090
+ # }
2091
+ #
2092
+ # @!attribute [rw] resource_arn
2093
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
2094
+ # resource policy is attached to.
2095
+ # @return [String]
2096
+ #
2097
+ # @!attribute [rw] policy
2098
+ # A resource policy to add to the resource. The policy is a JSON
2099
+ # structure that contains one or more statements that define the
2100
+ # policy. The policy must follow the IAM syntax. For more information
2101
+ # about the contents of a JSON policy document, see [ IAM JSON policy
2102
+ # reference ][1].
2103
+ #
2104
+ # If the policy isn't valid, Amazon Lex returns a validation
2105
+ # exception.
2106
+ #
2107
+ #
2108
+ #
2109
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
2110
+ # @return [String]
2111
+ #
2112
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicyRequest AWS API Documentation
2113
+ #
2114
+ class CreateResourcePolicyRequest < Struct.new(
2115
+ :resource_arn,
2116
+ :policy)
2117
+ SENSITIVE = []
2118
+ include Aws::Structure
2119
+ end
2120
+
2121
+ # @!attribute [rw] resource_arn
2122
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
2123
+ # resource policy was attached to.
2124
+ # @return [String]
2125
+ #
2126
+ # @!attribute [rw] revision_id
2127
+ # The current revision of the resource policy. Use the revision ID to
2128
+ # make sure that you are updating the most current version of a
2129
+ # resource policy when you add a policy statement to a resource,
2130
+ # delete a resource, or update a resource.
2131
+ # @return [String]
2132
+ #
2133
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicyResponse AWS API Documentation
2134
+ #
2135
+ class CreateResourcePolicyResponse < Struct.new(
2136
+ :resource_arn,
2137
+ :revision_id)
2138
+ SENSITIVE = []
2139
+ include Aws::Structure
2140
+ end
2141
+
2142
+ # @note When making an API call, you may pass CreateResourcePolicyStatementRequest
2143
+ # data as a hash:
2144
+ #
2145
+ # {
2146
+ # resource_arn: "AmazonResourceName", # required
2147
+ # statement_id: "Name", # required
2148
+ # effect: "Allow", # required, accepts Allow, Deny
2149
+ # principal: [ # required
2150
+ # {
2151
+ # service: "ServicePrincipal",
2152
+ # arn: "PrincipalArn",
2153
+ # },
2154
+ # ],
2155
+ # action: ["Operation"], # required
2156
+ # condition: {
2157
+ # "ConditionOperator" => {
2158
+ # "ConditionKey" => "ConditionValue",
2159
+ # },
2160
+ # },
2161
+ # expected_revision_id: "RevisionId",
2162
+ # }
2163
+ #
2164
+ # @!attribute [rw] resource_arn
2165
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
2166
+ # resource policy is attached to.
2167
+ # @return [String]
2168
+ #
2169
+ # @!attribute [rw] statement_id
2170
+ # The name of the statement. The ID is the same as the `Sid` IAM
2171
+ # property. The statement name must be unique within the policy. For
2172
+ # more information, see [IAM JSON policy elements: Sid][1].
2173
+ #
2174
+ #
2175
+ #
2176
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html
2177
+ # @return [String]
2178
+ #
2179
+ # @!attribute [rw] effect
2180
+ # Determines whether the statement allows or denies access to the
2181
+ # resource.
2182
+ # @return [String]
2183
+ #
2184
+ # @!attribute [rw] principal
2185
+ # An IAM principal, such as an IAM users, IAM roles, or AWS services
2186
+ # that is allowed or denied access to a resource. For more
2187
+ # information, see [AWS JSON policy elements: Principal][1].
2188
+ #
2189
+ #
2190
+ #
2191
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
2192
+ # @return [Array<Types::Principal>]
2193
+ #
2194
+ # @!attribute [rw] action
2195
+ # The Amazon Lex action that this policy either allows or denies. The
2196
+ # action must apply to the resource type of the specified ARN. For
2197
+ # more information, see [ Actions, resources, and condition keys for
2198
+ # Amazon Lex V2][1].
2199
+ #
2200
+ #
2201
+ #
2202
+ # [1]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlexv2.html
2203
+ # @return [Array<String>]
2204
+ #
2205
+ # @!attribute [rw] condition
2206
+ # Specifies a condition when the policy is in effect. If the principal
2207
+ # of the policy is a service principal, you must provide two condition
2208
+ # blocks, one with a SourceAccount global condition key and one with a
2209
+ # SourceArn global condition key.
2210
+ #
2211
+ # For more information, see [IAM JSON policy elements: Condition ][1].
2212
+ #
2213
+ #
2214
+ #
2215
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html
2216
+ # @return [Hash<String,Hash<String,String>>]
2217
+ #
2218
+ # @!attribute [rw] expected_revision_id
2219
+ # The identifier of the revision of the policy to edit. If this
2220
+ # revision ID doesn't match the current revision ID, Amazon Lex
2221
+ # throws an exception.
2222
+ #
2223
+ # If you don't specify a revision, Amazon Lex overwrites the contents
2224
+ # of the policy with the new values.
2225
+ # @return [String]
2226
+ #
2227
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicyStatementRequest AWS API Documentation
2228
+ #
2229
+ class CreateResourcePolicyStatementRequest < Struct.new(
2230
+ :resource_arn,
2231
+ :statement_id,
2232
+ :effect,
2233
+ :principal,
2234
+ :action,
2235
+ :condition,
2236
+ :expected_revision_id)
2237
+ SENSITIVE = []
2238
+ include Aws::Structure
2239
+ end
2240
+
2241
+ # @!attribute [rw] resource_arn
2242
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
2243
+ # resource policy is attached to.
2244
+ # @return [String]
2245
+ #
2246
+ # @!attribute [rw] revision_id
2247
+ # The current revision of the resource policy. Use the revision ID to
2248
+ # make sure that you are updating the most current version of a
2249
+ # resource policy when you add a policy statement to a resource,
2250
+ # delete a resource, or update a resource.
2251
+ # @return [String]
2252
+ #
2253
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/CreateResourcePolicyStatementResponse AWS API Documentation
2254
+ #
2255
+ class CreateResourcePolicyStatementResponse < Struct.new(
2256
+ :resource_arn,
2257
+ :revision_id)
2258
+ SENSITIVE = []
2259
+ include Aws::Structure
2260
+ end
2261
+
2084
2262
  # @note When making an API call, you may pass CreateSlotRequest
2085
2263
  # data as a hash:
2086
2264
  #
@@ -3070,6 +3248,115 @@ module Aws::LexModelsV2
3070
3248
  include Aws::Structure
3071
3249
  end
3072
3250
 
3251
+ # @note When making an API call, you may pass DeleteResourcePolicyRequest
3252
+ # data as a hash:
3253
+ #
3254
+ # {
3255
+ # resource_arn: "AmazonResourceName", # required
3256
+ # expected_revision_id: "RevisionId",
3257
+ # }
3258
+ #
3259
+ # @!attribute [rw] resource_arn
3260
+ # The Amazon Resource Name (ARN) of the bot or bot alias that has the
3261
+ # resource policy attached.
3262
+ # @return [String]
3263
+ #
3264
+ # @!attribute [rw] expected_revision_id
3265
+ # The identifier of the revision to edit. If this ID doesn't match
3266
+ # the current revision number, Amazon Lex returns an exception
3267
+ #
3268
+ # If you don't specify a revision ID, Amazon Lex will delete the
3269
+ # current policy.
3270
+ # @return [String]
3271
+ #
3272
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyRequest AWS API Documentation
3273
+ #
3274
+ class DeleteResourcePolicyRequest < Struct.new(
3275
+ :resource_arn,
3276
+ :expected_revision_id)
3277
+ SENSITIVE = []
3278
+ include Aws::Structure
3279
+ end
3280
+
3281
+ # @!attribute [rw] resource_arn
3282
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
3283
+ # resource policy was deleted from.
3284
+ # @return [String]
3285
+ #
3286
+ # @!attribute [rw] revision_id
3287
+ # The current revision of the resource policy. Use the revision ID to
3288
+ # make sure that you are updating the most current version of a
3289
+ # resource policy when you add a policy statement to a resource,
3290
+ # delete a resource, or update a resource.
3291
+ # @return [String]
3292
+ #
3293
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyResponse AWS API Documentation
3294
+ #
3295
+ class DeleteResourcePolicyResponse < Struct.new(
3296
+ :resource_arn,
3297
+ :revision_id)
3298
+ SENSITIVE = []
3299
+ include Aws::Structure
3300
+ end
3301
+
3302
+ # @note When making an API call, you may pass DeleteResourcePolicyStatementRequest
3303
+ # data as a hash:
3304
+ #
3305
+ # {
3306
+ # resource_arn: "AmazonResourceName", # required
3307
+ # statement_id: "Name", # required
3308
+ # expected_revision_id: "RevisionId",
3309
+ # }
3310
+ #
3311
+ # @!attribute [rw] resource_arn
3312
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
3313
+ # resource policy is attached to.
3314
+ # @return [String]
3315
+ #
3316
+ # @!attribute [rw] statement_id
3317
+ # The name of the statement (SID) to delete from the policy.
3318
+ # @return [String]
3319
+ #
3320
+ # @!attribute [rw] expected_revision_id
3321
+ # The identifier of the revision of the policy to delete the statement
3322
+ # from. If this revision ID doesn't match the current revision ID,
3323
+ # Amazon Lex throws an exception.
3324
+ #
3325
+ # If you don't specify a revision, Amazon Lex removes the current
3326
+ # contents of the statement.
3327
+ # @return [String]
3328
+ #
3329
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyStatementRequest AWS API Documentation
3330
+ #
3331
+ class DeleteResourcePolicyStatementRequest < Struct.new(
3332
+ :resource_arn,
3333
+ :statement_id,
3334
+ :expected_revision_id)
3335
+ SENSITIVE = []
3336
+ include Aws::Structure
3337
+ end
3338
+
3339
+ # @!attribute [rw] resource_arn
3340
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
3341
+ # resource policy statement was removed from.
3342
+ # @return [String]
3343
+ #
3344
+ # @!attribute [rw] revision_id
3345
+ # The current revision of the resource policy. Use the revision ID to
3346
+ # make sure that you are updating the most current version of a
3347
+ # resource policy when you add a policy statement to a resource,
3348
+ # delete a resource, or update a resource.
3349
+ # @return [String]
3350
+ #
3351
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DeleteResourcePolicyStatementResponse AWS API Documentation
3352
+ #
3353
+ class DeleteResourcePolicyStatementResponse < Struct.new(
3354
+ :resource_arn,
3355
+ :revision_id)
3356
+ SENSITIVE = []
3357
+ include Aws::Structure
3358
+ end
3359
+
3073
3360
  # @note When making an API call, you may pass DeleteSlotRequest
3074
3361
  # data as a hash:
3075
3362
  #
@@ -3850,6 +4137,58 @@ module Aws::LexModelsV2
3850
4137
  include Aws::Structure
3851
4138
  end
3852
4139
 
4140
+ # @note When making an API call, you may pass DescribeResourcePolicyRequest
4141
+ # data as a hash:
4142
+ #
4143
+ # {
4144
+ # resource_arn: "AmazonResourceName", # required
4145
+ # }
4146
+ #
4147
+ # @!attribute [rw] resource_arn
4148
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
4149
+ # resource policy is attached to.
4150
+ # @return [String]
4151
+ #
4152
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeResourcePolicyRequest AWS API Documentation
4153
+ #
4154
+ class DescribeResourcePolicyRequest < Struct.new(
4155
+ :resource_arn)
4156
+ SENSITIVE = []
4157
+ include Aws::Structure
4158
+ end
4159
+
4160
+ # @!attribute [rw] resource_arn
4161
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
4162
+ # resource policy is attached to.
4163
+ # @return [String]
4164
+ #
4165
+ # @!attribute [rw] policy
4166
+ # The JSON structure that contains the resource policy. For more
4167
+ # information about the contents of a JSON policy document, see [ IAM
4168
+ # JSON policy reference ][1].
4169
+ #
4170
+ #
4171
+ #
4172
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
4173
+ # @return [String]
4174
+ #
4175
+ # @!attribute [rw] revision_id
4176
+ # The current revision of the resource policy. Use the revision ID to
4177
+ # make sure that you are updating the most current version of a
4178
+ # resource policy when you add a policy statement to a resource,
4179
+ # delete a resource, or update a resource.
4180
+ # @return [String]
4181
+ #
4182
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/DescribeResourcePolicyResponse AWS API Documentation
4183
+ #
4184
+ class DescribeResourcePolicyResponse < Struct.new(
4185
+ :resource_arn,
4186
+ :policy,
4187
+ :revision_id)
4188
+ SENSITIVE = []
4189
+ include Aws::Structure
4190
+ end
4191
+
3853
4192
  # @note When making an API call, you may pass DescribeSlotRequest
3854
4193
  # data as a hash:
3855
4194
  #
@@ -6218,6 +6557,41 @@ module Aws::LexModelsV2
6218
6557
  include Aws::Structure
6219
6558
  end
6220
6559
 
6560
+ # The IAM principal that you allowing or denying access to an Amazon Lex
6561
+ # action. You must provide a `service` or an `arn`, but not both in the
6562
+ # same statement. For more information, see [ AWS JSON policy elements:
6563
+ # Principal ][1].
6564
+ #
6565
+ #
6566
+ #
6567
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html
6568
+ #
6569
+ # @note When making an API call, you may pass Principal
6570
+ # data as a hash:
6571
+ #
6572
+ # {
6573
+ # service: "ServicePrincipal",
6574
+ # arn: "PrincipalArn",
6575
+ # }
6576
+ #
6577
+ # @!attribute [rw] service
6578
+ # The name of the AWS service that should allowed or denied access to
6579
+ # an Amazon Lex action.
6580
+ # @return [String]
6581
+ #
6582
+ # @!attribute [rw] arn
6583
+ # The Amazon Resource Name (ARN) of the principal.
6584
+ # @return [String]
6585
+ #
6586
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/Principal AWS API Documentation
6587
+ #
6588
+ class Principal < Struct.new(
6589
+ :service,
6590
+ :arn)
6591
+ SENSITIVE = []
6592
+ include Aws::Structure
6593
+ end
6594
+
6221
6595
  # Specifies a list of message groups that Amazon Lex sends to a user to
6222
6596
  # elicit a response.
6223
6597
  #
@@ -8434,6 +8808,75 @@ module Aws::LexModelsV2
8434
8808
  include Aws::Structure
8435
8809
  end
8436
8810
 
8811
+ # @note When making an API call, you may pass UpdateResourcePolicyRequest
8812
+ # data as a hash:
8813
+ #
8814
+ # {
8815
+ # resource_arn: "AmazonResourceName", # required
8816
+ # policy: "Policy", # required
8817
+ # expected_revision_id: "RevisionId",
8818
+ # }
8819
+ #
8820
+ # @!attribute [rw] resource_arn
8821
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
8822
+ # resource policy is attached to.
8823
+ # @return [String]
8824
+ #
8825
+ # @!attribute [rw] policy
8826
+ # A resource policy to add to the resource. The policy is a JSON
8827
+ # structure that contains one or more statements that define the
8828
+ # policy. The policy must follow the IAM syntax. For more information
8829
+ # about the contents of a JSON policy document, see [ IAM JSON policy
8830
+ # reference ][1].
8831
+ #
8832
+ # If the policy isn't valid, Amazon Lex returns a validation
8833
+ # exception.
8834
+ #
8835
+ #
8836
+ #
8837
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
8838
+ # @return [String]
8839
+ #
8840
+ # @!attribute [rw] expected_revision_id
8841
+ # The identifier of the revision of the policy to update. If this
8842
+ # revision ID doesn't match the current revision ID, Amazon Lex
8843
+ # throws an exception.
8844
+ #
8845
+ # If you don't specify a revision, Amazon Lex overwrites the contents
8846
+ # of the policy with the new values.
8847
+ # @return [String]
8848
+ #
8849
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/UpdateResourcePolicyRequest AWS API Documentation
8850
+ #
8851
+ class UpdateResourcePolicyRequest < Struct.new(
8852
+ :resource_arn,
8853
+ :policy,
8854
+ :expected_revision_id)
8855
+ SENSITIVE = []
8856
+ include Aws::Structure
8857
+ end
8858
+
8859
+ # @!attribute [rw] resource_arn
8860
+ # The Amazon Resource Name (ARN) of the bot or bot alias that the
8861
+ # resource policy is attached to.
8862
+ # @return [String]
8863
+ #
8864
+ # @!attribute [rw] revision_id
8865
+ # The current revision of the resource policy. Use the revision ID to
8866
+ # make sure that you are updating the most current version of a
8867
+ # resource policy when you add a policy statement to a resource,
8868
+ # delete a resource, or update a resource.
8869
+ # @return [String]
8870
+ #
8871
+ # @see http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/UpdateResourcePolicyResponse AWS API Documentation
8872
+ #
8873
+ class UpdateResourcePolicyResponse < Struct.new(
8874
+ :resource_arn,
8875
+ :revision_id)
8876
+ SENSITIVE = []
8877
+ include Aws::Structure
8878
+ end
8879
+
8437
8880
  # @note When making an API call, you may pass UpdateSlotRequest
8438
8881
  # data as a hash:
8439
8882
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-lexmodelsv2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-18 00:00:00.000000000 Z
11
+ date: 2021-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core