aws-sdk-bedrockruntime 1.28.0 → 1.44.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.
@@ -10,7 +10,13 @@
10
10
  module Aws::BedrockRuntime
11
11
  module Types
12
12
 
13
- # The request is denied because of missing access permissions.
13
+ # The request is denied because you do not have sufficient permissions
14
+ # to perform the requested action. For troubleshooting this error, see
15
+ # [AccessDeniedException][1] in the Amazon Bedrock User Guide
16
+ #
17
+ #
18
+ #
19
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied
14
20
  #
15
21
  # @!attribute [rw] message
16
22
  # @return [String]
@@ -24,7 +30,7 @@ module Aws::BedrockRuntime
24
30
  end
25
31
 
26
32
  # The model must request at least one tool (no text is generated). For
27
- # example, `\{"any" : \{\}\}`.
33
+ # example, `{"any" : {}}`.
28
34
  #
29
35
  # @api private
30
36
  #
@@ -48,13 +54,25 @@ module Aws::BedrockRuntime
48
54
  # The content details used in the request to apply the guardrail.
49
55
  # @return [Array<Types::GuardrailContentBlock>]
50
56
  #
57
+ # @!attribute [rw] output_scope
58
+ # Specifies the scope of the output that you get in the response. Set
59
+ # to `FULL` to return the entire output, including any detected and
60
+ # non-detected entries in the response for enhanced debugging.
61
+ #
62
+ # Note that the full output scope doesn't apply to word filters or
63
+ # regex in sensitive information filters. It does apply to all other
64
+ # filtering policies, including sensitive information with filters
65
+ # that can detect personally identifiable information (PII).
66
+ # @return [String]
67
+ #
51
68
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ApplyGuardrailRequest AWS API Documentation
52
69
  #
53
70
  class ApplyGuardrailRequest < Struct.new(
54
71
  :guardrail_identifier,
55
72
  :guardrail_version,
56
73
  :source,
57
- :content)
74
+ :content,
75
+ :output_scope)
58
76
  SENSITIVE = []
59
77
  include Aws::Structure
60
78
  end
@@ -67,6 +85,10 @@ module Aws::BedrockRuntime
67
85
  # The action taken in the response from the guardrail.
68
86
  # @return [String]
69
87
  #
88
+ # @!attribute [rw] action_reason
89
+ # The reason for the action taken when harmful content is detected.
90
+ # @return [String]
91
+ #
70
92
  # @!attribute [rw] outputs
71
93
  # The output details in the response from the guardrail.
72
94
  # @return [Array<Types::GuardrailOutputContent>]
@@ -84,6 +106,7 @@ module Aws::BedrockRuntime
84
106
  class ApplyGuardrailResponse < Struct.new(
85
107
  :usage,
86
108
  :action,
109
+ :action_reason,
87
110
  :outputs,
88
111
  :assessments,
89
112
  :guardrail_coverage)
@@ -91,8 +114,110 @@ module Aws::BedrockRuntime
91
114
  include Aws::Structure
92
115
  end
93
116
 
117
+ # Asynchronous invocation output data settings.
118
+ #
119
+ # @note AsyncInvokeOutputDataConfig is a union - when making an API calls you must set exactly one of the members.
120
+ #
121
+ # @note AsyncInvokeOutputDataConfig is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of AsyncInvokeOutputDataConfig corresponding to the set member.
122
+ #
123
+ # @!attribute [rw] s3_output_data_config
124
+ # A storage location for the output data in an S3 bucket
125
+ # @return [Types::AsyncInvokeS3OutputDataConfig]
126
+ #
127
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/AsyncInvokeOutputDataConfig AWS API Documentation
128
+ #
129
+ class AsyncInvokeOutputDataConfig < Struct.new(
130
+ :s3_output_data_config,
131
+ :unknown)
132
+ SENSITIVE = []
133
+ include Aws::Structure
134
+ include Aws::Structure::Union
135
+
136
+ class S3OutputDataConfig < AsyncInvokeOutputDataConfig; end
137
+ class Unknown < AsyncInvokeOutputDataConfig; end
138
+ end
139
+
140
+ # Asynchronous invocation output data settings.
141
+ #
142
+ # @!attribute [rw] s3_uri
143
+ # An object URI starting with `s3://`.
144
+ # @return [String]
145
+ #
146
+ # @!attribute [rw] kms_key_id
147
+ # A KMS encryption key ID.
148
+ # @return [String]
149
+ #
150
+ # @!attribute [rw] bucket_owner
151
+ # If the bucket belongs to another AWS account, specify that
152
+ # account's ID.
153
+ # @return [String]
154
+ #
155
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/AsyncInvokeS3OutputDataConfig AWS API Documentation
156
+ #
157
+ class AsyncInvokeS3OutputDataConfig < Struct.new(
158
+ :s3_uri,
159
+ :kms_key_id,
160
+ :bucket_owner)
161
+ SENSITIVE = []
162
+ include Aws::Structure
163
+ end
164
+
165
+ # A summary of an asynchronous invocation.
166
+ #
167
+ # @!attribute [rw] invocation_arn
168
+ # The invocation's ARN.
169
+ # @return [String]
170
+ #
171
+ # @!attribute [rw] model_arn
172
+ # The invoked model's ARN.
173
+ # @return [String]
174
+ #
175
+ # @!attribute [rw] client_request_token
176
+ # The invocation's idempotency token.
177
+ # @return [String]
178
+ #
179
+ # @!attribute [rw] status
180
+ # The invocation's status.
181
+ # @return [String]
182
+ #
183
+ # @!attribute [rw] failure_message
184
+ # An error message.
185
+ # @return [String]
186
+ #
187
+ # @!attribute [rw] submit_time
188
+ # When the invocation was submitted.
189
+ # @return [Time]
190
+ #
191
+ # @!attribute [rw] last_modified_time
192
+ # When the invocation was last modified.
193
+ # @return [Time]
194
+ #
195
+ # @!attribute [rw] end_time
196
+ # When the invocation ended.
197
+ # @return [Time]
198
+ #
199
+ # @!attribute [rw] output_data_config
200
+ # The invocation's output data settings.
201
+ # @return [Types::AsyncInvokeOutputDataConfig]
202
+ #
203
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/AsyncInvokeSummary AWS API Documentation
204
+ #
205
+ class AsyncInvokeSummary < Struct.new(
206
+ :invocation_arn,
207
+ :model_arn,
208
+ :client_request_token,
209
+ :status,
210
+ :failure_message,
211
+ :submit_time,
212
+ :last_modified_time,
213
+ :end_time,
214
+ :output_data_config)
215
+ SENSITIVE = [:failure_message]
216
+ include Aws::Structure
217
+ end
218
+
94
219
  # The Model automatically decides if a tool should be called or whether
95
- # to generate text instead. For example, `\{"auto" : \{\}\}`.
220
+ # to generate text instead. For example, `{"auto" : {}}`.
96
221
  #
97
222
  # @api private
98
223
  #
@@ -100,6 +225,66 @@ module Aws::BedrockRuntime
100
225
  #
101
226
  class AutoToolChoice < Aws::EmptyStructure; end
102
227
 
228
+ # Payload content for the bidirectional input. The input is an audio
229
+ # stream.
230
+ #
231
+ # @!attribute [rw] bytes
232
+ # The audio content for the bidirectional input.
233
+ # @return [String]
234
+ #
235
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/BidirectionalInputPayloadPart AWS API Documentation
236
+ #
237
+ class BidirectionalInputPayloadPart < Struct.new(
238
+ :bytes,
239
+ :event_type)
240
+ SENSITIVE = [:bytes]
241
+ include Aws::Structure
242
+ end
243
+
244
+ # Output from the bidirectional stream. The output is speech and a text
245
+ # transcription.
246
+ #
247
+ # @!attribute [rw] bytes
248
+ # The speech output of the bidirectional stream.
249
+ # @return [String]
250
+ #
251
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/BidirectionalOutputPayloadPart AWS API Documentation
252
+ #
253
+ class BidirectionalOutputPayloadPart < Struct.new(
254
+ :bytes,
255
+ :event_type)
256
+ SENSITIVE = [:bytes]
257
+ include Aws::Structure
258
+ end
259
+
260
+ # Defines a section of content to be cached for reuse in subsequent API
261
+ # calls.
262
+ #
263
+ # @!attribute [rw] type
264
+ # Specifies the type of cache point within the CachePointBlock.
265
+ # @return [String]
266
+ #
267
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/CachePointBlock AWS API Documentation
268
+ #
269
+ class CachePointBlock < Struct.new(
270
+ :type)
271
+ SENSITIVE = []
272
+ include Aws::Structure
273
+ end
274
+
275
+ # Error occurred because of a conflict while performing an operation.
276
+ #
277
+ # @!attribute [rw] message
278
+ # @return [String]
279
+ #
280
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConflictException AWS API Documentation
281
+ #
282
+ class ConflictException < Struct.new(
283
+ :message)
284
+ SENSITIVE = []
285
+ include Aws::Structure
286
+ end
287
+
103
288
  # A block of content for a message that you pass to, or receive from, a
104
289
  # model with the [Converse][1] or [ConverseStream][2] API operations.
105
290
  #
@@ -128,6 +313,10 @@ module Aws::BedrockRuntime
128
313
  # A document to include in the message.
129
314
  # @return [Types::DocumentBlock]
130
315
  #
316
+ # @!attribute [rw] video
317
+ # Video to include in the message.
318
+ # @return [Types::VideoBlock]
319
+ #
131
320
  # @!attribute [rw] tool_use
132
321
  # Information about a tool use request from a model.
133
322
  # @return [Types::ToolUseBlock]
@@ -145,30 +334,46 @@ module Aws::BedrockRuntime
145
334
  # the *Amazon Bedrock User Guide*. </p>
146
335
  # @return [Types::GuardrailConverseContentBlock]
147
336
  #
337
+ # @!attribute [rw] cache_point
338
+ # CachePoint to include in the message.
339
+ # @return [Types::CachePointBlock]
340
+ #
341
+ # @!attribute [rw] reasoning_content
342
+ # Contains content regarding the reasoning that is carried out by the
343
+ # model. Reasoning refers to a Chain of Thought (CoT) that the model
344
+ # generates to enhance the accuracy of its final response.
345
+ # @return [Types::ReasoningContentBlock]
346
+ #
148
347
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ContentBlock AWS API Documentation
149
348
  #
150
349
  class ContentBlock < Struct.new(
151
350
  :text,
152
351
  :image,
153
352
  :document,
353
+ :video,
154
354
  :tool_use,
155
355
  :tool_result,
156
356
  :guard_content,
357
+ :cache_point,
358
+ :reasoning_content,
157
359
  :unknown)
158
- SENSITIVE = []
360
+ SENSITIVE = [:reasoning_content]
159
361
  include Aws::Structure
160
362
  include Aws::Structure::Union
161
363
 
162
364
  class Text < ContentBlock; end
163
365
  class Image < ContentBlock; end
164
366
  class Document < ContentBlock; end
367
+ class Video < ContentBlock; end
165
368
  class ToolUse < ContentBlock; end
166
369
  class ToolResult < ContentBlock; end
167
370
  class GuardContent < ContentBlock; end
371
+ class CachePoint < ContentBlock; end
372
+ class ReasoningContent < ContentBlock; end
168
373
  class Unknown < ContentBlock; end
169
374
  end
170
375
 
171
- # A bock of content in a streaming response.
376
+ # A block of content in a streaming response.
172
377
  #
173
378
  # @note ContentBlockDelta is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of ContentBlockDelta corresponding to the set member.
174
379
  #
@@ -180,18 +385,26 @@ module Aws::BedrockRuntime
180
385
  # Information about a tool that the model is requesting to use.
181
386
  # @return [Types::ToolUseBlockDelta]
182
387
  #
388
+ # @!attribute [rw] reasoning_content
389
+ # Contains content regarding the reasoning that is carried out by the
390
+ # model. Reasoning refers to a Chain of Thought (CoT) that the model
391
+ # generates to enhance the accuracy of its final response.
392
+ # @return [Types::ReasoningContentBlockDelta]
393
+ #
183
394
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ContentBlockDelta AWS API Documentation
184
395
  #
185
396
  class ContentBlockDelta < Struct.new(
186
397
  :text,
187
398
  :tool_use,
399
+ :reasoning_content,
188
400
  :unknown)
189
- SENSITIVE = []
401
+ SENSITIVE = [:reasoning_content]
190
402
  include Aws::Structure
191
403
  include Aws::Structure::Union
192
404
 
193
405
  class Text < ContentBlockDelta; end
194
406
  class ToolUse < ContentBlockDelta; end
407
+ class ReasoningContent < ContentBlockDelta; end
195
408
  class Unknown < ContentBlockDelta; end
196
409
  end
197
410
 
@@ -315,10 +528,9 @@ module Aws::BedrockRuntime
315
528
  end
316
529
 
317
530
  # @!attribute [rw] model_id
318
- # The identifier for the model that you want to call.
319
- #
320
- # The `modelId` to provide depends on the type of model or throughput
321
- # that you use:
531
+ # Specifies the model or throughput with which to run inference, or
532
+ # the prompt resource to use in inference. The value depends on the
533
+ # resource that you use:
322
534
  #
323
535
  # * If you use a base model, specify the model ID or its ARN. For a
324
536
  # list of model IDs for base models, see [Amazon Bedrock base model
@@ -338,7 +550,10 @@ module Aws::BedrockRuntime
338
550
  # For more information, see [Use a custom model in Amazon
339
551
  # Bedrock][4] in the Amazon Bedrock User Guide.
340
552
  #
341
- # The Converse API doesn't support [imported models][5].
553
+ # * To include a prompt that was defined in [Prompt management][5],
554
+ # specify the ARN of the prompt version to use.
555
+ #
556
+ # The Converse API doesn't support [imported models][6].
342
557
  #
343
558
  #
344
559
  #
@@ -346,7 +561,8 @@ module Aws::BedrockRuntime
346
561
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
347
562
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
348
563
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
349
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
564
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
565
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
350
566
  # @return [String]
351
567
  #
352
568
  # @!attribute [rw] messages
@@ -354,13 +570,15 @@ module Aws::BedrockRuntime
354
570
  # @return [Array<Types::Message>]
355
571
  #
356
572
  # @!attribute [rw] system
357
- # A system prompt to pass to the model.
573
+ # A prompt that provides instructions or context to the model about
574
+ # the task it should perform, or the persona it should adopt during
575
+ # the conversation.
358
576
  # @return [Array<Types::SystemContentBlock>]
359
577
  #
360
578
  # @!attribute [rw] inference_config
361
- # Inference parameters to pass to the model. `Converse` supports a
362
- # base set of inference parameters. If you need to pass additional
363
- # parameters that the model supports, use the
579
+ # Inference parameters to pass to the model. `Converse` and
580
+ # `ConverseStream` support a base set of inference parameters. If you
581
+ # need to pass additional parameters that the model supports, use the
364
582
  # `additionalModelRequestFields` request field.
365
583
  # @return [Types::InferenceConfiguration]
366
584
  #
@@ -368,49 +586,71 @@ module Aws::BedrockRuntime
368
586
  # Configuration information for the tools that the model can use when
369
587
  # generating a response.
370
588
  #
371
- # <note markdown="1"> This field is only supported by Anthropic Claude 3, Cohere Command
372
- # R, Cohere Command R+, and Mistral Large models.
589
+ # For information about models that support tool use, see [Supported
590
+ # models and model features][1].
373
591
  #
374
- # </note>
592
+ #
593
+ #
594
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features
375
595
  # @return [Types::ToolConfiguration]
376
596
  #
377
597
  # @!attribute [rw] guardrail_config
378
598
  # Configuration information for a guardrail that you want to use in
379
- # the request.
599
+ # the request. If you include `guardContent` blocks in the `content`
600
+ # field in the `messages` field, the guardrail operates only on those
601
+ # messages. If you include no `guardContent` blocks, the guardrail
602
+ # operates on all messages in the request body and in any included
603
+ # prompt resource.
380
604
  # @return [Types::GuardrailConfiguration]
381
605
  #
382
606
  # @!attribute [rw] additional_model_request_fields
383
607
  # Additional inference parameters that the model supports, beyond the
384
- # base set of inference parameters that `Converse` supports in the
385
- # `inferenceConfig` field. For more information, see [Model
386
- # parameters][1].
608
+ # base set of inference parameters that `Converse` and
609
+ # `ConverseStream` support in the `inferenceConfig` field. For more
610
+ # information, see [Model parameters][1].
387
611
  #
388
612
  #
389
613
  #
390
614
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
391
615
  # @return [Hash,Array,String,Numeric,Boolean]
392
616
  #
617
+ # @!attribute [rw] prompt_variables
618
+ # Contains a map of variables in a prompt from Prompt management to
619
+ # objects containing the values to fill in for them when running model
620
+ # invocation. This field is ignored if you don't specify a prompt
621
+ # resource in the `modelId` field.
622
+ # @return [Hash<String,Types::PromptVariableValues>]
623
+ #
393
624
  # @!attribute [rw] additional_model_response_field_paths
394
625
  # Additional model parameters field paths to return in the response.
395
- # `Converse` returns the requested fields as a JSON Pointer object in
396
- # the `additionalModelResponseFields` field. The following is example
397
- # JSON for `additionalModelResponseFieldPaths`.
626
+ # `Converse` and `ConverseStream` return the requested fields as a
627
+ # JSON Pointer object in the `additionalModelResponseFields` field.
628
+ # The following is example JSON for
629
+ # `additionalModelResponseFieldPaths`.
398
630
  #
399
631
  # `[ "/stop_sequence" ]`
400
632
  #
401
633
  # For information about the JSON Pointer syntax, see the [Internet
402
634
  # Engineering Task Force (IETF)][1] documentation.
403
635
  #
404
- # `Converse` rejects an empty JSON Pointer or incorrectly structured
405
- # JSON Pointer with a `400` error code. if the JSON Pointer is valid,
406
- # but the requested field is not in the model response, it is ignored
407
- # by `Converse`.
636
+ # `Converse` and `ConverseStream` reject an empty JSON Pointer or
637
+ # incorrectly structured JSON Pointer with a `400` error code. if the
638
+ # JSON Pointer is valid, but the requested field is not in the model
639
+ # response, it is ignored by `Converse`.
408
640
  #
409
641
  #
410
642
  #
411
643
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
412
644
  # @return [Array<String>]
413
645
  #
646
+ # @!attribute [rw] request_metadata
647
+ # Key-value pairs that you can use to filter invocation logs.
648
+ # @return [Hash<String,String>]
649
+ #
650
+ # @!attribute [rw] performance_config
651
+ # Model performance settings for the request.
652
+ # @return [Types::PerformanceConfiguration]
653
+ #
414
654
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseRequest AWS API Documentation
415
655
  #
416
656
  class ConverseRequest < Struct.new(
@@ -421,8 +661,11 @@ module Aws::BedrockRuntime
421
661
  :tool_config,
422
662
  :guardrail_config,
423
663
  :additional_model_request_fields,
424
- :additional_model_response_field_paths)
425
- SENSITIVE = []
664
+ :prompt_variables,
665
+ :additional_model_response_field_paths,
666
+ :request_metadata,
667
+ :performance_config)
668
+ SENSITIVE = [:prompt_variables, :request_metadata]
426
669
  include Aws::Structure
427
670
  end
428
671
 
@@ -453,6 +696,10 @@ module Aws::BedrockRuntime
453
696
  # behavior.
454
697
  # @return [Types::ConverseTrace]
455
698
  #
699
+ # @!attribute [rw] performance_config
700
+ # Model performance settings for the request.
701
+ # @return [Types::PerformanceConfiguration]
702
+ #
456
703
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseResponse AWS API Documentation
457
704
  #
458
705
  class ConverseResponse < Struct.new(
@@ -461,7 +708,8 @@ module Aws::BedrockRuntime
461
708
  :usage,
462
709
  :metrics,
463
710
  :additional_model_response_fields,
464
- :trace)
711
+ :trace,
712
+ :performance_config)
465
713
  SENSITIVE = []
466
714
  include Aws::Structure
467
715
  end
@@ -485,12 +733,18 @@ module Aws::BedrockRuntime
485
733
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
486
734
  # @return [Types::ConverseStreamTrace]
487
735
  #
736
+ # @!attribute [rw] performance_config
737
+ # Model performance configuration metadata for the conversation stream
738
+ # event.
739
+ # @return [Types::PerformanceConfiguration]
740
+ #
488
741
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamMetadataEvent AWS API Documentation
489
742
  #
490
743
  class ConverseStreamMetadataEvent < Struct.new(
491
744
  :usage,
492
745
  :metrics,
493
746
  :trace,
747
+ :performance_config,
494
748
  :event_type)
495
749
  SENSITIVE = []
496
750
  include Aws::Structure
@@ -511,10 +765,9 @@ module Aws::BedrockRuntime
511
765
  end
512
766
 
513
767
  # @!attribute [rw] model_id
514
- # The ID for the model.
515
- #
516
- # The `modelId` to provide depends on the type of model or throughput
517
- # that you use:
768
+ # Specifies the model or throughput with which to run inference, or
769
+ # the prompt resource to use in inference. The value depends on the
770
+ # resource that you use:
518
771
  #
519
772
  # * If you use a base model, specify the model ID or its ARN. For a
520
773
  # list of model IDs for base models, see [Amazon Bedrock base model
@@ -534,7 +787,10 @@ module Aws::BedrockRuntime
534
787
  # For more information, see [Use a custom model in Amazon
535
788
  # Bedrock][4] in the Amazon Bedrock User Guide.
536
789
  #
537
- # The Converse API doesn't support [imported models][5].
790
+ # * To include a prompt that was defined in [Prompt management][5],
791
+ # specify the ARN of the prompt version to use.
792
+ #
793
+ # The Converse API doesn't support [imported models][6].
538
794
  #
539
795
  #
540
796
  #
@@ -542,7 +798,8 @@ module Aws::BedrockRuntime
542
798
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
543
799
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
544
800
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
545
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
801
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
802
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
546
803
  # @return [String]
547
804
  #
548
805
  # @!attribute [rw] messages
@@ -550,13 +807,15 @@ module Aws::BedrockRuntime
550
807
  # @return [Array<Types::Message>]
551
808
  #
552
809
  # @!attribute [rw] system
553
- # A system prompt to send to the model.
810
+ # A prompt that provides instructions or context to the model about
811
+ # the task it should perform, or the persona it should adopt during
812
+ # the conversation.
554
813
  # @return [Array<Types::SystemContentBlock>]
555
814
  #
556
815
  # @!attribute [rw] inference_config
557
- # Inference parameters to pass to the model. `ConverseStream` supports
558
- # a base set of inference parameters. If you need to pass additional
559
- # parameters that the model supports, use the
816
+ # Inference parameters to pass to the model. `Converse` and
817
+ # `ConverseStream` support a base set of inference parameters. If you
818
+ # need to pass additional parameters that the model supports, use the
560
819
  # `additionalModelRequestFields` request field.
561
820
  # @return [Types::InferenceConfiguration]
562
821
  #
@@ -564,43 +823,71 @@ module Aws::BedrockRuntime
564
823
  # Configuration information for the tools that the model can use when
565
824
  # generating a response.
566
825
  #
567
- # <note markdown="1"> This field is only supported by Anthropic Claude 3 models.
826
+ # For information about models that support streaming tool use, see
827
+ # [Supported models and model features][1].
568
828
  #
569
- # </note>
829
+ #
830
+ #
831
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features
570
832
  # @return [Types::ToolConfiguration]
571
833
  #
572
834
  # @!attribute [rw] guardrail_config
573
835
  # Configuration information for a guardrail that you want to use in
574
- # the request.
836
+ # the request. If you include `guardContent` blocks in the `content`
837
+ # field in the `messages` field, the guardrail operates only on those
838
+ # messages. If you include no `guardContent` blocks, the guardrail
839
+ # operates on all messages in the request body and in any included
840
+ # prompt resource.
575
841
  # @return [Types::GuardrailStreamConfiguration]
576
842
  #
577
843
  # @!attribute [rw] additional_model_request_fields
578
844
  # Additional inference parameters that the model supports, beyond the
579
- # base set of inference parameters that `ConverseStream` supports in
580
- # the `inferenceConfig` field.
845
+ # base set of inference parameters that `Converse` and
846
+ # `ConverseStream` support in the `inferenceConfig` field. For more
847
+ # information, see [Model parameters][1].
848
+ #
849
+ #
850
+ #
851
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
581
852
  # @return [Hash,Array,String,Numeric,Boolean]
582
853
  #
854
+ # @!attribute [rw] prompt_variables
855
+ # Contains a map of variables in a prompt from Prompt management to
856
+ # objects containing the values to fill in for them when running model
857
+ # invocation. This field is ignored if you don't specify a prompt
858
+ # resource in the `modelId` field.
859
+ # @return [Hash<String,Types::PromptVariableValues>]
860
+ #
583
861
  # @!attribute [rw] additional_model_response_field_paths
584
862
  # Additional model parameters field paths to return in the response.
585
- # `ConverseStream` returns the requested fields as a JSON Pointer
586
- # object in the `additionalModelResponseFields` field. The following
587
- # is example JSON for `additionalModelResponseFieldPaths`.
863
+ # `Converse` and `ConverseStream` return the requested fields as a
864
+ # JSON Pointer object in the `additionalModelResponseFields` field.
865
+ # The following is example JSON for
866
+ # `additionalModelResponseFieldPaths`.
588
867
  #
589
868
  # `[ "/stop_sequence" ]`
590
869
  #
591
870
  # For information about the JSON Pointer syntax, see the [Internet
592
871
  # Engineering Task Force (IETF)][1] documentation.
593
872
  #
594
- # `ConverseStream` rejects an empty JSON Pointer or incorrectly
595
- # structured JSON Pointer with a `400` error code. if the JSON Pointer
596
- # is valid, but the requested field is not in the model response, it
597
- # is ignored by `ConverseStream`.
873
+ # `Converse` and `ConverseStream` reject an empty JSON Pointer or
874
+ # incorrectly structured JSON Pointer with a `400` error code. if the
875
+ # JSON Pointer is valid, but the requested field is not in the model
876
+ # response, it is ignored by `Converse`.
598
877
  #
599
878
  #
600
879
  #
601
880
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
602
881
  # @return [Array<String>]
603
882
  #
883
+ # @!attribute [rw] request_metadata
884
+ # Key-value pairs that you can use to filter invocation logs.
885
+ # @return [Hash<String,String>]
886
+ #
887
+ # @!attribute [rw] performance_config
888
+ # Model performance settings for the request.
889
+ # @return [Types::PerformanceConfiguration]
890
+ #
604
891
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamRequest AWS API Documentation
605
892
  #
606
893
  class ConverseStreamRequest < Struct.new(
@@ -611,8 +898,11 @@ module Aws::BedrockRuntime
611
898
  :tool_config,
612
899
  :guardrail_config,
613
900
  :additional_model_request_fields,
614
- :additional_model_response_field_paths)
615
- SENSITIVE = []
901
+ :prompt_variables,
902
+ :additional_model_response_field_paths,
903
+ :request_metadata,
904
+ :performance_config)
905
+ SENSITIVE = [:prompt_variables, :request_metadata]
616
906
  include Aws::Structure
617
907
  end
618
908
 
@@ -639,10 +929,15 @@ module Aws::BedrockRuntime
639
929
  # The guardrail trace object.
640
930
  # @return [Types::GuardrailTraceAssessment]
641
931
  #
932
+ # @!attribute [rw] prompt_router
933
+ # The request's prompt router.
934
+ # @return [Types::PromptRouterTrace]
935
+ #
642
936
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamTrace AWS API Documentation
643
937
  #
644
938
  class ConverseStreamTrace < Struct.new(
645
- :guardrail)
939
+ :guardrail,
940
+ :prompt_router)
646
941
  SENSITIVE = []
647
942
  include Aws::Structure
648
943
  end
@@ -658,10 +953,15 @@ module Aws::BedrockRuntime
658
953
  # The guardrail trace object.
659
954
  # @return [Types::GuardrailTraceAssessment]
660
955
  #
956
+ # @!attribute [rw] prompt_router
957
+ # The request's prompt router.
958
+ # @return [Types::PromptRouterTrace]
959
+ #
661
960
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseTrace AWS API Documentation
662
961
  #
663
962
  class ConverseTrace < Struct.new(
664
- :guardrail)
963
+ :guardrail,
964
+ :prompt_router)
665
965
  SENSITIVE = []
666
966
  include Aws::Structure
667
967
  end
@@ -731,6 +1031,70 @@ module Aws::BedrockRuntime
731
1031
  class Unknown < DocumentSource; end
732
1032
  end
733
1033
 
1034
+ # @!attribute [rw] invocation_arn
1035
+ # The invocation's ARN.
1036
+ # @return [String]
1037
+ #
1038
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GetAsyncInvokeRequest AWS API Documentation
1039
+ #
1040
+ class GetAsyncInvokeRequest < Struct.new(
1041
+ :invocation_arn)
1042
+ SENSITIVE = []
1043
+ include Aws::Structure
1044
+ end
1045
+
1046
+ # @!attribute [rw] invocation_arn
1047
+ # The invocation's ARN.
1048
+ # @return [String]
1049
+ #
1050
+ # @!attribute [rw] model_arn
1051
+ # The invocation's model ARN.
1052
+ # @return [String]
1053
+ #
1054
+ # @!attribute [rw] client_request_token
1055
+ # The invocation's idempotency token.
1056
+ # @return [String]
1057
+ #
1058
+ # @!attribute [rw] status
1059
+ # The invocation's status.
1060
+ # @return [String]
1061
+ #
1062
+ # @!attribute [rw] failure_message
1063
+ # An error message.
1064
+ # @return [String]
1065
+ #
1066
+ # @!attribute [rw] submit_time
1067
+ # When the invocation request was submitted.
1068
+ # @return [Time]
1069
+ #
1070
+ # @!attribute [rw] last_modified_time
1071
+ # The invocation's last modified time.
1072
+ # @return [Time]
1073
+ #
1074
+ # @!attribute [rw] end_time
1075
+ # When the invocation ended.
1076
+ # @return [Time]
1077
+ #
1078
+ # @!attribute [rw] output_data_config
1079
+ # Output data settings.
1080
+ # @return [Types::AsyncInvokeOutputDataConfig]
1081
+ #
1082
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GetAsyncInvokeResponse AWS API Documentation
1083
+ #
1084
+ class GetAsyncInvokeResponse < Struct.new(
1085
+ :invocation_arn,
1086
+ :model_arn,
1087
+ :client_request_token,
1088
+ :status,
1089
+ :failure_message,
1090
+ :submit_time,
1091
+ :last_modified_time,
1092
+ :end_time,
1093
+ :output_data_config)
1094
+ SENSITIVE = [:failure_message]
1095
+ include Aws::Structure
1096
+ end
1097
+
734
1098
  # A behavior assessment of the guardrail policies used in a call to the
735
1099
  # Converse API.
736
1100
  #
@@ -808,16 +1172,23 @@ module Aws::BedrockRuntime
808
1172
  # Text within content block to be evaluated by the guardrail.
809
1173
  # @return [Types::GuardrailTextBlock]
810
1174
  #
1175
+ # @!attribute [rw] image
1176
+ # Image within guardrail content block to be evaluated by the
1177
+ # guardrail.
1178
+ # @return [Types::GuardrailImageBlock]
1179
+ #
811
1180
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailContentBlock AWS API Documentation
812
1181
  #
813
1182
  class GuardrailContentBlock < Struct.new(
814
1183
  :text,
1184
+ :image,
815
1185
  :unknown)
816
- SENSITIVE = []
1186
+ SENSITIVE = [:image]
817
1187
  include Aws::Structure
818
1188
  include Aws::Structure::Union
819
1189
 
820
1190
  class Text < GuardrailContentBlock; end
1191
+ class Image < GuardrailContentBlock; end
821
1192
  class Unknown < GuardrailContentBlock; end
822
1193
  end
823
1194
 
@@ -839,13 +1210,19 @@ module Aws::BedrockRuntime
839
1210
  # The guardrail action.
840
1211
  # @return [String]
841
1212
  #
1213
+ # @!attribute [rw] detected
1214
+ # Indicates whether content that breaches the guardrail configuration
1215
+ # is detected.
1216
+ # @return [Boolean]
1217
+ #
842
1218
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailContentFilter AWS API Documentation
843
1219
  #
844
1220
  class GuardrailContentFilter < Struct.new(
845
1221
  :type,
846
1222
  :confidence,
847
1223
  :filter_strength,
848
- :action)
1224
+ :action,
1225
+ :detected)
849
1226
  SENSITIVE = []
850
1227
  include Aws::Structure
851
1228
  end
@@ -883,13 +1260,20 @@ module Aws::BedrockRuntime
883
1260
  # The action performed by the guardrails contextual grounding filter.
884
1261
  # @return [String]
885
1262
  #
1263
+ # @!attribute [rw] detected
1264
+ # Indicates whether content that fails the contextual grounding
1265
+ # evaluation (grounding or relevance score less than the corresponding
1266
+ # threshold) was detected.
1267
+ # @return [Boolean]
1268
+ #
886
1269
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailContextualGroundingFilter AWS API Documentation
887
1270
  #
888
1271
  class GuardrailContextualGroundingFilter < Struct.new(
889
1272
  :type,
890
1273
  :threshold,
891
1274
  :score,
892
- :action)
1275
+ :action,
1276
+ :detected)
893
1277
  SENSITIVE = []
894
1278
  include Aws::Structure
895
1279
  end
@@ -925,19 +1309,71 @@ module Aws::BedrockRuntime
925
1309
  # The text to guard.
926
1310
  # @return [Types::GuardrailConverseTextBlock]
927
1311
  #
1312
+ # @!attribute [rw] image
1313
+ # Image within converse content block to be evaluated by the
1314
+ # guardrail.
1315
+ # @return [Types::GuardrailConverseImageBlock]
1316
+ #
928
1317
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseContentBlock AWS API Documentation
929
1318
  #
930
1319
  class GuardrailConverseContentBlock < Struct.new(
931
1320
  :text,
1321
+ :image,
932
1322
  :unknown)
933
- SENSITIVE = []
1323
+ SENSITIVE = [:image]
934
1324
  include Aws::Structure
935
1325
  include Aws::Structure::Union
936
1326
 
937
1327
  class Text < GuardrailConverseContentBlock; end
1328
+ class Image < GuardrailConverseContentBlock; end
938
1329
  class Unknown < GuardrailConverseContentBlock; end
939
1330
  end
940
1331
 
1332
+ # An image block that contains images that you want to assess with a
1333
+ # guardrail.
1334
+ #
1335
+ # @!attribute [rw] format
1336
+ # The format details for the image type of the guardrail converse
1337
+ # image block.
1338
+ # @return [String]
1339
+ #
1340
+ # @!attribute [rw] source
1341
+ # The image source (image bytes) of the guardrail converse image
1342
+ # block.
1343
+ # @return [Types::GuardrailConverseImageSource]
1344
+ #
1345
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseImageBlock AWS API Documentation
1346
+ #
1347
+ class GuardrailConverseImageBlock < Struct.new(
1348
+ :format,
1349
+ :source)
1350
+ SENSITIVE = [:source]
1351
+ include Aws::Structure
1352
+ end
1353
+
1354
+ # The image source (image bytes) of the guardrail converse image source.
1355
+ #
1356
+ # @note GuardrailConverseImageSource is a union - when making an API calls you must set exactly one of the members.
1357
+ #
1358
+ # @note GuardrailConverseImageSource is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of GuardrailConverseImageSource corresponding to the set member.
1359
+ #
1360
+ # @!attribute [rw] bytes
1361
+ # The raw image bytes for the image.
1362
+ # @return [String]
1363
+ #
1364
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailConverseImageSource AWS API Documentation
1365
+ #
1366
+ class GuardrailConverseImageSource < Struct.new(
1367
+ :bytes,
1368
+ :unknown)
1369
+ SENSITIVE = []
1370
+ include Aws::Structure
1371
+ include Aws::Structure::Union
1372
+
1373
+ class Bytes < GuardrailConverseImageSource; end
1374
+ class Unknown < GuardrailConverseImageSource; end
1375
+ end
1376
+
941
1377
  # A text block that contains text that you want to assess with a
942
1378
  # guardrail. For more information, see GuardrailConverseContentBlock.
943
1379
  #
@@ -965,10 +1401,16 @@ module Aws::BedrockRuntime
965
1401
  # The text characters of the guardrail coverage details.
966
1402
  # @return [Types::GuardrailTextCharactersCoverage]
967
1403
  #
1404
+ # @!attribute [rw] images
1405
+ # The guardrail coverage for images (the number of images that
1406
+ # guardrails guarded).
1407
+ # @return [Types::GuardrailImageCoverage]
1408
+ #
968
1409
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailCoverage AWS API Documentation
969
1410
  #
970
1411
  class GuardrailCoverage < Struct.new(
971
- :text_characters)
1412
+ :text_characters,
1413
+ :images)
972
1414
  SENSITIVE = []
973
1415
  include Aws::Structure
974
1416
  end
@@ -983,13 +1425,84 @@ module Aws::BedrockRuntime
983
1425
  # The action for the custom word.
984
1426
  # @return [String]
985
1427
  #
1428
+ # @!attribute [rw] detected
1429
+ # Indicates whether custom word content that breaches the guardrail
1430
+ # configuration is detected.
1431
+ # @return [Boolean]
1432
+ #
986
1433
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailCustomWord AWS API Documentation
987
1434
  #
988
1435
  class GuardrailCustomWord < Struct.new(
989
1436
  :match,
990
- :action)
1437
+ :action,
1438
+ :detected)
1439
+ SENSITIVE = []
1440
+ include Aws::Structure
1441
+ end
1442
+
1443
+ # Contain an image which user wants guarded. This block is accepted by
1444
+ # the guardrails independent API.
1445
+ #
1446
+ # @!attribute [rw] format
1447
+ # The format details for the file type of the image blocked by the
1448
+ # guardrail.
1449
+ # @return [String]
1450
+ #
1451
+ # @!attribute [rw] source
1452
+ # The image source (image bytes) details of the image blocked by the
1453
+ # guardrail.
1454
+ # @return [Types::GuardrailImageSource]
1455
+ #
1456
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailImageBlock AWS API Documentation
1457
+ #
1458
+ class GuardrailImageBlock < Struct.new(
1459
+ :format,
1460
+ :source)
1461
+ SENSITIVE = [:source]
1462
+ include Aws::Structure
1463
+ end
1464
+
1465
+ # The details of the guardrail image coverage.
1466
+ #
1467
+ # @!attribute [rw] guarded
1468
+ # The count (integer) of images guardrails guarded.
1469
+ # @return [Integer]
1470
+ #
1471
+ # @!attribute [rw] total
1472
+ # Represents the total number of images (integer) that were in the
1473
+ # request (guarded and unguarded).
1474
+ # @return [Integer]
1475
+ #
1476
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailImageCoverage AWS API Documentation
1477
+ #
1478
+ class GuardrailImageCoverage < Struct.new(
1479
+ :guarded,
1480
+ :total)
1481
+ SENSITIVE = []
1482
+ include Aws::Structure
1483
+ end
1484
+
1485
+ # The image source (image bytes) of the guardrail image source. Object
1486
+ # used in independent api.
1487
+ #
1488
+ # @note GuardrailImageSource is a union - when making an API calls you must set exactly one of the members.
1489
+ #
1490
+ # @!attribute [rw] bytes
1491
+ # The bytes details of the guardrail image source. Object used in
1492
+ # independent api.
1493
+ # @return [String]
1494
+ #
1495
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailImageSource AWS API Documentation
1496
+ #
1497
+ class GuardrailImageSource < Struct.new(
1498
+ :bytes,
1499
+ :unknown)
991
1500
  SENSITIVE = []
992
1501
  include Aws::Structure
1502
+ include Aws::Structure::Union
1503
+
1504
+ class Bytes < GuardrailImageSource; end
1505
+ class Unknown < GuardrailImageSource; end
993
1506
  end
994
1507
 
995
1508
  # The invocation metrics for the guardrail.
@@ -1030,12 +1543,18 @@ module Aws::BedrockRuntime
1030
1543
  # The action for the managed word.
1031
1544
  # @return [String]
1032
1545
  #
1546
+ # @!attribute [rw] detected
1547
+ # Indicates whether managed word content that breaches the guardrail
1548
+ # configuration is detected.
1549
+ # @return [Boolean]
1550
+ #
1033
1551
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailManagedWord AWS API Documentation
1034
1552
  #
1035
1553
  class GuardrailManagedWord < Struct.new(
1036
1554
  :match,
1037
1555
  :type,
1038
- :action)
1556
+ :action,
1557
+ :detected)
1039
1558
  SENSITIVE = []
1040
1559
  include Aws::Structure
1041
1560
  end
@@ -1069,12 +1588,18 @@ module Aws::BedrockRuntime
1069
1588
  # The PII entity filter action.
1070
1589
  # @return [String]
1071
1590
  #
1591
+ # @!attribute [rw] detected
1592
+ # Indicates whether personally identifiable information (PII) that
1593
+ # breaches the guardrail configuration is detected.
1594
+ # @return [Boolean]
1595
+ #
1072
1596
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailPiiEntityFilter AWS API Documentation
1073
1597
  #
1074
1598
  class GuardrailPiiEntityFilter < Struct.new(
1075
1599
  :match,
1076
1600
  :type,
1077
- :action)
1601
+ :action,
1602
+ :detected)
1078
1603
  SENSITIVE = []
1079
1604
  include Aws::Structure
1080
1605
  end
@@ -1097,13 +1622,19 @@ module Aws::BedrockRuntime
1097
1622
  # The region filter action.
1098
1623
  # @return [String]
1099
1624
  #
1625
+ # @!attribute [rw] detected
1626
+ # Indicates whether custom regex entities that breach the guardrail
1627
+ # configuration are detected.
1628
+ # @return [Boolean]
1629
+ #
1100
1630
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailRegexFilter AWS API Documentation
1101
1631
  #
1102
1632
  class GuardrailRegexFilter < Struct.new(
1103
1633
  :name,
1104
1634
  :match,
1105
1635
  :regex,
1106
- :action)
1636
+ :action,
1637
+ :detected)
1107
1638
  SENSITIVE = []
1108
1639
  include Aws::Structure
1109
1640
  end
@@ -1213,12 +1744,18 @@ module Aws::BedrockRuntime
1213
1744
  # The action the guardrail should take when it intervenes on a topic.
1214
1745
  # @return [String]
1215
1746
  #
1747
+ # @!attribute [rw] detected
1748
+ # Indicates whether topic content that breaches the guardrail
1749
+ # configuration is detected.
1750
+ # @return [Boolean]
1751
+ #
1216
1752
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailTopic AWS API Documentation
1217
1753
  #
1218
1754
  class GuardrailTopic < Struct.new(
1219
1755
  :name,
1220
1756
  :type,
1221
- :action)
1757
+ :action,
1758
+ :detected)
1222
1759
  SENSITIVE = []
1223
1760
  include Aws::Structure
1224
1761
  end
@@ -1252,12 +1789,18 @@ module Aws::BedrockRuntime
1252
1789
  # the output assessments.
1253
1790
  # @return [Hash<String,Array<Types::GuardrailAssessment>>]
1254
1791
  #
1792
+ # @!attribute [rw] action_reason
1793
+ # Provides the reason for the action taken when harmful content is
1794
+ # detected.
1795
+ # @return [String]
1796
+ #
1255
1797
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailTraceAssessment AWS API Documentation
1256
1798
  #
1257
1799
  class GuardrailTraceAssessment < Struct.new(
1258
1800
  :model_output,
1259
1801
  :input_assessment,
1260
- :output_assessments)
1802
+ :output_assessments,
1803
+ :action_reason)
1261
1804
  SENSITIVE = []
1262
1805
  include Aws::Structure
1263
1806
  end
@@ -1289,6 +1832,10 @@ module Aws::BedrockRuntime
1289
1832
  # The contextual grounding policy units processed by the guardrail.
1290
1833
  # @return [Integer]
1291
1834
  #
1835
+ # @!attribute [rw] content_policy_image_units
1836
+ # The content policy image units processed by the guardrail.
1837
+ # @return [Integer]
1838
+ #
1292
1839
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GuardrailUsage AWS API Documentation
1293
1840
  #
1294
1841
  class GuardrailUsage < Struct.new(
@@ -1297,7 +1844,8 @@ module Aws::BedrockRuntime
1297
1844
  :word_policy_units,
1298
1845
  :sensitive_information_policy_units,
1299
1846
  :sensitive_information_policy_free_units,
1300
- :contextual_grounding_policy_units)
1847
+ :contextual_grounding_policy_units,
1848
+ :content_policy_image_units)
1301
1849
  SENSITIVE = []
1302
1850
  include Aws::Structure
1303
1851
  end
@@ -1436,7 +1984,12 @@ module Aws::BedrockRuntime
1436
1984
  include Aws::Structure
1437
1985
  end
1438
1986
 
1439
- # An internal server error occurred. Retry your request.
1987
+ # An internal server error occurred. For troubleshooting this error, see
1988
+ # [InternalFailure][1] in the Amazon Bedrock User Guide
1989
+ #
1990
+ #
1991
+ #
1992
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure
1440
1993
  #
1441
1994
  # @!attribute [rw] message
1442
1995
  # @return [String]
@@ -1476,33 +2029,40 @@ module Aws::BedrockRuntime
1476
2029
  # @!attribute [rw] model_id
1477
2030
  # The unique identifier of the model to invoke to run inference.
1478
2031
  #
1479
- # The `modelId` to provide depends on the type of model that you use:
2032
+ # The `modelId` to provide depends on the type of model or throughput
2033
+ # that you use:
1480
2034
  #
1481
2035
  # * If you use a base model, specify the model ID or its ARN. For a
1482
2036
  # list of model IDs for base models, see [Amazon Bedrock base model
1483
2037
  # IDs (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1484
2038
  #
2039
+ # * If you use an inference profile, specify the inference profile ID
2040
+ # or its ARN. For a list of inference profile IDs, see [Supported
2041
+ # Regions and models for cross-region inference][2] in the Amazon
2042
+ # Bedrock User Guide.
2043
+ #
1485
2044
  # * If you use a provisioned model, specify the ARN of the Provisioned
1486
2045
  # Throughput. For more information, see [Run inference using a
1487
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
2046
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1488
2047
  #
1489
2048
  # * If you use a custom model, first purchase Provisioned Throughput
1490
2049
  # for it. Then specify the ARN of the resulting provisioned model.
1491
2050
  # For more information, see [Use a custom model in Amazon
1492
- # Bedrock][3] in the Amazon Bedrock User Guide.
2051
+ # Bedrock][4] in the Amazon Bedrock User Guide.
1493
2052
  #
1494
- # * If you use an [imported model][4], specify the ARN of the imported
2053
+ # * If you use an [imported model][5], specify the ARN of the imported
1495
2054
  # model. You can get the model ARN from a successful call to
1496
- # [CreateModelImportJob][5] or from the Imported models page in the
2055
+ # [CreateModelImportJob][6] or from the Imported models page in the
1497
2056
  # Amazon Bedrock console.
1498
2057
  #
1499
2058
  #
1500
2059
  #
1501
2060
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1502
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1503
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1504
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1505
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
2061
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
2062
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
2063
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
2064
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
2065
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1506
2066
  # @return [String]
1507
2067
  #
1508
2068
  # @!attribute [rw] trace
@@ -1530,6 +2090,10 @@ module Aws::BedrockRuntime
1530
2090
  # The version number for the guardrail. The value can also be `DRAFT`.
1531
2091
  # @return [String]
1532
2092
  #
2093
+ # @!attribute [rw] performance_config_latency
2094
+ # Model performance settings for the request.
2095
+ # @return [String]
2096
+ #
1533
2097
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelRequest AWS API Documentation
1534
2098
  #
1535
2099
  class InvokeModelRequest < Struct.new(
@@ -1539,7 +2103,8 @@ module Aws::BedrockRuntime
1539
2103
  :model_id,
1540
2104
  :trace,
1541
2105
  :guardrail_identifier,
1542
- :guardrail_version)
2106
+ :guardrail_version,
2107
+ :performance_config_latency)
1543
2108
  SENSITIVE = [:body]
1544
2109
  include Aws::Structure
1545
2110
  end
@@ -1559,15 +2124,61 @@ module Aws::BedrockRuntime
1559
2124
  # The MIME type of the inference result.
1560
2125
  # @return [String]
1561
2126
  #
2127
+ # @!attribute [rw] performance_config_latency
2128
+ # Model performance settings for the request.
2129
+ # @return [String]
2130
+ #
1562
2131
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelResponse AWS API Documentation
1563
2132
  #
1564
2133
  class InvokeModelResponse < Struct.new(
1565
2134
  :body,
1566
- :content_type)
2135
+ :content_type,
2136
+ :performance_config_latency)
1567
2137
  SENSITIVE = [:body]
1568
2138
  include Aws::Structure
1569
2139
  end
1570
2140
 
2141
+ # @!attribute [rw] model_id
2142
+ # The model ID or ARN of the model ID to use. Currently, only
2143
+ # `amazon.nova-sonic-v1:0` is supported.
2144
+ # @return [String]
2145
+ #
2146
+ # @!attribute [rw] body
2147
+ # The prompt and inference parameters in the format specified in the
2148
+ # `BidirectionalInputPayloadPart` in the header. You must provide the
2149
+ # body in JSON format. To see the format and content of the request
2150
+ # and response bodies for different models, refer to [Inference
2151
+ # parameters][1]. For more information, see [Run inference][2] in the
2152
+ # Bedrock User Guide.
2153
+ #
2154
+ #
2155
+ #
2156
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
2157
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/api-methods-run.html
2158
+ # @return [Types::InvokeModelWithBidirectionalStreamInput]
2159
+ #
2160
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithBidirectionalStreamRequest AWS API Documentation
2161
+ #
2162
+ class InvokeModelWithBidirectionalStreamRequest < Struct.new(
2163
+ :model_id,
2164
+ :body)
2165
+ SENSITIVE = []
2166
+ include Aws::Structure
2167
+ end
2168
+
2169
+ # @!attribute [rw] body
2170
+ # Streaming response from the model in the format specified by the
2171
+ # `BidirectionalOutputPayloadPart` header.
2172
+ # @return [Types::InvokeModelWithBidirectionalStreamOutput]
2173
+ #
2174
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithBidirectionalStreamResponse AWS API Documentation
2175
+ #
2176
+ class InvokeModelWithBidirectionalStreamResponse < Struct.new(
2177
+ :body)
2178
+ SENSITIVE = []
2179
+ include Aws::Structure
2180
+ end
2181
+
1571
2182
  # @!attribute [rw] body
1572
2183
  # The prompt and inference parameters in the format specified in the
1573
2184
  # `contentType` in the header. You must provide the body in JSON
@@ -1594,33 +2205,40 @@ module Aws::BedrockRuntime
1594
2205
  # @!attribute [rw] model_id
1595
2206
  # The unique identifier of the model to invoke to run inference.
1596
2207
  #
1597
- # The `modelId` to provide depends on the type of model that you use:
2208
+ # The `modelId` to provide depends on the type of model or throughput
2209
+ # that you use:
1598
2210
  #
1599
2211
  # * If you use a base model, specify the model ID or its ARN. For a
1600
2212
  # list of model IDs for base models, see [Amazon Bedrock base model
1601
2213
  # IDs (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1602
2214
  #
2215
+ # * If you use an inference profile, specify the inference profile ID
2216
+ # or its ARN. For a list of inference profile IDs, see [Supported
2217
+ # Regions and models for cross-region inference][2] in the Amazon
2218
+ # Bedrock User Guide.
2219
+ #
1603
2220
  # * If you use a provisioned model, specify the ARN of the Provisioned
1604
2221
  # Throughput. For more information, see [Run inference using a
1605
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
2222
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1606
2223
  #
1607
2224
  # * If you use a custom model, first purchase Provisioned Throughput
1608
2225
  # for it. Then specify the ARN of the resulting provisioned model.
1609
2226
  # For more information, see [Use a custom model in Amazon
1610
- # Bedrock][3] in the Amazon Bedrock User Guide.
2227
+ # Bedrock][4] in the Amazon Bedrock User Guide.
1611
2228
  #
1612
- # * If you use an [imported model][4], specify the ARN of the imported
2229
+ # * If you use an [imported model][5], specify the ARN of the imported
1613
2230
  # model. You can get the model ARN from a successful call to
1614
- # [CreateModelImportJob][5] or from the Imported models page in the
2231
+ # [CreateModelImportJob][6] or from the Imported models page in the
1615
2232
  # Amazon Bedrock console.
1616
2233
  #
1617
2234
  #
1618
2235
  #
1619
2236
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1620
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1621
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1622
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1623
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
2237
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
2238
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
2239
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
2240
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
2241
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1624
2242
  # @return [String]
1625
2243
  #
1626
2244
  # @!attribute [rw] trace
@@ -1648,6 +2266,10 @@ module Aws::BedrockRuntime
1648
2266
  # The version number for the guardrail. The value can also be `DRAFT`.
1649
2267
  # @return [String]
1650
2268
  #
2269
+ # @!attribute [rw] performance_config_latency
2270
+ # Model performance settings for the request.
2271
+ # @return [String]
2272
+ #
1651
2273
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStreamRequest AWS API Documentation
1652
2274
  #
1653
2275
  class InvokeModelWithResponseStreamRequest < Struct.new(
@@ -1657,7 +2279,8 @@ module Aws::BedrockRuntime
1657
2279
  :model_id,
1658
2280
  :trace,
1659
2281
  :guardrail_identifier,
1660
- :guardrail_version)
2282
+ :guardrail_version,
2283
+ :performance_config_latency)
1661
2284
  SENSITIVE = [:body]
1662
2285
  include Aws::Structure
1663
2286
  end
@@ -1676,11 +2299,77 @@ module Aws::BedrockRuntime
1676
2299
  # The MIME type of the inference result.
1677
2300
  # @return [String]
1678
2301
  #
2302
+ # @!attribute [rw] performance_config_latency
2303
+ # Model performance settings for the request.
2304
+ # @return [String]
2305
+ #
1679
2306
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStreamResponse AWS API Documentation
1680
2307
  #
1681
2308
  class InvokeModelWithResponseStreamResponse < Struct.new(
1682
2309
  :body,
1683
- :content_type)
2310
+ :content_type,
2311
+ :performance_config_latency)
2312
+ SENSITIVE = []
2313
+ include Aws::Structure
2314
+ end
2315
+
2316
+ # @!attribute [rw] submit_time_after
2317
+ # Include invocations submitted after this time.
2318
+ # @return [Time]
2319
+ #
2320
+ # @!attribute [rw] submit_time_before
2321
+ # Include invocations submitted before this time.
2322
+ # @return [Time]
2323
+ #
2324
+ # @!attribute [rw] status_equals
2325
+ # Filter invocations by status.
2326
+ # @return [String]
2327
+ #
2328
+ # @!attribute [rw] max_results
2329
+ # The maximum number of invocations to return in one page of results.
2330
+ # @return [Integer]
2331
+ #
2332
+ # @!attribute [rw] next_token
2333
+ # Specify the pagination token from a previous request to retrieve the
2334
+ # next page of results.
2335
+ # @return [String]
2336
+ #
2337
+ # @!attribute [rw] sort_by
2338
+ # How to sort the response.
2339
+ # @return [String]
2340
+ #
2341
+ # @!attribute [rw] sort_order
2342
+ # The sorting order for the response.
2343
+ # @return [String]
2344
+ #
2345
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ListAsyncInvokesRequest AWS API Documentation
2346
+ #
2347
+ class ListAsyncInvokesRequest < Struct.new(
2348
+ :submit_time_after,
2349
+ :submit_time_before,
2350
+ :status_equals,
2351
+ :max_results,
2352
+ :next_token,
2353
+ :sort_by,
2354
+ :sort_order)
2355
+ SENSITIVE = []
2356
+ include Aws::Structure
2357
+ end
2358
+
2359
+ # @!attribute [rw] next_token
2360
+ # Specify the pagination token from a previous request to retrieve the
2361
+ # next page of results.
2362
+ # @return [String]
2363
+ #
2364
+ # @!attribute [rw] async_invoke_summaries
2365
+ # A list of invocation summaries.
2366
+ # @return [Array<Types::AsyncInvokeSummary>]
2367
+ #
2368
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ListAsyncInvokesResponse AWS API Documentation
2369
+ #
2370
+ class ListAsyncInvokesResponse < Struct.new(
2371
+ :next_token,
2372
+ :async_invoke_summaries)
1684
2373
  SENSITIVE = []
1685
2374
  include Aws::Structure
1686
2375
  end
@@ -1854,8 +2543,163 @@ module Aws::BedrockRuntime
1854
2543
  include Aws::Structure
1855
2544
  end
1856
2545
 
1857
- # The specified resource ARN was not found. Check the ARN and try your
1858
- # request again.
2546
+ # Performance settings for a model.
2547
+ #
2548
+ # @!attribute [rw] latency
2549
+ # To use a latency-optimized version of the model, set to `optimized`.
2550
+ # @return [String]
2551
+ #
2552
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/PerformanceConfiguration AWS API Documentation
2553
+ #
2554
+ class PerformanceConfiguration < Struct.new(
2555
+ :latency)
2556
+ SENSITIVE = []
2557
+ include Aws::Structure
2558
+ end
2559
+
2560
+ # A prompt router trace.
2561
+ #
2562
+ # @!attribute [rw] invoked_model_id
2563
+ # The ID of the invoked model.
2564
+ # @return [String]
2565
+ #
2566
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/PromptRouterTrace AWS API Documentation
2567
+ #
2568
+ class PromptRouterTrace < Struct.new(
2569
+ :invoked_model_id)
2570
+ SENSITIVE = []
2571
+ include Aws::Structure
2572
+ end
2573
+
2574
+ # Contains a map of variables in a prompt from Prompt management to an
2575
+ # object containing the values to fill in for them when running model
2576
+ # invocation. For more information, see [How Prompt management
2577
+ # works][1].
2578
+ #
2579
+ #
2580
+ #
2581
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-how.html
2582
+ #
2583
+ # @note PromptVariableValues is a union - when making an API calls you must set exactly one of the members.
2584
+ #
2585
+ # @!attribute [rw] text
2586
+ # The text value that the variable maps to.
2587
+ # @return [String]
2588
+ #
2589
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/PromptVariableValues AWS API Documentation
2590
+ #
2591
+ class PromptVariableValues < Struct.new(
2592
+ :text,
2593
+ :unknown)
2594
+ SENSITIVE = []
2595
+ include Aws::Structure
2596
+ include Aws::Structure::Union
2597
+
2598
+ class Text < PromptVariableValues; end
2599
+ class Unknown < PromptVariableValues; end
2600
+ end
2601
+
2602
+ # Contains content regarding the reasoning that is carried out by the
2603
+ # model with respect to the content in the content block. Reasoning
2604
+ # refers to a Chain of Thought (CoT) that the model generates to enhance
2605
+ # the accuracy of its final response.
2606
+ #
2607
+ # @note ReasoningContentBlock is a union - when making an API calls you must set exactly one of the members.
2608
+ #
2609
+ # @note ReasoningContentBlock is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of ReasoningContentBlock corresponding to the set member.
2610
+ #
2611
+ # @!attribute [rw] reasoning_text
2612
+ # The reasoning that the model used to return the output.
2613
+ # @return [Types::ReasoningTextBlock]
2614
+ #
2615
+ # @!attribute [rw] redacted_content
2616
+ # The content in the reasoning that was encrypted by the model
2617
+ # provider for safety reasons. The encryption doesn't affect the
2618
+ # quality of responses.
2619
+ # @return [String]
2620
+ #
2621
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ReasoningContentBlock AWS API Documentation
2622
+ #
2623
+ class ReasoningContentBlock < Struct.new(
2624
+ :reasoning_text,
2625
+ :redacted_content,
2626
+ :unknown)
2627
+ SENSITIVE = [:reasoning_text]
2628
+ include Aws::Structure
2629
+ include Aws::Structure::Union
2630
+
2631
+ class ReasoningText < ReasoningContentBlock; end
2632
+ class RedactedContent < ReasoningContentBlock; end
2633
+ class Unknown < ReasoningContentBlock; end
2634
+ end
2635
+
2636
+ # Contains content regarding the reasoning that is carried out by the
2637
+ # model with respect to the content in the content block. Reasoning
2638
+ # refers to a Chain of Thought (CoT) that the model generates to enhance
2639
+ # the accuracy of its final response.
2640
+ #
2641
+ # @note ReasoningContentBlockDelta is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of ReasoningContentBlockDelta corresponding to the set member.
2642
+ #
2643
+ # @!attribute [rw] text
2644
+ # The reasoning that the model used to return the output.
2645
+ # @return [String]
2646
+ #
2647
+ # @!attribute [rw] redacted_content
2648
+ # The content in the reasoning that was encrypted by the model
2649
+ # provider for safety reasons. The encryption doesn't affect the
2650
+ # quality of responses.
2651
+ # @return [String]
2652
+ #
2653
+ # @!attribute [rw] signature
2654
+ # A token that verifies that the reasoning text was generated by the
2655
+ # model. If you pass a reasoning block back to the API in a multi-turn
2656
+ # conversation, include the text and its signature unmodified.
2657
+ # @return [String]
2658
+ #
2659
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ReasoningContentBlockDelta AWS API Documentation
2660
+ #
2661
+ class ReasoningContentBlockDelta < Struct.new(
2662
+ :text,
2663
+ :redacted_content,
2664
+ :signature,
2665
+ :unknown)
2666
+ SENSITIVE = []
2667
+ include Aws::Structure
2668
+ include Aws::Structure::Union
2669
+
2670
+ class Text < ReasoningContentBlockDelta; end
2671
+ class RedactedContent < ReasoningContentBlockDelta; end
2672
+ class Signature < ReasoningContentBlockDelta; end
2673
+ class Unknown < ReasoningContentBlockDelta; end
2674
+ end
2675
+
2676
+ # Contains the reasoning that the model used to return the output.
2677
+ #
2678
+ # @!attribute [rw] text
2679
+ # The reasoning that the model used to return the output.
2680
+ # @return [String]
2681
+ #
2682
+ # @!attribute [rw] signature
2683
+ # A token that verifies that the reasoning text was generated by the
2684
+ # model. If you pass a reasoning block back to the API in a multi-turn
2685
+ # conversation, include the text and its signature unmodified.
2686
+ # @return [String]
2687
+ #
2688
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ReasoningTextBlock AWS API Documentation
2689
+ #
2690
+ class ReasoningTextBlock < Struct.new(
2691
+ :text,
2692
+ :signature)
2693
+ SENSITIVE = []
2694
+ include Aws::Structure
2695
+ end
2696
+
2697
+ # The specified resource ARN was not found. For troubleshooting this
2698
+ # error, see [ResourceNotFound][1] in the Amazon Bedrock User Guide
2699
+ #
2700
+ #
2701
+ #
2702
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found
1859
2703
  #
1860
2704
  # @!attribute [rw] message
1861
2705
  # @return [String]
@@ -1868,6 +2712,26 @@ module Aws::BedrockRuntime
1868
2712
  include Aws::Structure
1869
2713
  end
1870
2714
 
2715
+ # A storage location in an S3 bucket.
2716
+ #
2717
+ # @!attribute [rw] uri
2718
+ # An object URI starting with `s3://`.
2719
+ # @return [String]
2720
+ #
2721
+ # @!attribute [rw] bucket_owner
2722
+ # If the bucket belongs to another AWS account, specify that
2723
+ # account's ID.
2724
+ # @return [String]
2725
+ #
2726
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/S3Location AWS API Documentation
2727
+ #
2728
+ class S3Location < Struct.new(
2729
+ :uri,
2730
+ :bucket_owner)
2731
+ SENSITIVE = []
2732
+ include Aws::Structure
2733
+ end
2734
+
1871
2735
  # Your request exceeds the service quota for your account. You can view
1872
2736
  # your quotas at [Viewing service quotas][1]. You can resubmit your
1873
2737
  # request later.
@@ -1887,7 +2751,12 @@ module Aws::BedrockRuntime
1887
2751
  include Aws::Structure
1888
2752
  end
1889
2753
 
1890
- # The service isn't currently available. Try again later.
2754
+ # The service isn't currently available. For troubleshooting this
2755
+ # error, see [ServiceUnavailable][1] in the Amazon Bedrock User Guide
2756
+ #
2757
+ #
2758
+ #
2759
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable
1891
2760
  #
1892
2761
  # @!attribute [rw] message
1893
2762
  # @return [String]
@@ -1901,8 +2770,8 @@ module Aws::BedrockRuntime
1901
2770
  include Aws::Structure
1902
2771
  end
1903
2772
 
1904
- # The model must request a specific tool. For example, `\{"tool" :
1905
- # \{"name" : "Your tool name"\}\}`.
2773
+ # The model must request a specific tool. For example, `{"tool" :
2774
+ # {"name" : "Your tool name"}}`.
1906
2775
  #
1907
2776
  # <note markdown="1"> This field is only supported by Anthropic Claude 3 models.
1908
2777
  #
@@ -1920,6 +2789,54 @@ module Aws::BedrockRuntime
1920
2789
  include Aws::Structure
1921
2790
  end
1922
2791
 
2792
+ # @!attribute [rw] client_request_token
2793
+ # Specify idempotency token to ensure that requests are not
2794
+ # duplicated.
2795
+ #
2796
+ # **A suitable default value is auto-generated.** You should normally
2797
+ # not need to pass this option.
2798
+ # @return [String]
2799
+ #
2800
+ # @!attribute [rw] model_id
2801
+ # The model to invoke.
2802
+ # @return [String]
2803
+ #
2804
+ # @!attribute [rw] model_input
2805
+ # Input to send to the model.
2806
+ # @return [Hash,Array,String,Numeric,Boolean]
2807
+ #
2808
+ # @!attribute [rw] output_data_config
2809
+ # Where to store the output.
2810
+ # @return [Types::AsyncInvokeOutputDataConfig]
2811
+ #
2812
+ # @!attribute [rw] tags
2813
+ # Tags to apply to the invocation.
2814
+ # @return [Array<Types::Tag>]
2815
+ #
2816
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/StartAsyncInvokeRequest AWS API Documentation
2817
+ #
2818
+ class StartAsyncInvokeRequest < Struct.new(
2819
+ :client_request_token,
2820
+ :model_id,
2821
+ :model_input,
2822
+ :output_data_config,
2823
+ :tags)
2824
+ SENSITIVE = [:model_input]
2825
+ include Aws::Structure
2826
+ end
2827
+
2828
+ # @!attribute [rw] invocation_arn
2829
+ # The ARN of the invocation.
2830
+ # @return [String]
2831
+ #
2832
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/StartAsyncInvokeResponse AWS API Documentation
2833
+ #
2834
+ class StartAsyncInvokeResponse < Struct.new(
2835
+ :invocation_arn)
2836
+ SENSITIVE = []
2837
+ include Aws::Structure
2838
+ end
2839
+
1923
2840
  # A system content block.
1924
2841
  #
1925
2842
  # @note SystemContentBlock is a union - when making an API calls you must set exactly one of the members.
@@ -1941,11 +2858,16 @@ module Aws::BedrockRuntime
1941
2858
  # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
1942
2859
  # @return [Types::GuardrailConverseContentBlock]
1943
2860
  #
2861
+ # @!attribute [rw] cache_point
2862
+ # CachePoint to include in the system prompt.
2863
+ # @return [Types::CachePointBlock]
2864
+ #
1944
2865
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/SystemContentBlock AWS API Documentation
1945
2866
  #
1946
2867
  class SystemContentBlock < Struct.new(
1947
2868
  :text,
1948
2869
  :guard_content,
2870
+ :cache_point,
1949
2871
  :unknown)
1950
2872
  SENSITIVE = []
1951
2873
  include Aws::Structure
@@ -1953,17 +2875,36 @@ module Aws::BedrockRuntime
1953
2875
 
1954
2876
  class Text < SystemContentBlock; end
1955
2877
  class GuardContent < SystemContentBlock; end
2878
+ class CachePoint < SystemContentBlock; end
1956
2879
  class Unknown < SystemContentBlock; end
1957
2880
  end
1958
2881
 
1959
- # Your request was throttled because of service-wide limitations.
1960
- # Resubmit your request later or in a different region. You can also
1961
- # purchase [Provisioned Throughput][1] to increase the rate or number of
1962
- # tokens you can process.
2882
+ # A tag.
2883
+ #
2884
+ # @!attribute [rw] key
2885
+ # The tag's key.
2886
+ # @return [String]
2887
+ #
2888
+ # @!attribute [rw] value
2889
+ # The tag's value.
2890
+ # @return [String]
2891
+ #
2892
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Tag AWS API Documentation
2893
+ #
2894
+ class Tag < Struct.new(
2895
+ :key,
2896
+ :value)
2897
+ SENSITIVE = []
2898
+ include Aws::Structure
2899
+ end
2900
+
2901
+ # Your request was denied due to exceeding the account quotas for
2902
+ # *Amazon Bedrock*. For troubleshooting this error, see
2903
+ # [ThrottlingException][1] in the Amazon Bedrock User Guide
1963
2904
  #
1964
2905
  #
1965
2906
  #
1966
- # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
2907
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception
1967
2908
  #
1968
2909
  # @!attribute [rw] message
1969
2910
  # @return [String]
@@ -1991,12 +2932,22 @@ module Aws::BedrockRuntime
1991
2932
  # The total of input tokens and tokens generated by the model.
1992
2933
  # @return [Integer]
1993
2934
  #
2935
+ # @!attribute [rw] cache_read_input_tokens
2936
+ # The number of input tokens read from the cache for the request.
2937
+ # @return [Integer]
2938
+ #
2939
+ # @!attribute [rw] cache_write_input_tokens
2940
+ # The number of input tokens written to the cache for the request.
2941
+ # @return [Integer]
2942
+ #
1994
2943
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/TokenUsage AWS API Documentation
1995
2944
  #
1996
2945
  class TokenUsage < Struct.new(
1997
2946
  :input_tokens,
1998
2947
  :output_tokens,
1999
- :total_tokens)
2948
+ :total_tokens,
2949
+ :cache_read_input_tokens,
2950
+ :cache_write_input_tokens)
2000
2951
  SENSITIVE = []
2001
2952
  include Aws::Structure
2002
2953
  end
@@ -2015,16 +2966,22 @@ module Aws::BedrockRuntime
2015
2966
  # The specfication for the tool.
2016
2967
  # @return [Types::ToolSpecification]
2017
2968
  #
2969
+ # @!attribute [rw] cache_point
2970
+ # CachePoint to include in the tool configuration.
2971
+ # @return [Types::CachePointBlock]
2972
+ #
2018
2973
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Tool AWS API Documentation
2019
2974
  #
2020
2975
  class Tool < Struct.new(
2021
2976
  :tool_spec,
2977
+ :cache_point,
2022
2978
  :unknown)
2023
2979
  SENSITIVE = []
2024
2980
  include Aws::Structure
2025
2981
  include Aws::Structure::Union
2026
2982
 
2027
2983
  class ToolSpec < Tool; end
2984
+ class CachePoint < Tool; end
2028
2985
  class Unknown < Tool; end
2029
2986
  end
2030
2987
 
@@ -2069,11 +3026,6 @@ module Aws::BedrockRuntime
2069
3026
  # more information, see [Tool use (function calling)][1] in the Amazon
2070
3027
  # Bedrock User Guide.
2071
3028
  #
2072
- # <note markdown="1"> This field is only supported by Anthropic Claude 3, Cohere Command R,
2073
- # Cohere Command R+, and Mistral Large models.
2074
- #
2075
- # </note>
2076
- #
2077
3029
  #
2078
3030
  #
2079
3031
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html
@@ -2176,6 +3128,10 @@ module Aws::BedrockRuntime
2176
3128
  # A tool result that is a document.
2177
3129
  # @return [Types::DocumentBlock]
2178
3130
  #
3131
+ # @!attribute [rw] video
3132
+ # A tool result that is video.
3133
+ # @return [Types::VideoBlock]
3134
+ #
2179
3135
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ToolResultContentBlock AWS API Documentation
2180
3136
  #
2181
3137
  class ToolResultContentBlock < Struct.new(
@@ -2183,6 +3139,7 @@ module Aws::BedrockRuntime
2183
3139
  :text,
2184
3140
  :image,
2185
3141
  :document,
3142
+ :video,
2186
3143
  :unknown)
2187
3144
  SENSITIVE = []
2188
3145
  include Aws::Structure
@@ -2192,6 +3149,7 @@ module Aws::BedrockRuntime
2192
3149
  class Text < ToolResultContentBlock; end
2193
3150
  class Image < ToolResultContentBlock; end
2194
3151
  class Document < ToolResultContentBlock; end
3152
+ class Video < ToolResultContentBlock; end
2195
3153
  class Unknown < ToolResultContentBlock; end
2196
3154
  end
2197
3155
 
@@ -2278,8 +3236,13 @@ module Aws::BedrockRuntime
2278
3236
  include Aws::Structure
2279
3237
  end
2280
3238
 
2281
- # Input validation failed. Check your request parameters and retry the
2282
- # request.
3239
+ # The input fails to satisfy the constraints specified by *Amazon
3240
+ # Bedrock*. For troubleshooting this error, see [ValidationError][1] in
3241
+ # the Amazon Bedrock User Guide
3242
+ #
3243
+ #
3244
+ #
3245
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error
2283
3246
  #
2284
3247
  # @!attribute [rw] message
2285
3248
  # @return [String]
@@ -2293,6 +3256,56 @@ module Aws::BedrockRuntime
2293
3256
  include Aws::Structure
2294
3257
  end
2295
3258
 
3259
+ # A video block.
3260
+ #
3261
+ # @!attribute [rw] format
3262
+ # The block's format.
3263
+ # @return [String]
3264
+ #
3265
+ # @!attribute [rw] source
3266
+ # The block's source.
3267
+ # @return [Types::VideoSource]
3268
+ #
3269
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/VideoBlock AWS API Documentation
3270
+ #
3271
+ class VideoBlock < Struct.new(
3272
+ :format,
3273
+ :source)
3274
+ SENSITIVE = []
3275
+ include Aws::Structure
3276
+ end
3277
+
3278
+ # A video source. You can upload a smaller video as a base64-encoded
3279
+ # string as long as the encoded file is less than 25MB. You can also
3280
+ # transfer videos up to 1GB in size from an S3 bucket.
3281
+ #
3282
+ # @note VideoSource is a union - when making an API calls you must set exactly one of the members.
3283
+ #
3284
+ # @note VideoSource is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of VideoSource corresponding to the set member.
3285
+ #
3286
+ # @!attribute [rw] bytes
3287
+ # Video content encoded in base64.
3288
+ # @return [String]
3289
+ #
3290
+ # @!attribute [rw] s3_location
3291
+ # The location of a video object in an S3 bucket.
3292
+ # @return [Types::S3Location]
3293
+ #
3294
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/VideoSource AWS API Documentation
3295
+ #
3296
+ class VideoSource < Struct.new(
3297
+ :bytes,
3298
+ :s3_location,
3299
+ :unknown)
3300
+ SENSITIVE = []
3301
+ include Aws::Structure
3302
+ include Aws::Structure::Union
3303
+
3304
+ class Bytes < VideoSource; end
3305
+ class S3Location < VideoSource; end
3306
+ class Unknown < VideoSource; end
3307
+ end
3308
+
2296
3309
  # The messages output stream
2297
3310
  #
2298
3311
  # EventStream is an Enumerator of Events.
@@ -2320,6 +3333,48 @@ module Aws::BedrockRuntime
2320
3333
 
2321
3334
  end
2322
3335
 
3336
+ # Payload content, the speech chunk, for the bidirectional input of the
3337
+ # invocation step.
3338
+ #
3339
+ # EventStream is an Enumerator of Events.
3340
+ # #event_types #=> Array, returns all modeled event types in the stream
3341
+ #
3342
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithBidirectionalStreamInput AWS API Documentation
3343
+ #
3344
+ class InvokeModelWithBidirectionalStreamInput < Enumerator
3345
+
3346
+ def event_types
3347
+ [
3348
+ :chunk
3349
+ ]
3350
+ end
3351
+
3352
+ end
3353
+
3354
+ # Output from the bidirectional stream that was used for model
3355
+ # invocation.
3356
+ #
3357
+ # EventStream is an Enumerator of Events.
3358
+ # #event_types #=> Array, returns all modeled event types in the stream
3359
+ #
3360
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithBidirectionalStreamOutput AWS API Documentation
3361
+ #
3362
+ class InvokeModelWithBidirectionalStreamOutput < Enumerator
3363
+
3364
+ def event_types
3365
+ [
3366
+ :chunk,
3367
+ :internal_server_exception,
3368
+ :model_stream_error_exception,
3369
+ :validation_exception,
3370
+ :throttling_exception,
3371
+ :model_timeout_exception,
3372
+ :service_unavailable_exception
3373
+ ]
3374
+ end
3375
+
3376
+ end
3377
+
2323
3378
  # Definition of content in the response stream.
2324
3379
  #
2325
3380
  # EventStream is an Enumerator of Events.