aws-sdk-bedrockruntime 1.32.0 → 1.33.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: b26f5d1abe35e559cf26bc3eeb31512409ec4ad73cc9a4e01d6bd85668b33092
4
- data.tar.gz: e13c50f60cf7102b445fd0e94e513480708acd7d2e2a3cdd3a53829c70d5e2aa
3
+ metadata.gz: 8bbc17a1fbd97da1acd484adbc61927d5bbf2eef3e3f39dccef313d420962a3e
4
+ data.tar.gz: 1530c4064531caf174c0e7e3385b2745799bcf4722fd7f7b6d35ba17092b20b9
5
5
  SHA512:
6
- metadata.gz: 37f564b9a312df24f7a1205bececc5d1c21530071862e53c5baedb3b432fec29c9b009f713b6f061faf9037d350886eedf0e2fbbbcc33e3dd103f25dbe620b2c
7
- data.tar.gz: dbd487a061090ab606b46ccee6bb4a47469273692f89aafc31609271122b1768c78dee0d8e351b62339cdb58a9d3fb53b229cba8cdc3702aa105925c75238499
6
+ metadata.gz: 35933276e18f6001f41bdac6f18e073a0e320771e869353dd9d8d31d4ba399d42990c8aee9c3d48de9ee314ebb7dcdf6bde6e61278872c03e73f31230cb05114
7
+ data.tar.gz: '09e726ff79649735fea3656a4bae10a6dc8496234ac891d8062b1a219535e09b8318165e9a653f884c44abb83c5fe3eda42af801afb3ef7c97acbf678d095b95'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.33.0 (2024-12-03)
5
+ ------------------
6
+
7
+ * Feature - Added support for Async Invoke Operations Start, List and Get. Support for invocation logs with `requestMetadata` field in Converse, ConverseStream, Invoke and InvokeStream. Video content blocks in Converse/ConverseStream accept raw bytes or S3 URI.
8
+
4
9
  1.32.0 (2024-12-03)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.32.0
1
+ 1.33.0
@@ -460,6 +460,14 @@ module Aws::BedrockRuntime
460
460
 
461
461
  # The action to apply a guardrail.
462
462
  #
463
+ # For troubleshooting some of the common errors you might encounter when
464
+ # using the `ApplyGuardrail` API, see [Troubleshooting Amazon Bedrock
465
+ # API Error Codes][1] in the Amazon Bedrock User Guide
466
+ #
467
+ #
468
+ #
469
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
470
+ #
463
471
  # @option params [required, String] :guardrail_identifier
464
472
  # The guardrail identifier used in the request to apply the guardrail.
465
473
  #
@@ -669,10 +677,12 @@ module Aws::BedrockRuntime
669
677
  # Configuration information for the tools that the model can use when
670
678
  # generating a response.
671
679
  #
672
- # <note markdown="1"> This field is only supported by Anthropic Claude 3, Cohere Command R,
673
- # Cohere Command R+, and Mistral Large models.
680
+ # For information about models that support tool use, see [Supported
681
+ # models and model features][1].
682
+ #
674
683
  #
675
- # </note>
684
+ #
685
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features
676
686
  #
677
687
  # @option params [Types::GuardrailConfiguration] :guardrail_config
678
688
  # Configuration information for a guardrail that you want to use in the
@@ -723,6 +733,9 @@ module Aws::BedrockRuntime
723
733
  #
724
734
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
725
735
  #
736
+ # @option params [Hash<String,String>] :request_metadata
737
+ # Key-value pairs that you can use to filter invocation logs.
738
+ #
726
739
  # @option params [Types::PerformanceConfiguration] :performance_config
727
740
  # Model performance settings for the request.
728
741
  #
@@ -759,6 +772,16 @@ module Aws::BedrockRuntime
759
772
  # bytes: "data",
760
773
  # },
761
774
  # },
775
+ # video: {
776
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
777
+ # source: { # required
778
+ # bytes: "data",
779
+ # s3_location: {
780
+ # uri: "S3Uri", # required
781
+ # bucket_owner: "AccountId",
782
+ # },
783
+ # },
784
+ # },
762
785
  # tool_use: {
763
786
  # tool_use_id: "ToolUseId", # required
764
787
  # name: "ToolName", # required
@@ -785,6 +808,16 @@ module Aws::BedrockRuntime
785
808
  # bytes: "data",
786
809
  # },
787
810
  # },
811
+ # video: {
812
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
813
+ # source: { # required
814
+ # bytes: "data",
815
+ # s3_location: {
816
+ # uri: "S3Uri", # required
817
+ # bucket_owner: "AccountId",
818
+ # },
819
+ # },
820
+ # },
788
821
  # },
789
822
  # ],
790
823
  # status: "success", # accepts success, error
@@ -852,6 +885,9 @@ module Aws::BedrockRuntime
852
885
  # },
853
886
  # },
854
887
  # additional_model_response_field_paths: ["ConverseRequestAdditionalModelResponseFieldPathsListMemberString"],
888
+ # request_metadata: {
889
+ # "RequestMetadataKeyString" => "RequestMetadataValueString",
890
+ # },
855
891
  # performance_config: {
856
892
  # latency: "standard", # accepts standard, optimized
857
893
  # },
@@ -867,6 +903,10 @@ module Aws::BedrockRuntime
867
903
  # resp.output.message.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
868
904
  # resp.output.message.content[0].document.name #=> String
869
905
  # resp.output.message.content[0].document.source.bytes #=> String
906
+ # resp.output.message.content[0].video.format #=> String, one of "mkv", "mov", "mp4", "webm", "flv", "mpeg", "mpg", "wmv", "three_gp"
907
+ # resp.output.message.content[0].video.source.bytes #=> String
908
+ # resp.output.message.content[0].video.source.s3_location.uri #=> String
909
+ # resp.output.message.content[0].video.source.s3_location.bucket_owner #=> String
870
910
  # resp.output.message.content[0].tool_use.tool_use_id #=> String
871
911
  # resp.output.message.content[0].tool_use.name #=> String
872
912
  # resp.output.message.content[0].tool_result.tool_use_id #=> String
@@ -877,6 +917,10 @@ module Aws::BedrockRuntime
877
917
  # resp.output.message.content[0].tool_result.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
878
918
  # resp.output.message.content[0].tool_result.content[0].document.name #=> String
879
919
  # resp.output.message.content[0].tool_result.content[0].document.source.bytes #=> String
920
+ # resp.output.message.content[0].tool_result.content[0].video.format #=> String, one of "mkv", "mov", "mp4", "webm", "flv", "mpeg", "mpg", "wmv", "three_gp"
921
+ # resp.output.message.content[0].tool_result.content[0].video.source.bytes #=> String
922
+ # resp.output.message.content[0].tool_result.content[0].video.source.s3_location.uri #=> String
923
+ # resp.output.message.content[0].tool_result.content[0].video.source.s3_location.bucket_owner #=> String
880
924
  # resp.output.message.content[0].tool_result.status #=> String, one of "success", "error"
881
925
  # resp.output.message.content[0].guard_content.text.text #=> String
882
926
  # resp.output.message.content[0].guard_content.text.qualifiers #=> Array
@@ -1101,9 +1145,12 @@ module Aws::BedrockRuntime
1101
1145
  # Configuration information for the tools that the model can use when
1102
1146
  # generating a response.
1103
1147
  #
1104
- # <note markdown="1"> This field is only supported by Anthropic Claude 3 models.
1148
+ # For information about models that support streaming tool use, see
1149
+ # [Supported models and model features][1].
1150
+ #
1105
1151
  #
1106
- # </note>
1152
+ #
1153
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features
1107
1154
  #
1108
1155
  # @option params [Types::GuardrailStreamConfiguration] :guardrail_config
1109
1156
  # Configuration information for a guardrail that you want to use in the
@@ -1154,6 +1201,9 @@ module Aws::BedrockRuntime
1154
1201
  #
1155
1202
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
1156
1203
  #
1204
+ # @option params [Hash<String,String>] :request_metadata
1205
+ # Key-value pairs that you can use to filter invocation logs.
1206
+ #
1157
1207
  # @option params [Types::PerformanceConfiguration] :performance_config
1158
1208
  # Model performance settings for the request.
1159
1209
  #
@@ -1357,6 +1407,16 @@ module Aws::BedrockRuntime
1357
1407
  # bytes: "data",
1358
1408
  # },
1359
1409
  # },
1410
+ # video: {
1411
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
1412
+ # source: { # required
1413
+ # bytes: "data",
1414
+ # s3_location: {
1415
+ # uri: "S3Uri", # required
1416
+ # bucket_owner: "AccountId",
1417
+ # },
1418
+ # },
1419
+ # },
1360
1420
  # tool_use: {
1361
1421
  # tool_use_id: "ToolUseId", # required
1362
1422
  # name: "ToolName", # required
@@ -1383,6 +1443,16 @@ module Aws::BedrockRuntime
1383
1443
  # bytes: "data",
1384
1444
  # },
1385
1445
  # },
1446
+ # video: {
1447
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
1448
+ # source: { # required
1449
+ # bytes: "data",
1450
+ # s3_location: {
1451
+ # uri: "S3Uri", # required
1452
+ # bucket_owner: "AccountId",
1453
+ # },
1454
+ # },
1455
+ # },
1386
1456
  # },
1387
1457
  # ],
1388
1458
  # status: "success", # accepts success, error
@@ -1451,6 +1521,9 @@ module Aws::BedrockRuntime
1451
1521
  # },
1452
1522
  # },
1453
1523
  # additional_model_response_field_paths: ["ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString"],
1524
+ # request_metadata: {
1525
+ # "RequestMetadataKeyString" => "RequestMetadataValueString",
1526
+ # },
1454
1527
  # performance_config: {
1455
1528
  # latency: "standard", # accepts standard, optimized
1456
1529
  # },
@@ -1615,6 +1688,52 @@ module Aws::BedrockRuntime
1615
1688
  req.send_request(options, &block)
1616
1689
  end
1617
1690
 
1691
+ # Retrieve information about an asynchronous invocation.
1692
+ #
1693
+ # @option params [required, String] :invocation_arn
1694
+ # The invocation's ARN.
1695
+ #
1696
+ # @return [Types::GetAsyncInvokeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1697
+ #
1698
+ # * {Types::GetAsyncInvokeResponse#invocation_arn #invocation_arn} => String
1699
+ # * {Types::GetAsyncInvokeResponse#model_arn #model_arn} => String
1700
+ # * {Types::GetAsyncInvokeResponse#client_request_token #client_request_token} => String
1701
+ # * {Types::GetAsyncInvokeResponse#status #status} => String
1702
+ # * {Types::GetAsyncInvokeResponse#failure_message #failure_message} => String
1703
+ # * {Types::GetAsyncInvokeResponse#submit_time #submit_time} => Time
1704
+ # * {Types::GetAsyncInvokeResponse#last_modified_time #last_modified_time} => Time
1705
+ # * {Types::GetAsyncInvokeResponse#end_time #end_time} => Time
1706
+ # * {Types::GetAsyncInvokeResponse#output_data_config #output_data_config} => Types::AsyncInvokeOutputDataConfig
1707
+ #
1708
+ # @example Request syntax with placeholder values
1709
+ #
1710
+ # resp = client.get_async_invoke({
1711
+ # invocation_arn: "InvocationArn", # required
1712
+ # })
1713
+ #
1714
+ # @example Response structure
1715
+ #
1716
+ # resp.invocation_arn #=> String
1717
+ # resp.model_arn #=> String
1718
+ # resp.client_request_token #=> String
1719
+ # resp.status #=> String, one of "InProgress", "Completed", "Failed"
1720
+ # resp.failure_message #=> String
1721
+ # resp.submit_time #=> Time
1722
+ # resp.last_modified_time #=> Time
1723
+ # resp.end_time #=> Time
1724
+ # resp.output_data_config.s3_output_data_config.s3_uri #=> String
1725
+ # resp.output_data_config.s3_output_data_config.kms_key_id #=> String
1726
+ # resp.output_data_config.s3_output_data_config.bucket_owner #=> String
1727
+ #
1728
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GetAsyncInvoke AWS API Documentation
1729
+ #
1730
+ # @overload get_async_invoke(params = {})
1731
+ # @param [Hash] params ({})
1732
+ def get_async_invoke(params = {}, options = {})
1733
+ req = build_request(:get_async_invoke, params)
1734
+ req.send_request(options)
1735
+ end
1736
+
1618
1737
  # Invokes the specified Amazon Bedrock model to run inference using the
1619
1738
  # prompt and inference parameters provided in the request body. You use
1620
1739
  # model inference to generate text, images, and embeddings.
@@ -2095,6 +2214,154 @@ module Aws::BedrockRuntime
2095
2214
  req.send_request(options, &block)
2096
2215
  end
2097
2216
 
2217
+ # Lists asynchronous invocations.
2218
+ #
2219
+ # @option params [Time,DateTime,Date,Integer,String] :submit_time_after
2220
+ # Include invocations submitted after this time.
2221
+ #
2222
+ # @option params [Time,DateTime,Date,Integer,String] :submit_time_before
2223
+ # Include invocations submitted before this time.
2224
+ #
2225
+ # @option params [String] :status_equals
2226
+ # Filter invocations by status.
2227
+ #
2228
+ # @option params [Integer] :max_results
2229
+ # The maximum number of invocations to return in one page of results.
2230
+ #
2231
+ # @option params [String] :next_token
2232
+ # Specify the pagination token from a previous request to retrieve the
2233
+ # next page of results.
2234
+ #
2235
+ # @option params [String] :sort_by
2236
+ # How to sort the response.
2237
+ #
2238
+ # @option params [String] :sort_order
2239
+ # The sorting order for the response.
2240
+ #
2241
+ # @return [Types::ListAsyncInvokesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2242
+ #
2243
+ # * {Types::ListAsyncInvokesResponse#next_token #next_token} => String
2244
+ # * {Types::ListAsyncInvokesResponse#async_invoke_summaries #async_invoke_summaries} => Array&lt;Types::AsyncInvokeSummary&gt;
2245
+ #
2246
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2247
+ #
2248
+ # @example Request syntax with placeholder values
2249
+ #
2250
+ # resp = client.list_async_invokes({
2251
+ # submit_time_after: Time.now,
2252
+ # submit_time_before: Time.now,
2253
+ # status_equals: "InProgress", # accepts InProgress, Completed, Failed
2254
+ # max_results: 1,
2255
+ # next_token: "PaginationToken",
2256
+ # sort_by: "SubmissionTime", # accepts SubmissionTime
2257
+ # sort_order: "Ascending", # accepts Ascending, Descending
2258
+ # })
2259
+ #
2260
+ # @example Response structure
2261
+ #
2262
+ # resp.next_token #=> String
2263
+ # resp.async_invoke_summaries #=> Array
2264
+ # resp.async_invoke_summaries[0].invocation_arn #=> String
2265
+ # resp.async_invoke_summaries[0].model_arn #=> String
2266
+ # resp.async_invoke_summaries[0].client_request_token #=> String
2267
+ # resp.async_invoke_summaries[0].status #=> String, one of "InProgress", "Completed", "Failed"
2268
+ # resp.async_invoke_summaries[0].failure_message #=> String
2269
+ # resp.async_invoke_summaries[0].submit_time #=> Time
2270
+ # resp.async_invoke_summaries[0].last_modified_time #=> Time
2271
+ # resp.async_invoke_summaries[0].end_time #=> Time
2272
+ # resp.async_invoke_summaries[0].output_data_config.s3_output_data_config.s3_uri #=> String
2273
+ # resp.async_invoke_summaries[0].output_data_config.s3_output_data_config.kms_key_id #=> String
2274
+ # resp.async_invoke_summaries[0].output_data_config.s3_output_data_config.bucket_owner #=> String
2275
+ #
2276
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ListAsyncInvokes AWS API Documentation
2277
+ #
2278
+ # @overload list_async_invokes(params = {})
2279
+ # @param [Hash] params ({})
2280
+ def list_async_invokes(params = {}, options = {})
2281
+ req = build_request(:list_async_invokes, params)
2282
+ req.send_request(options)
2283
+ end
2284
+
2285
+ # Starts an asynchronous invocation.
2286
+ #
2287
+ # This operation requires permission for the `bedrock:InvokeModel`
2288
+ # action.
2289
+ #
2290
+ # To deny all inference access to resources that you specify in the
2291
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
2292
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
2293
+ # denies access to the resource through the Converse API actions
2294
+ # ([Converse][1] and [ConverseStream][2]). For more information see
2295
+ # [Deny access for inference on specific models][3].
2296
+ #
2297
+ #
2298
+ #
2299
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
2300
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
2301
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
2302
+ #
2303
+ # @option params [String] :client_request_token
2304
+ # Specify idempotency token to ensure that requests are not duplicated.
2305
+ #
2306
+ # **A suitable default value is auto-generated.** You should normally
2307
+ # not need to pass this option.**
2308
+ #
2309
+ # @option params [required, String] :model_id
2310
+ # The model to invoke.
2311
+ #
2312
+ # @option params [required, Hash,Array,String,Numeric,Boolean] :model_input
2313
+ # Input to send to the model.
2314
+ #
2315
+ # Document type used to carry open content
2316
+ # (Hash,Array,String,Numeric,Boolean). A document type value is
2317
+ # serialized using the same format as its surroundings and requires no
2318
+ # additional encoding or escaping.
2319
+ #
2320
+ # @option params [required, Types::AsyncInvokeOutputDataConfig] :output_data_config
2321
+ # Where to store the output.
2322
+ #
2323
+ # @option params [Array<Types::Tag>] :tags
2324
+ # Tags to apply to the invocation.
2325
+ #
2326
+ # @return [Types::StartAsyncInvokeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2327
+ #
2328
+ # * {Types::StartAsyncInvokeResponse#invocation_arn #invocation_arn} => String
2329
+ #
2330
+ # @example Request syntax with placeholder values
2331
+ #
2332
+ # resp = client.start_async_invoke({
2333
+ # client_request_token: "AsyncInvokeIdempotencyToken",
2334
+ # model_id: "AsyncInvokeIdentifier", # required
2335
+ # model_input: { # required
2336
+ # },
2337
+ # output_data_config: { # required
2338
+ # s3_output_data_config: {
2339
+ # s3_uri: "S3Uri", # required
2340
+ # kms_key_id: "KmsKeyId",
2341
+ # bucket_owner: "AccountId",
2342
+ # },
2343
+ # },
2344
+ # tags: [
2345
+ # {
2346
+ # key: "TagKey", # required
2347
+ # value: "TagValue", # required
2348
+ # },
2349
+ # ],
2350
+ # })
2351
+ #
2352
+ # @example Response structure
2353
+ #
2354
+ # resp.invocation_arn #=> String
2355
+ #
2356
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/StartAsyncInvoke AWS API Documentation
2357
+ #
2358
+ # @overload start_async_invoke(params = {})
2359
+ # @param [Hash] params ({})
2360
+ def start_async_invoke(params = {}, options = {})
2361
+ req = build_request(:start_async_invoke, params)
2362
+ req.send_request(options)
2363
+ end
2364
+
2098
2365
  # @!endgroup
2099
2366
 
2100
2367
  # @param params ({})
@@ -2113,7 +2380,7 @@ module Aws::BedrockRuntime
2113
2380
  tracer: tracer
2114
2381
  )
2115
2382
  context[:gem_name] = 'aws-sdk-bedrockruntime'
2116
- context[:gem_version] = '1.32.0'
2383
+ context[:gem_version] = '1.33.0'
2117
2384
  Seahorse::Client::Request.new(handlers, context)
2118
2385
  end
2119
2386