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.
@@ -7,35 +7,35 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
- require 'seahorse/client/plugins/content_length.rb'
11
- require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
- require 'aws-sdk-core/plugins/logging.rb'
13
- require 'aws-sdk-core/plugins/param_converter.rb'
14
- require 'aws-sdk-core/plugins/param_validator.rb'
15
- require 'aws-sdk-core/plugins/user_agent.rb'
16
- require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
- require 'aws-sdk-core/plugins/retry_errors.rb'
18
- require 'aws-sdk-core/plugins/global_configuration.rb'
19
- require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
- require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
- require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
- require 'aws-sdk-core/plugins/response_paging.rb'
23
- require 'aws-sdk-core/plugins/stub_responses.rb'
24
- require 'aws-sdk-core/plugins/idempotency_token.rb'
25
- require 'aws-sdk-core/plugins/invocation_id.rb'
26
- require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
27
- require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
28
- require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
29
- require 'aws-sdk-core/plugins/transfer_encoding.rb'
30
- require 'aws-sdk-core/plugins/http_checksum.rb'
31
- require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
- require 'aws-sdk-core/plugins/request_compression.rb'
33
- require 'aws-sdk-core/plugins/defaults_mode.rb'
34
- require 'aws-sdk-core/plugins/recursion_detection.rb'
35
- require 'aws-sdk-core/plugins/telemetry.rb'
36
- require 'aws-sdk-core/plugins/sign.rb'
37
- require 'aws-sdk-core/plugins/protocols/rest_json.rb'
38
- require 'aws-sdk-core/plugins/event_stream_configuration.rb'
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/rest_json'
38
+ require 'aws-sdk-core/plugins/event_stream_configuration'
39
39
 
40
40
  module Aws::BedrockRuntime
41
41
  # An API client for BedrockRuntime. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -268,11 +268,34 @@ module Aws::BedrockRuntime
268
268
  # Used when loading credentials from the shared credentials file
269
269
  # at HOME/.aws/credentials. When not specified, 'default' is used.
270
270
  #
271
+ # @option options [String] :request_checksum_calculation ("when_supported")
272
+ # Determines when a checksum will be calculated for request payloads. Values are:
273
+ #
274
+ # * `when_supported` - (default) When set, a checksum will be
275
+ # calculated for all request payloads of operations modeled with the
276
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
277
+ # `requestAlgorithmMember` is modeled.
278
+ # * `when_required` - When set, a checksum will only be calculated for
279
+ # request payloads of operations modeled with the `httpChecksum` trait where
280
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
281
+ # is modeled and supplied.
282
+ #
271
283
  # @option options [Integer] :request_min_compression_size_bytes (10240)
272
284
  # The minimum size in bytes that triggers compression for request
273
285
  # bodies. The value must be non-negative integer value between 0
274
286
  # and 10485780 bytes inclusive.
275
287
  #
288
+ # @option options [String] :response_checksum_validation ("when_supported")
289
+ # Determines when checksum validation will be performed on response payloads. Values are:
290
+ #
291
+ # * `when_supported` - (default) When set, checksum validation is performed on all
292
+ # response payloads of operations modeled with the `httpChecksum` trait where
293
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
294
+ # are supported.
295
+ # * `when_required` - When set, checksum validation is not performed on
296
+ # response payloads of operations unless the checksum algorithm is supported and
297
+ # the `requestValidationModeMember` member is set to `ENABLED`.
298
+ #
276
299
  # @option options [Proc] :retry_backoff
277
300
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
278
301
  # This option is only used in the `legacy` retry mode.
@@ -460,6 +483,14 @@ module Aws::BedrockRuntime
460
483
 
461
484
  # The action to apply a guardrail.
462
485
  #
486
+ # For troubleshooting some of the common errors you might encounter when
487
+ # using the `ApplyGuardrail` API, see [Troubleshooting Amazon Bedrock
488
+ # API Error Codes][1] in the Amazon Bedrock User Guide
489
+ #
490
+ #
491
+ #
492
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
493
+ #
463
494
  # @option params [required, String] :guardrail_identifier
464
495
  # The guardrail identifier used in the request to apply the guardrail.
465
496
  #
@@ -472,10 +503,21 @@ module Aws::BedrockRuntime
472
503
  # @option params [required, Array<Types::GuardrailContentBlock>] :content
473
504
  # The content details used in the request to apply the guardrail.
474
505
  #
506
+ # @option params [String] :output_scope
507
+ # Specifies the scope of the output that you get in the response. Set to
508
+ # `FULL` to return the entire output, including any detected and
509
+ # non-detected entries in the response for enhanced debugging.
510
+ #
511
+ # Note that the full output scope doesn't apply to word filters or
512
+ # regex in sensitive information filters. It does apply to all other
513
+ # filtering policies, including sensitive information with filters that
514
+ # can detect personally identifiable information (PII).
515
+ #
475
516
  # @return [Types::ApplyGuardrailResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
476
517
  #
477
518
  # * {Types::ApplyGuardrailResponse#usage #usage} => Types::GuardrailUsage
478
519
  # * {Types::ApplyGuardrailResponse#action #action} => String
520
+ # * {Types::ApplyGuardrailResponse#action_reason #action_reason} => String
479
521
  # * {Types::ApplyGuardrailResponse#outputs #outputs} => Array&lt;Types::GuardrailOutputContent&gt;
480
522
  # * {Types::ApplyGuardrailResponse#assessments #assessments} => Array&lt;Types::GuardrailAssessment&gt;
481
523
  # * {Types::ApplyGuardrailResponse#guardrail_coverage #guardrail_coverage} => Types::GuardrailCoverage
@@ -492,8 +534,15 @@ module Aws::BedrockRuntime
492
534
  # text: "String", # required
493
535
  # qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
494
536
  # },
537
+ # image: {
538
+ # format: "png", # required, accepts png, jpeg
539
+ # source: { # required
540
+ # bytes: "data",
541
+ # },
542
+ # },
495
543
  # },
496
544
  # ],
545
+ # output_scope: "INTERVENTIONS", # accepts INTERVENTIONS, FULL
497
546
  # })
498
547
  #
499
548
  # @example Response structure
@@ -504,40 +553,49 @@ module Aws::BedrockRuntime
504
553
  # resp.usage.sensitive_information_policy_units #=> Integer
505
554
  # resp.usage.sensitive_information_policy_free_units #=> Integer
506
555
  # resp.usage.contextual_grounding_policy_units #=> Integer
556
+ # resp.usage.content_policy_image_units #=> Integer
507
557
  # resp.action #=> String, one of "NONE", "GUARDRAIL_INTERVENED"
558
+ # resp.action_reason #=> String
508
559
  # resp.outputs #=> Array
509
560
  # resp.outputs[0].text #=> String
510
561
  # resp.assessments #=> Array
511
562
  # resp.assessments[0].topic_policy.topics #=> Array
512
563
  # resp.assessments[0].topic_policy.topics[0].name #=> String
513
564
  # resp.assessments[0].topic_policy.topics[0].type #=> String, one of "DENY"
514
- # resp.assessments[0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
565
+ # resp.assessments[0].topic_policy.topics[0].action #=> String, one of "BLOCKED", "NONE"
566
+ # resp.assessments[0].topic_policy.topics[0].detected #=> Boolean
515
567
  # resp.assessments[0].content_policy.filters #=> Array
516
568
  # resp.assessments[0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
517
569
  # resp.assessments[0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
518
570
  # resp.assessments[0].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
519
- # resp.assessments[0].content_policy.filters[0].action #=> String, one of "BLOCKED"
571
+ # resp.assessments[0].content_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
572
+ # resp.assessments[0].content_policy.filters[0].detected #=> Boolean
520
573
  # resp.assessments[0].word_policy.custom_words #=> Array
521
574
  # resp.assessments[0].word_policy.custom_words[0].match #=> String
522
- # resp.assessments[0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
575
+ # resp.assessments[0].word_policy.custom_words[0].action #=> String, one of "BLOCKED", "NONE"
576
+ # resp.assessments[0].word_policy.custom_words[0].detected #=> Boolean
523
577
  # resp.assessments[0].word_policy.managed_word_lists #=> Array
524
578
  # resp.assessments[0].word_policy.managed_word_lists[0].match #=> String
525
579
  # resp.assessments[0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
526
- # resp.assessments[0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
580
+ # resp.assessments[0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED", "NONE"
581
+ # resp.assessments[0].word_policy.managed_word_lists[0].detected #=> Boolean
527
582
  # resp.assessments[0].sensitive_information_policy.pii_entities #=> Array
528
583
  # resp.assessments[0].sensitive_information_policy.pii_entities[0].match #=> String
529
584
  # resp.assessments[0].sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
530
- # resp.assessments[0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
585
+ # resp.assessments[0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
586
+ # resp.assessments[0].sensitive_information_policy.pii_entities[0].detected #=> Boolean
531
587
  # resp.assessments[0].sensitive_information_policy.regexes #=> Array
532
588
  # resp.assessments[0].sensitive_information_policy.regexes[0].name #=> String
533
589
  # resp.assessments[0].sensitive_information_policy.regexes[0].match #=> String
534
590
  # resp.assessments[0].sensitive_information_policy.regexes[0].regex #=> String
535
- # resp.assessments[0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
591
+ # resp.assessments[0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
592
+ # resp.assessments[0].sensitive_information_policy.regexes[0].detected #=> Boolean
536
593
  # resp.assessments[0].contextual_grounding_policy.filters #=> Array
537
594
  # resp.assessments[0].contextual_grounding_policy.filters[0].type #=> String, one of "GROUNDING", "RELEVANCE"
538
595
  # resp.assessments[0].contextual_grounding_policy.filters[0].threshold #=> Float
539
596
  # resp.assessments[0].contextual_grounding_policy.filters[0].score #=> Float
540
597
  # resp.assessments[0].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
598
+ # resp.assessments[0].contextual_grounding_policy.filters[0].detected #=> Boolean
541
599
  # resp.assessments[0].invocation_metrics.guardrail_processing_latency #=> Integer
542
600
  # resp.assessments[0].invocation_metrics.usage.topic_policy_units #=> Integer
543
601
  # resp.assessments[0].invocation_metrics.usage.content_policy_units #=> Integer
@@ -545,10 +603,15 @@ module Aws::BedrockRuntime
545
603
  # resp.assessments[0].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
546
604
  # resp.assessments[0].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
547
605
  # resp.assessments[0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
606
+ # resp.assessments[0].invocation_metrics.usage.content_policy_image_units #=> Integer
548
607
  # resp.assessments[0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
549
608
  # resp.assessments[0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
609
+ # resp.assessments[0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
610
+ # resp.assessments[0].invocation_metrics.guardrail_coverage.images.total #=> Integer
550
611
  # resp.guardrail_coverage.text_characters.guarded #=> Integer
551
612
  # resp.guardrail_coverage.text_characters.total #=> Integer
613
+ # resp.guardrail_coverage.images.guarded #=> Integer
614
+ # resp.guardrail_coverage.images.total #=> Integer
552
615
  #
553
616
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ApplyGuardrail AWS API Documentation
554
617
  #
@@ -568,6 +631,21 @@ module Aws::BedrockRuntime
568
631
  # Amazon Bedrock doesn't store any text, images, or documents that you
569
632
  # provide as content. The data is only used to generate the response.
570
633
  #
634
+ # You can submit a prompt by including it in the `messages` field,
635
+ # specifying the `modelId` of a foundation model or inference profile to
636
+ # run inference on it, and including any other fields that are relevant
637
+ # to your use case.
638
+ #
639
+ # You can also submit a prompt from Prompt management by specifying the
640
+ # ARN of the prompt version and including a map of variables to values
641
+ # in the `promptVariables` field. You can append more messages to the
642
+ # prompt by using the `messages` field. If you use a prompt from Prompt
643
+ # management, you can't include the following fields in the request:
644
+ # `additionalModelRequestFields`, `inferenceConfig`, `system`, or
645
+ # `toolConfig`. Instead, these fields must be defined through Prompt
646
+ # management. For more information, see [Use a prompt from Prompt
647
+ # management][1].
648
+ #
571
649
  # For information about the Converse API, see *Use the Converse API* in
572
650
  # the *Amazon Bedrock User Guide*. To use a guardrail, see *Use a
573
651
  # guardrail with the Converse API* in the *Amazon Bedrock User Guide*.
@@ -580,10 +658,28 @@ module Aws::BedrockRuntime
580
658
  # This operation requires permission for the `bedrock:InvokeModel`
581
659
  # action.
582
660
  #
583
- # @option params [required, String] :model_id
584
- # The identifier for the model that you want to call.
661
+ # To deny all inference access to resources that you specify in the
662
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
663
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
664
+ # denies access to the resource through the base inference actions
665
+ # ([InvokeModel][2] and [InvokeModelWithResponseStream][3]). For more
666
+ # information see [Deny access for inference on specific models][4].
585
667
  #
586
- # The `modelId` to provide depends on the type of model or throughput
668
+ # For troubleshooting some of the common errors you might encounter when
669
+ # using the `Converse` API, see [Troubleshooting Amazon Bedrock API
670
+ # Error Codes][5] in the Amazon Bedrock User Guide
671
+ #
672
+ #
673
+ #
674
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html
675
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
676
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html
677
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
678
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
679
+ #
680
+ # @option params [required, String] :model_id
681
+ # Specifies the model or throughput with which to run inference, or the
682
+ # prompt resource to use in inference. The value depends on the resource
587
683
  # that you use:
588
684
  #
589
685
  # * If you use a base model, specify the model ID or its ARN. For a list
@@ -604,7 +700,10 @@ module Aws::BedrockRuntime
604
700
  # more information, see [Use a custom model in Amazon Bedrock][4] in
605
701
  # the Amazon Bedrock User Guide.
606
702
  #
607
- # The Converse API doesn't support [imported models][5].
703
+ # * To include a prompt that was defined in [Prompt management][5],
704
+ # specify the ARN of the prompt version to use.
705
+ #
706
+ # The Converse API doesn't support [imported models][6].
608
707
  #
609
708
  #
610
709
  #
@@ -612,38 +711,47 @@ module Aws::BedrockRuntime
612
711
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
613
712
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
614
713
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
615
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
714
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
715
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
616
716
  #
617
- # @option params [required, Array<Types::Message>] :messages
717
+ # @option params [Array<Types::Message>] :messages
618
718
  # The messages that you want to send to the model.
619
719
  #
620
720
  # @option params [Array<Types::SystemContentBlock>] :system
621
- # A system prompt to pass to the model.
721
+ # A prompt that provides instructions or context to the model about the
722
+ # task it should perform, or the persona it should adopt during the
723
+ # conversation.
622
724
  #
623
725
  # @option params [Types::InferenceConfiguration] :inference_config
624
- # Inference parameters to pass to the model. `Converse` supports a base
625
- # set of inference parameters. If you need to pass additional parameters
626
- # that the model supports, use the `additionalModelRequestFields`
627
- # request field.
726
+ # Inference parameters to pass to the model. `Converse` and
727
+ # `ConverseStream` support a base set of inference parameters. If you
728
+ # need to pass additional parameters that the model supports, use the
729
+ # `additionalModelRequestFields` request field.
628
730
  #
629
731
  # @option params [Types::ToolConfiguration] :tool_config
630
732
  # Configuration information for the tools that the model can use when
631
733
  # generating a response.
632
734
  #
633
- # <note markdown="1"> This field is only supported by Anthropic Claude 3, Cohere Command R,
634
- # Cohere Command R+, and Mistral Large models.
735
+ # For information about models that support tool use, see [Supported
736
+ # models and model features][1].
737
+ #
738
+ #
635
739
  #
636
- # </note>
740
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features
637
741
  #
638
742
  # @option params [Types::GuardrailConfiguration] :guardrail_config
639
743
  # Configuration information for a guardrail that you want to use in the
640
- # request.
744
+ # request. If you include `guardContent` blocks in the `content` field
745
+ # in the `messages` field, the guardrail operates only on those
746
+ # messages. If you include no `guardContent` blocks, the guardrail
747
+ # operates on all messages in the request body and in any included
748
+ # prompt resource.
641
749
  #
642
750
  # @option params [Hash,Array,String,Numeric,Boolean] :additional_model_request_fields
643
751
  # Additional inference parameters that the model supports, beyond the
644
- # base set of inference parameters that `Converse` supports in the
645
- # `inferenceConfig` field. For more information, see [Model
646
- # parameters][1].
752
+ # base set of inference parameters that `Converse` and `ConverseStream`
753
+ # support in the `inferenceConfig` field. For more information, see
754
+ # [Model parameters][1].
647
755
  #
648
756
  # Document type used to carry open content
649
757
  # (Hash,Array,String,Numeric,Boolean). A document type value is
@@ -654,26 +762,38 @@ module Aws::BedrockRuntime
654
762
  #
655
763
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
656
764
  #
765
+ # @option params [Hash<String,Types::PromptVariableValues>] :prompt_variables
766
+ # Contains a map of variables in a prompt from Prompt management to
767
+ # objects containing the values to fill in for them when running model
768
+ # invocation. This field is ignored if you don't specify a prompt
769
+ # resource in the `modelId` field.
770
+ #
657
771
  # @option params [Array<String>] :additional_model_response_field_paths
658
772
  # Additional model parameters field paths to return in the response.
659
- # `Converse` returns the requested fields as a JSON Pointer object in
660
- # the `additionalModelResponseFields` field. The following is example
661
- # JSON for `additionalModelResponseFieldPaths`.
773
+ # `Converse` and `ConverseStream` return the requested fields as a JSON
774
+ # Pointer object in the `additionalModelResponseFields` field. The
775
+ # following is example JSON for `additionalModelResponseFieldPaths`.
662
776
  #
663
777
  # `[ "/stop_sequence" ]`
664
778
  #
665
779
  # For information about the JSON Pointer syntax, see the [Internet
666
780
  # Engineering Task Force (IETF)][1] documentation.
667
781
  #
668
- # `Converse` rejects an empty JSON Pointer or incorrectly structured
669
- # JSON Pointer with a `400` error code. if the JSON Pointer is valid,
670
- # but the requested field is not in the model response, it is ignored by
671
- # `Converse`.
782
+ # `Converse` and `ConverseStream` reject an empty JSON Pointer or
783
+ # incorrectly structured JSON Pointer with a `400` error code. if the
784
+ # JSON Pointer is valid, but the requested field is not in the model
785
+ # response, it is ignored by `Converse`.
672
786
  #
673
787
  #
674
788
  #
675
789
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
676
790
  #
791
+ # @option params [Hash<String,String>] :request_metadata
792
+ # Key-value pairs that you can use to filter invocation logs.
793
+ #
794
+ # @option params [Types::PerformanceConfiguration] :performance_config
795
+ # Model performance settings for the request.
796
+ #
677
797
  # @return [Types::ConverseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
678
798
  #
679
799
  # * {Types::ConverseResponse#output #output} => Types::ConverseOutput
@@ -682,12 +802,13 @@ module Aws::BedrockRuntime
682
802
  # * {Types::ConverseResponse#metrics #metrics} => Types::ConverseMetrics
683
803
  # * {Types::ConverseResponse#additional_model_response_fields #additional_model_response_fields} => Hash,Array,String,Numeric,Boolean
684
804
  # * {Types::ConverseResponse#trace #trace} => Types::ConverseTrace
805
+ # * {Types::ConverseResponse#performance_config #performance_config} => Types::PerformanceConfiguration
685
806
  #
686
807
  # @example Request syntax with placeholder values
687
808
  #
688
809
  # resp = client.converse({
689
810
  # model_id: "ConversationalModelId", # required
690
- # messages: [ # required
811
+ # messages: [
691
812
  # {
692
813
  # role: "user", # required, accepts user, assistant
693
814
  # content: [ # required
@@ -706,6 +827,16 @@ module Aws::BedrockRuntime
706
827
  # bytes: "data",
707
828
  # },
708
829
  # },
830
+ # video: {
831
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
832
+ # source: { # required
833
+ # bytes: "data",
834
+ # s3_location: {
835
+ # uri: "S3Uri", # required
836
+ # bucket_owner: "AccountId",
837
+ # },
838
+ # },
839
+ # },
709
840
  # tool_use: {
710
841
  # tool_use_id: "ToolUseId", # required
711
842
  # name: "ToolName", # required
@@ -732,6 +863,16 @@ module Aws::BedrockRuntime
732
863
  # bytes: "data",
733
864
  # },
734
865
  # },
866
+ # video: {
867
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
868
+ # source: { # required
869
+ # bytes: "data",
870
+ # s3_location: {
871
+ # uri: "S3Uri", # required
872
+ # bucket_owner: "AccountId",
873
+ # },
874
+ # },
875
+ # },
735
876
  # },
736
877
  # ],
737
878
  # status: "success", # accepts success, error
@@ -741,6 +882,22 @@ module Aws::BedrockRuntime
741
882
  # text: "String", # required
742
883
  # qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
743
884
  # },
885
+ # image: {
886
+ # format: "png", # required, accepts png, jpeg
887
+ # source: { # required
888
+ # bytes: "data",
889
+ # },
890
+ # },
891
+ # },
892
+ # cache_point: {
893
+ # type: "default", # required, accepts default
894
+ # },
895
+ # reasoning_content: {
896
+ # reasoning_text: {
897
+ # text: "String", # required
898
+ # signature: "String",
899
+ # },
900
+ # redacted_content: "data",
744
901
  # },
745
902
  # },
746
903
  # ],
@@ -754,6 +911,15 @@ module Aws::BedrockRuntime
754
911
  # text: "String", # required
755
912
  # qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
756
913
  # },
914
+ # image: {
915
+ # format: "png", # required, accepts png, jpeg
916
+ # source: { # required
917
+ # bytes: "data",
918
+ # },
919
+ # },
920
+ # },
921
+ # cache_point: {
922
+ # type: "default", # required, accepts default
757
923
  # },
758
924
  # },
759
925
  # ],
@@ -774,6 +940,9 @@ module Aws::BedrockRuntime
774
940
  # },
775
941
  # },
776
942
  # },
943
+ # cache_point: {
944
+ # type: "default", # required, accepts default
945
+ # },
777
946
  # },
778
947
  # ],
779
948
  # tool_choice: {
@@ -789,11 +958,22 @@ module Aws::BedrockRuntime
789
958
  # guardrail_config: {
790
959
  # guardrail_identifier: "GuardrailIdentifier", # required
791
960
  # guardrail_version: "GuardrailVersion", # required
792
- # trace: "enabled", # accepts enabled, disabled
961
+ # trace: "enabled", # accepts enabled, disabled, enabled_full
793
962
  # },
794
963
  # additional_model_request_fields: {
795
964
  # },
965
+ # prompt_variables: {
966
+ # "String" => {
967
+ # text: "String",
968
+ # },
969
+ # },
796
970
  # additional_model_response_field_paths: ["ConverseRequestAdditionalModelResponseFieldPathsListMemberString"],
971
+ # request_metadata: {
972
+ # "RequestMetadataKeyString" => "RequestMetadataValueString",
973
+ # },
974
+ # performance_config: {
975
+ # latency: "standard", # accepts standard, optimized
976
+ # },
797
977
  # })
798
978
  #
799
979
  # @example Response structure
@@ -806,6 +986,10 @@ module Aws::BedrockRuntime
806
986
  # resp.output.message.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
807
987
  # resp.output.message.content[0].document.name #=> String
808
988
  # resp.output.message.content[0].document.source.bytes #=> String
989
+ # resp.output.message.content[0].video.format #=> String, one of "mkv", "mov", "mp4", "webm", "flv", "mpeg", "mpg", "wmv", "three_gp"
990
+ # resp.output.message.content[0].video.source.bytes #=> String
991
+ # resp.output.message.content[0].video.source.s3_location.uri #=> String
992
+ # resp.output.message.content[0].video.source.s3_location.bucket_owner #=> String
809
993
  # resp.output.message.content[0].tool_use.tool_use_id #=> String
810
994
  # resp.output.message.content[0].tool_use.name #=> String
811
995
  # resp.output.message.content[0].tool_result.tool_use_id #=> String
@@ -816,14 +1000,26 @@ module Aws::BedrockRuntime
816
1000
  # resp.output.message.content[0].tool_result.content[0].document.format #=> String, one of "pdf", "csv", "doc", "docx", "xls", "xlsx", "html", "txt", "md"
817
1001
  # resp.output.message.content[0].tool_result.content[0].document.name #=> String
818
1002
  # resp.output.message.content[0].tool_result.content[0].document.source.bytes #=> String
1003
+ # resp.output.message.content[0].tool_result.content[0].video.format #=> String, one of "mkv", "mov", "mp4", "webm", "flv", "mpeg", "mpg", "wmv", "three_gp"
1004
+ # resp.output.message.content[0].tool_result.content[0].video.source.bytes #=> String
1005
+ # resp.output.message.content[0].tool_result.content[0].video.source.s3_location.uri #=> String
1006
+ # resp.output.message.content[0].tool_result.content[0].video.source.s3_location.bucket_owner #=> String
819
1007
  # resp.output.message.content[0].tool_result.status #=> String, one of "success", "error"
820
1008
  # resp.output.message.content[0].guard_content.text.text #=> String
821
1009
  # resp.output.message.content[0].guard_content.text.qualifiers #=> Array
822
1010
  # resp.output.message.content[0].guard_content.text.qualifiers[0] #=> String, one of "grounding_source", "query", "guard_content"
1011
+ # resp.output.message.content[0].guard_content.image.format #=> String, one of "png", "jpeg"
1012
+ # resp.output.message.content[0].guard_content.image.source.bytes #=> String
1013
+ # resp.output.message.content[0].cache_point.type #=> String, one of "default"
1014
+ # resp.output.message.content[0].reasoning_content.reasoning_text.text #=> String
1015
+ # resp.output.message.content[0].reasoning_content.reasoning_text.signature #=> String
1016
+ # resp.output.message.content[0].reasoning_content.redacted_content #=> String
823
1017
  # resp.stop_reason #=> String, one of "end_turn", "tool_use", "max_tokens", "stop_sequence", "guardrail_intervened", "content_filtered"
824
1018
  # resp.usage.input_tokens #=> Integer
825
1019
  # resp.usage.output_tokens #=> Integer
826
1020
  # resp.usage.total_tokens #=> Integer
1021
+ # resp.usage.cache_read_input_tokens #=> Integer
1022
+ # resp.usage.cache_write_input_tokens #=> Integer
827
1023
  # resp.metrics.latency_ms #=> Integer
828
1024
  # resp.trace.guardrail.model_output #=> Array
829
1025
  # resp.trace.guardrail.model_output[0] #=> String
@@ -831,33 +1027,40 @@ module Aws::BedrockRuntime
831
1027
  # resp.trace.guardrail.input_assessment["String"].topic_policy.topics #=> Array
832
1028
  # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].name #=> String
833
1029
  # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].type #=> String, one of "DENY"
834
- # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1030
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED", "NONE"
1031
+ # resp.trace.guardrail.input_assessment["String"].topic_policy.topics[0].detected #=> Boolean
835
1032
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
836
1033
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
837
1034
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
838
1035
  # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
839
- # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
1036
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1037
+ # resp.trace.guardrail.input_assessment["String"].content_policy.filters[0].detected #=> Boolean
840
1038
  # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
841
1039
  # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
842
- # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1040
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED", "NONE"
1041
+ # resp.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].detected #=> Boolean
843
1042
  # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists #=> Array
844
1043
  # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].match #=> String
845
1044
  # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
846
- # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1045
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED", "NONE"
1046
+ # resp.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].detected #=> Boolean
847
1047
  # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities #=> Array
848
1048
  # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].match #=> String
849
1049
  # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
850
- # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1050
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1051
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].detected #=> Boolean
851
1052
  # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes #=> Array
852
1053
  # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].name #=> String
853
1054
  # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].match #=> String
854
1055
  # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].regex #=> String
855
- # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1056
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1057
+ # resp.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].detected #=> Boolean
856
1058
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters #=> Array
857
1059
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].type #=> String, one of "GROUNDING", "RELEVANCE"
858
1060
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].threshold #=> Float
859
1061
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].score #=> Float
860
1062
  # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1063
+ # resp.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].detected #=> Boolean
861
1064
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_processing_latency #=> Integer
862
1065
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.topic_policy_units #=> Integer
863
1066
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.content_policy_units #=> Integer
@@ -865,40 +1068,50 @@ module Aws::BedrockRuntime
865
1068
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
866
1069
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
867
1070
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
1071
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.usage.content_policy_image_units #=> Integer
868
1072
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
869
1073
  # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
1074
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
1075
+ # resp.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.total #=> Integer
870
1076
  # resp.trace.guardrail.output_assessments #=> Hash
871
1077
  # resp.trace.guardrail.output_assessments["String"] #=> Array
872
1078
  # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
873
1079
  # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].name #=> String
874
1080
  # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].type #=> String, one of "DENY"
875
- # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1081
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED", "NONE"
1082
+ # resp.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].detected #=> Boolean
876
1083
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
877
1084
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
878
1085
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
879
1086
  # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
880
- # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
1087
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1088
+ # resp.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].detected #=> Boolean
881
1089
  # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
882
1090
  # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
883
- # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1091
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED", "NONE"
1092
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].detected #=> Boolean
884
1093
  # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists #=> Array
885
1094
  # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].match #=> String
886
1095
  # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
887
- # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1096
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED", "NONE"
1097
+ # resp.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].detected #=> Boolean
888
1098
  # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities #=> Array
889
1099
  # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].match #=> String
890
1100
  # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
891
- # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1101
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1102
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].detected #=> Boolean
892
1103
  # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes #=> Array
893
1104
  # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].name #=> String
894
1105
  # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].match #=> String
895
1106
  # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].regex #=> String
896
- # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1107
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1108
+ # resp.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].detected #=> Boolean
897
1109
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters #=> Array
898
1110
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].type #=> String, one of "GROUNDING", "RELEVANCE"
899
1111
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].threshold #=> Float
900
1112
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].score #=> Float
901
1113
  # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1114
+ # resp.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].detected #=> Boolean
902
1115
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_processing_latency #=> Integer
903
1116
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.topic_policy_units #=> Integer
904
1117
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.content_policy_units #=> Integer
@@ -906,8 +1119,14 @@ module Aws::BedrockRuntime
906
1119
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
907
1120
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
908
1121
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
1122
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.content_policy_image_units #=> Integer
909
1123
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
910
1124
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
1125
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
1126
+ # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.total #=> Integer
1127
+ # resp.trace.guardrail.action_reason #=> String
1128
+ # resp.trace.prompt_router.invoked_model_id #=> String
1129
+ # resp.performance_config.latency #=> String, one of "standard", "optimized"
911
1130
  #
912
1131
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse AWS API Documentation
913
1132
  #
@@ -937,6 +1156,21 @@ module Aws::BedrockRuntime
937
1156
  # Amazon Bedrock doesn't store any text, images, or documents that you
938
1157
  # provide as content. The data is only used to generate the response.
939
1158
  #
1159
+ # You can submit a prompt by including it in the `messages` field,
1160
+ # specifying the `modelId` of a foundation model or inference profile to
1161
+ # run inference on it, and including any other fields that are relevant
1162
+ # to your use case.
1163
+ #
1164
+ # You can also submit a prompt from Prompt management by specifying the
1165
+ # ARN of the prompt version and including a map of variables to values
1166
+ # in the `promptVariables` field. You can append more messages to the
1167
+ # prompt by using the `messages` field. If you use a prompt from Prompt
1168
+ # management, you can't include the following fields in the request:
1169
+ # `additionalModelRequestFields`, `inferenceConfig`, `system`, or
1170
+ # `toolConfig`. Instead, these fields must be defined through Prompt
1171
+ # management. For more information, see [Use a prompt from Prompt
1172
+ # management][2].
1173
+ #
940
1174
  # For information about the Converse API, see *Use the Converse API* in
941
1175
  # the *Amazon Bedrock User Guide*. To use a guardrail, see *Use a
942
1176
  # guardrail with the Converse API* in the *Amazon Bedrock User Guide*.
@@ -949,14 +1183,29 @@ module Aws::BedrockRuntime
949
1183
  # This operation requires permission for the
950
1184
  # `bedrock:InvokeModelWithResponseStream` action.
951
1185
  #
1186
+ # To deny all inference access to resources that you specify in the
1187
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
1188
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
1189
+ # denies access to the resource through the base inference actions
1190
+ # ([InvokeModel][3] and [InvokeModelWithResponseStream][4]). For more
1191
+ # information see [Deny access for inference on specific models][5].
1192
+ #
1193
+ # For troubleshooting some of the common errors you might encounter when
1194
+ # using the `ConverseStream` API, see [Troubleshooting Amazon Bedrock
1195
+ # API Error Codes][6] in the Amazon Bedrock User Guide
1196
+ #
952
1197
  #
953
1198
  #
954
1199
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html
1200
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html
1201
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
1202
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html
1203
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
1204
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
955
1205
  #
956
1206
  # @option params [required, String] :model_id
957
- # The ID for the model.
958
- #
959
- # The `modelId` to provide depends on the type of model or throughput
1207
+ # Specifies the model or throughput with which to run inference, or the
1208
+ # prompt resource to use in inference. The value depends on the resource
960
1209
  # that you use:
961
1210
  #
962
1211
  # * If you use a base model, specify the model ID or its ARN. For a list
@@ -977,7 +1226,10 @@ module Aws::BedrockRuntime
977
1226
  # more information, see [Use a custom model in Amazon Bedrock][4] in
978
1227
  # the Amazon Bedrock User Guide.
979
1228
  #
980
- # The Converse API doesn't support [imported models][5].
1229
+ # * To include a prompt that was defined in [Prompt management][5],
1230
+ # specify the ARN of the prompt version to use.
1231
+ #
1232
+ # The Converse API doesn't support [imported models][6].
981
1233
  #
982
1234
  #
983
1235
  #
@@ -985,62 +1237,89 @@ module Aws::BedrockRuntime
985
1237
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
986
1238
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
987
1239
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
988
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1240
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
1241
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
989
1242
  #
990
- # @option params [required, Array<Types::Message>] :messages
1243
+ # @option params [Array<Types::Message>] :messages
991
1244
  # The messages that you want to send to the model.
992
1245
  #
993
1246
  # @option params [Array<Types::SystemContentBlock>] :system
994
- # A system prompt to send to the model.
1247
+ # A prompt that provides instructions or context to the model about the
1248
+ # task it should perform, or the persona it should adopt during the
1249
+ # conversation.
995
1250
  #
996
1251
  # @option params [Types::InferenceConfiguration] :inference_config
997
- # Inference parameters to pass to the model. `ConverseStream` supports a
998
- # base set of inference parameters. If you need to pass additional
999
- # parameters that the model supports, use the
1252
+ # Inference parameters to pass to the model. `Converse` and
1253
+ # `ConverseStream` support a base set of inference parameters. If you
1254
+ # need to pass additional parameters that the model supports, use the
1000
1255
  # `additionalModelRequestFields` request field.
1001
1256
  #
1002
1257
  # @option params [Types::ToolConfiguration] :tool_config
1003
1258
  # Configuration information for the tools that the model can use when
1004
1259
  # generating a response.
1005
1260
  #
1006
- # <note markdown="1"> This field is only supported by Anthropic Claude 3 models.
1261
+ # For information about models that support streaming tool use, see
1262
+ # [Supported models and model features][1].
1263
+ #
1264
+ #
1007
1265
  #
1008
- # </note>
1266
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-supported-models-features
1009
1267
  #
1010
1268
  # @option params [Types::GuardrailStreamConfiguration] :guardrail_config
1011
1269
  # Configuration information for a guardrail that you want to use in the
1012
- # request.
1270
+ # request. If you include `guardContent` blocks in the `content` field
1271
+ # in the `messages` field, the guardrail operates only on those
1272
+ # messages. If you include no `guardContent` blocks, the guardrail
1273
+ # operates on all messages in the request body and in any included
1274
+ # prompt resource.
1013
1275
  #
1014
1276
  # @option params [Hash,Array,String,Numeric,Boolean] :additional_model_request_fields
1015
1277
  # Additional inference parameters that the model supports, beyond the
1016
- # base set of inference parameters that `ConverseStream` supports in the
1017
- # `inferenceConfig` field.
1278
+ # base set of inference parameters that `Converse` and `ConverseStream`
1279
+ # support in the `inferenceConfig` field. For more information, see
1280
+ # [Model parameters][1].
1018
1281
  #
1019
1282
  # Document type used to carry open content
1020
1283
  # (Hash,Array,String,Numeric,Boolean). A document type value is
1021
1284
  # serialized using the same format as its surroundings and requires no
1022
1285
  # additional encoding or escaping.
1023
1286
  #
1287
+ #
1288
+ #
1289
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html
1290
+ #
1291
+ # @option params [Hash<String,Types::PromptVariableValues>] :prompt_variables
1292
+ # Contains a map of variables in a prompt from Prompt management to
1293
+ # objects containing the values to fill in for them when running model
1294
+ # invocation. This field is ignored if you don't specify a prompt
1295
+ # resource in the `modelId` field.
1296
+ #
1024
1297
  # @option params [Array<String>] :additional_model_response_field_paths
1025
1298
  # Additional model parameters field paths to return in the response.
1026
- # `ConverseStream` returns the requested fields as a JSON Pointer object
1027
- # in the `additionalModelResponseFields` field. The following is example
1028
- # JSON for `additionalModelResponseFieldPaths`.
1299
+ # `Converse` and `ConverseStream` return the requested fields as a JSON
1300
+ # Pointer object in the `additionalModelResponseFields` field. The
1301
+ # following is example JSON for `additionalModelResponseFieldPaths`.
1029
1302
  #
1030
1303
  # `[ "/stop_sequence" ]`
1031
1304
  #
1032
1305
  # For information about the JSON Pointer syntax, see the [Internet
1033
1306
  # Engineering Task Force (IETF)][1] documentation.
1034
1307
  #
1035
- # `ConverseStream` rejects an empty JSON Pointer or incorrectly
1036
- # structured JSON Pointer with a `400` error code. if the JSON Pointer
1037
- # is valid, but the requested field is not in the model response, it is
1038
- # ignored by `ConverseStream`.
1308
+ # `Converse` and `ConverseStream` reject an empty JSON Pointer or
1309
+ # incorrectly structured JSON Pointer with a `400` error code. if the
1310
+ # JSON Pointer is valid, but the requested field is not in the model
1311
+ # response, it is ignored by `Converse`.
1039
1312
  #
1040
1313
  #
1041
1314
  #
1042
1315
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
1043
1316
  #
1317
+ # @option params [Hash<String,String>] :request_metadata
1318
+ # Key-value pairs that you can use to filter invocation logs.
1319
+ #
1320
+ # @option params [Types::PerformanceConfiguration] :performance_config
1321
+ # Model performance settings for the request.
1322
+ #
1044
1323
  # @return [Types::ConverseStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1045
1324
  #
1046
1325
  # * {Types::ConverseStreamResponse#stream #stream} => Types::ConverseStreamOutput
@@ -1222,7 +1501,7 @@ module Aws::BedrockRuntime
1222
1501
  #
1223
1502
  # resp = client.converse_stream({
1224
1503
  # model_id: "ConversationalModelId", # required
1225
- # messages: [ # required
1504
+ # messages: [
1226
1505
  # {
1227
1506
  # role: "user", # required, accepts user, assistant
1228
1507
  # content: [ # required
@@ -1241,6 +1520,16 @@ module Aws::BedrockRuntime
1241
1520
  # bytes: "data",
1242
1521
  # },
1243
1522
  # },
1523
+ # video: {
1524
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
1525
+ # source: { # required
1526
+ # bytes: "data",
1527
+ # s3_location: {
1528
+ # uri: "S3Uri", # required
1529
+ # bucket_owner: "AccountId",
1530
+ # },
1531
+ # },
1532
+ # },
1244
1533
  # tool_use: {
1245
1534
  # tool_use_id: "ToolUseId", # required
1246
1535
  # name: "ToolName", # required
@@ -1267,6 +1556,16 @@ module Aws::BedrockRuntime
1267
1556
  # bytes: "data",
1268
1557
  # },
1269
1558
  # },
1559
+ # video: {
1560
+ # format: "mkv", # required, accepts mkv, mov, mp4, webm, flv, mpeg, mpg, wmv, three_gp
1561
+ # source: { # required
1562
+ # bytes: "data",
1563
+ # s3_location: {
1564
+ # uri: "S3Uri", # required
1565
+ # bucket_owner: "AccountId",
1566
+ # },
1567
+ # },
1568
+ # },
1270
1569
  # },
1271
1570
  # ],
1272
1571
  # status: "success", # accepts success, error
@@ -1276,6 +1575,22 @@ module Aws::BedrockRuntime
1276
1575
  # text: "String", # required
1277
1576
  # qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
1278
1577
  # },
1578
+ # image: {
1579
+ # format: "png", # required, accepts png, jpeg
1580
+ # source: { # required
1581
+ # bytes: "data",
1582
+ # },
1583
+ # },
1584
+ # },
1585
+ # cache_point: {
1586
+ # type: "default", # required, accepts default
1587
+ # },
1588
+ # reasoning_content: {
1589
+ # reasoning_text: {
1590
+ # text: "String", # required
1591
+ # signature: "String",
1592
+ # },
1593
+ # redacted_content: "data",
1279
1594
  # },
1280
1595
  # },
1281
1596
  # ],
@@ -1289,6 +1604,15 @@ module Aws::BedrockRuntime
1289
1604
  # text: "String", # required
1290
1605
  # qualifiers: ["grounding_source"], # accepts grounding_source, query, guard_content
1291
1606
  # },
1607
+ # image: {
1608
+ # format: "png", # required, accepts png, jpeg
1609
+ # source: { # required
1610
+ # bytes: "data",
1611
+ # },
1612
+ # },
1613
+ # },
1614
+ # cache_point: {
1615
+ # type: "default", # required, accepts default
1292
1616
  # },
1293
1617
  # },
1294
1618
  # ],
@@ -1309,6 +1633,9 @@ module Aws::BedrockRuntime
1309
1633
  # },
1310
1634
  # },
1311
1635
  # },
1636
+ # cache_point: {
1637
+ # type: "default", # required, accepts default
1638
+ # },
1312
1639
  # },
1313
1640
  # ],
1314
1641
  # tool_choice: {
@@ -1324,12 +1651,23 @@ module Aws::BedrockRuntime
1324
1651
  # guardrail_config: {
1325
1652
  # guardrail_identifier: "GuardrailIdentifier", # required
1326
1653
  # guardrail_version: "GuardrailVersion", # required
1327
- # trace: "enabled", # accepts enabled, disabled
1654
+ # trace: "enabled", # accepts enabled, disabled, enabled_full
1328
1655
  # stream_processing_mode: "sync", # accepts sync, async
1329
1656
  # },
1330
1657
  # additional_model_request_fields: {
1331
1658
  # },
1659
+ # prompt_variables: {
1660
+ # "String" => {
1661
+ # text: "String",
1662
+ # },
1663
+ # },
1332
1664
  # additional_model_response_field_paths: ["ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString"],
1665
+ # request_metadata: {
1666
+ # "RequestMetadataKeyString" => "RequestMetadataValueString",
1667
+ # },
1668
+ # performance_config: {
1669
+ # latency: "standard", # accepts standard, optimized
1670
+ # },
1333
1671
  # })
1334
1672
  #
1335
1673
  # @example Response structure
@@ -1349,6 +1687,9 @@ module Aws::BedrockRuntime
1349
1687
  # For :content_block_delta event available at #on_content_block_delta_event callback and response eventstream enumerator:
1350
1688
  # event.delta.text #=> String
1351
1689
  # event.delta.tool_use.input #=> String
1690
+ # event.delta.reasoning_content.text #=> String
1691
+ # event.delta.reasoning_content.redacted_content #=> String
1692
+ # event.delta.reasoning_content.signature #=> String
1352
1693
  # event.content_block_index #=> Integer
1353
1694
  #
1354
1695
  # For :content_block_stop event available at #on_content_block_stop_event callback and response eventstream enumerator:
@@ -1361,6 +1702,8 @@ module Aws::BedrockRuntime
1361
1702
  # event.usage.input_tokens #=> Integer
1362
1703
  # event.usage.output_tokens #=> Integer
1363
1704
  # event.usage.total_tokens #=> Integer
1705
+ # event.usage.cache_read_input_tokens #=> Integer
1706
+ # event.usage.cache_write_input_tokens #=> Integer
1364
1707
  # event.metrics.latency_ms #=> Integer
1365
1708
  # event.trace.guardrail.model_output #=> Array
1366
1709
  # event.trace.guardrail.model_output[0] #=> String
@@ -1368,33 +1711,40 @@ module Aws::BedrockRuntime
1368
1711
  # event.trace.guardrail.input_assessment["String"].topic_policy.topics #=> Array
1369
1712
  # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].name #=> String
1370
1713
  # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].type #=> String, one of "DENY"
1371
- # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1714
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].action #=> String, one of "BLOCKED", "NONE"
1715
+ # event.trace.guardrail.input_assessment["String"].topic_policy.topics[0].detected #=> Boolean
1372
1716
  # event.trace.guardrail.input_assessment["String"].content_policy.filters #=> Array
1373
1717
  # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1374
1718
  # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1375
1719
  # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1376
- # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED"
1720
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1721
+ # event.trace.guardrail.input_assessment["String"].content_policy.filters[0].detected #=> Boolean
1377
1722
  # event.trace.guardrail.input_assessment["String"].word_policy.custom_words #=> Array
1378
1723
  # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].match #=> String
1379
- # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1724
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].action #=> String, one of "BLOCKED", "NONE"
1725
+ # event.trace.guardrail.input_assessment["String"].word_policy.custom_words[0].detected #=> Boolean
1380
1726
  # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists #=> Array
1381
1727
  # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].match #=> String
1382
1728
  # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
1383
- # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1729
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED", "NONE"
1730
+ # event.trace.guardrail.input_assessment["String"].word_policy.managed_word_lists[0].detected #=> Boolean
1384
1731
  # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities #=> Array
1385
1732
  # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].match #=> String
1386
1733
  # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
1387
- # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1734
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1735
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.pii_entities[0].detected #=> Boolean
1388
1736
  # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes #=> Array
1389
1737
  # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].name #=> String
1390
1738
  # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].match #=> String
1391
1739
  # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].regex #=> String
1392
- # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1740
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1741
+ # event.trace.guardrail.input_assessment["String"].sensitive_information_policy.regexes[0].detected #=> Boolean
1393
1742
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters #=> Array
1394
1743
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].type #=> String, one of "GROUNDING", "RELEVANCE"
1395
1744
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].threshold #=> Float
1396
1745
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].score #=> Float
1397
1746
  # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1747
+ # event.trace.guardrail.input_assessment["String"].contextual_grounding_policy.filters[0].detected #=> Boolean
1398
1748
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_processing_latency #=> Integer
1399
1749
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.topic_policy_units #=> Integer
1400
1750
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.content_policy_units #=> Integer
@@ -1402,40 +1752,50 @@ module Aws::BedrockRuntime
1402
1752
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
1403
1753
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
1404
1754
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
1755
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.usage.content_policy_image_units #=> Integer
1405
1756
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
1406
1757
  # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
1758
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
1759
+ # event.trace.guardrail.input_assessment["String"].invocation_metrics.guardrail_coverage.images.total #=> Integer
1407
1760
  # event.trace.guardrail.output_assessments #=> Hash
1408
1761
  # event.trace.guardrail.output_assessments["String"] #=> Array
1409
1762
  # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics #=> Array
1410
1763
  # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].name #=> String
1411
1764
  # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].type #=> String, one of "DENY"
1412
- # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED"
1765
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].action #=> String, one of "BLOCKED", "NONE"
1766
+ # event.trace.guardrail.output_assessments["String"][0].topic_policy.topics[0].detected #=> Boolean
1413
1767
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters #=> Array
1414
1768
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].type #=> String, one of "INSULTS", "HATE", "SEXUAL", "VIOLENCE", "MISCONDUCT", "PROMPT_ATTACK"
1415
1769
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].confidence #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1416
1770
  # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].filter_strength #=> String, one of "NONE", "LOW", "MEDIUM", "HIGH"
1417
- # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED"
1771
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1772
+ # event.trace.guardrail.output_assessments["String"][0].content_policy.filters[0].detected #=> Boolean
1418
1773
  # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words #=> Array
1419
1774
  # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].match #=> String
1420
- # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED"
1775
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].action #=> String, one of "BLOCKED", "NONE"
1776
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.custom_words[0].detected #=> Boolean
1421
1777
  # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists #=> Array
1422
1778
  # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].match #=> String
1423
1779
  # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].type #=> String, one of "PROFANITY"
1424
- # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED"
1780
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].action #=> String, one of "BLOCKED", "NONE"
1781
+ # event.trace.guardrail.output_assessments["String"][0].word_policy.managed_word_lists[0].detected #=> Boolean
1425
1782
  # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities #=> Array
1426
1783
  # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].match #=> String
1427
1784
  # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].type #=> String, one of "ADDRESS", "AGE", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "CA_HEALTH_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "CREDIT_DEBIT_CARD_CVV", "CREDIT_DEBIT_CARD_EXPIRY", "CREDIT_DEBIT_CARD_NUMBER", "DRIVER_ID", "EMAIL", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "IP_ADDRESS", "LICENSE_PLATE", "MAC_ADDRESS", "NAME", "PASSWORD", "PHONE", "PIN", "SWIFT_CODE", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "UK_NATIONAL_INSURANCE_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "URL", "USERNAME", "US_BANK_ACCOUNT_NUMBER", "US_BANK_ROUTING_NUMBER", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "US_PASSPORT_NUMBER", "US_SOCIAL_SECURITY_NUMBER", "VEHICLE_IDENTIFICATION_NUMBER"
1428
- # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1785
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1786
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.pii_entities[0].detected #=> Boolean
1429
1787
  # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes #=> Array
1430
1788
  # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].name #=> String
1431
1789
  # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].match #=> String
1432
1790
  # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].regex #=> String
1433
- # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED"
1791
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].action #=> String, one of "ANONYMIZED", "BLOCKED", "NONE"
1792
+ # event.trace.guardrail.output_assessments["String"][0].sensitive_information_policy.regexes[0].detected #=> Boolean
1434
1793
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters #=> Array
1435
1794
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].type #=> String, one of "GROUNDING", "RELEVANCE"
1436
1795
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].threshold #=> Float
1437
1796
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].score #=> Float
1438
1797
  # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].action #=> String, one of "BLOCKED", "NONE"
1798
+ # event.trace.guardrail.output_assessments["String"][0].contextual_grounding_policy.filters[0].detected #=> Boolean
1439
1799
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_processing_latency #=> Integer
1440
1800
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.topic_policy_units #=> Integer
1441
1801
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.content_policy_units #=> Integer
@@ -1443,8 +1803,14 @@ module Aws::BedrockRuntime
1443
1803
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_units #=> Integer
1444
1804
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.sensitive_information_policy_free_units #=> Integer
1445
1805
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
1806
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.content_policy_image_units #=> Integer
1446
1807
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
1447
1808
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
1809
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.guarded #=> Integer
1810
+ # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.images.total #=> Integer
1811
+ # event.trace.guardrail.action_reason #=> String
1812
+ # event.trace.prompt_router.invoked_model_id #=> String
1813
+ # event.performance_config.latency #=> String, one of "standard", "optimized"
1448
1814
  #
1449
1815
  # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
1450
1816
  # event.message #=> String
@@ -1490,6 +1856,52 @@ module Aws::BedrockRuntime
1490
1856
  req.send_request(options, &block)
1491
1857
  end
1492
1858
 
1859
+ # Retrieve information about an asynchronous invocation.
1860
+ #
1861
+ # @option params [required, String] :invocation_arn
1862
+ # The invocation's ARN.
1863
+ #
1864
+ # @return [Types::GetAsyncInvokeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1865
+ #
1866
+ # * {Types::GetAsyncInvokeResponse#invocation_arn #invocation_arn} => String
1867
+ # * {Types::GetAsyncInvokeResponse#model_arn #model_arn} => String
1868
+ # * {Types::GetAsyncInvokeResponse#client_request_token #client_request_token} => String
1869
+ # * {Types::GetAsyncInvokeResponse#status #status} => String
1870
+ # * {Types::GetAsyncInvokeResponse#failure_message #failure_message} => String
1871
+ # * {Types::GetAsyncInvokeResponse#submit_time #submit_time} => Time
1872
+ # * {Types::GetAsyncInvokeResponse#last_modified_time #last_modified_time} => Time
1873
+ # * {Types::GetAsyncInvokeResponse#end_time #end_time} => Time
1874
+ # * {Types::GetAsyncInvokeResponse#output_data_config #output_data_config} => Types::AsyncInvokeOutputDataConfig
1875
+ #
1876
+ # @example Request syntax with placeholder values
1877
+ #
1878
+ # resp = client.get_async_invoke({
1879
+ # invocation_arn: "InvocationArn", # required
1880
+ # })
1881
+ #
1882
+ # @example Response structure
1883
+ #
1884
+ # resp.invocation_arn #=> String
1885
+ # resp.model_arn #=> String
1886
+ # resp.client_request_token #=> String
1887
+ # resp.status #=> String, one of "InProgress", "Completed", "Failed"
1888
+ # resp.failure_message #=> String
1889
+ # resp.submit_time #=> Time
1890
+ # resp.last_modified_time #=> Time
1891
+ # resp.end_time #=> Time
1892
+ # resp.output_data_config.s3_output_data_config.s3_uri #=> String
1893
+ # resp.output_data_config.s3_output_data_config.kms_key_id #=> String
1894
+ # resp.output_data_config.s3_output_data_config.bucket_owner #=> String
1895
+ #
1896
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/GetAsyncInvoke AWS API Documentation
1897
+ #
1898
+ # @overload get_async_invoke(params = {})
1899
+ # @param [Hash] params ({})
1900
+ def get_async_invoke(params = {}, options = {})
1901
+ req = build_request(:get_async_invoke, params)
1902
+ req.send_request(options)
1903
+ end
1904
+
1493
1905
  # Invokes the specified Amazon Bedrock model to run inference using the
1494
1906
  # prompt and inference parameters provided in the request body. You use
1495
1907
  # model inference to generate text, images, and embeddings.
@@ -1500,7 +1912,25 @@ module Aws::BedrockRuntime
1500
1912
  # This operation requires permission for the `bedrock:InvokeModel`
1501
1913
  # action.
1502
1914
  #
1503
- # @option params [required, String, StringIO, File] :body
1915
+ # To deny all inference access to resources that you specify in the
1916
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
1917
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
1918
+ # denies access to the resource through the Converse API actions
1919
+ # ([Converse][1] and [ConverseStream][2]). For more information see
1920
+ # [Deny access for inference on specific models][3].
1921
+ #
1922
+ # For troubleshooting some of the common errors you might encounter when
1923
+ # using the `InvokeModel` API, see [Troubleshooting Amazon Bedrock API
1924
+ # Error Codes][4] in the Amazon Bedrock User Guide
1925
+ #
1926
+ #
1927
+ #
1928
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
1929
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
1930
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
1931
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
1932
+ #
1933
+ # @option params [String, StringIO, File] :body
1504
1934
  # The prompt and inference parameters in the format specified in the
1505
1935
  # `contentType` in the header. You must provide the body in JSON format.
1506
1936
  # To see the format and content of the request and response bodies for
@@ -1523,33 +1953,40 @@ module Aws::BedrockRuntime
1523
1953
  # @option params [required, String] :model_id
1524
1954
  # The unique identifier of the model to invoke to run inference.
1525
1955
  #
1526
- # The `modelId` to provide depends on the type of model that you use:
1956
+ # The `modelId` to provide depends on the type of model or throughput
1957
+ # that you use:
1527
1958
  #
1528
1959
  # * If you use a base model, specify the model ID or its ARN. For a list
1529
1960
  # of model IDs for base models, see [Amazon Bedrock base model IDs
1530
1961
  # (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1531
1962
  #
1963
+ # * If you use an inference profile, specify the inference profile ID or
1964
+ # its ARN. For a list of inference profile IDs, see [Supported Regions
1965
+ # and models for cross-region inference][2] in the Amazon Bedrock User
1966
+ # Guide.
1967
+ #
1532
1968
  # * If you use a provisioned model, specify the ARN of the Provisioned
1533
1969
  # Throughput. For more information, see [Run inference using a
1534
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
1970
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1535
1971
  #
1536
1972
  # * If you use a custom model, first purchase Provisioned Throughput for
1537
1973
  # it. Then specify the ARN of the resulting provisioned model. For
1538
- # more information, see [Use a custom model in Amazon Bedrock][3] in
1974
+ # more information, see [Use a custom model in Amazon Bedrock][4] in
1539
1975
  # the Amazon Bedrock User Guide.
1540
1976
  #
1541
- # * If you use an [imported model][4], specify the ARN of the imported
1977
+ # * If you use an [imported model][5], specify the ARN of the imported
1542
1978
  # model. You can get the model ARN from a successful call to
1543
- # [CreateModelImportJob][5] or from the Imported models page in the
1979
+ # [CreateModelImportJob][6] or from the Imported models page in the
1544
1980
  # Amazon Bedrock console.
1545
1981
  #
1546
1982
  #
1547
1983
  #
1548
1984
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1549
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1550
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1551
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1552
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1985
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
1986
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1987
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1988
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1989
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1553
1990
  #
1554
1991
  # @option params [String] :trace
1555
1992
  # Specifies whether to enable or disable the Bedrock trace. If enabled,
@@ -1573,27 +2010,33 @@ module Aws::BedrockRuntime
1573
2010
  # @option params [String] :guardrail_version
1574
2011
  # The version number for the guardrail. The value can also be `DRAFT`.
1575
2012
  #
2013
+ # @option params [String] :performance_config_latency
2014
+ # Model performance settings for the request.
2015
+ #
1576
2016
  # @return [Types::InvokeModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1577
2017
  #
1578
2018
  # * {Types::InvokeModelResponse#body #body} => String
1579
2019
  # * {Types::InvokeModelResponse#content_type #content_type} => String
2020
+ # * {Types::InvokeModelResponse#performance_config_latency #performance_config_latency} => String
1580
2021
  #
1581
2022
  # @example Request syntax with placeholder values
1582
2023
  #
1583
2024
  # resp = client.invoke_model({
1584
- # body: "data", # required
2025
+ # body: "data",
1585
2026
  # content_type: "MimeType",
1586
2027
  # accept: "MimeType",
1587
2028
  # model_id: "InvokeModelIdentifier", # required
1588
- # trace: "ENABLED", # accepts ENABLED, DISABLED
2029
+ # trace: "ENABLED", # accepts ENABLED, DISABLED, ENABLED_FULL
1589
2030
  # guardrail_identifier: "GuardrailIdentifier",
1590
2031
  # guardrail_version: "GuardrailVersion",
2032
+ # performance_config_latency: "standard", # accepts standard, optimized
1591
2033
  # })
1592
2034
  #
1593
2035
  # @example Response structure
1594
2036
  #
1595
2037
  # resp.body #=> String
1596
2038
  # resp.content_type #=> String
2039
+ # resp.performance_config_latency #=> String, one of "standard", "optimized"
1597
2040
  #
1598
2041
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModel AWS API Documentation
1599
2042
  #
@@ -1622,11 +2065,26 @@ module Aws::BedrockRuntime
1622
2065
  # This operation requires permissions to perform the
1623
2066
  # `bedrock:InvokeModelWithResponseStream` action.
1624
2067
  #
2068
+ # To deny all inference access to resources that you specify in the
2069
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
2070
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
2071
+ # denies access to the resource through the Converse API actions
2072
+ # ([Converse][2] and [ConverseStream][3]). For more information see
2073
+ # [Deny access for inference on specific models][4].
2074
+ #
2075
+ # For troubleshooting some of the common errors you might encounter when
2076
+ # using the `InvokeModelWithResponseStream` API, see [Troubleshooting
2077
+ # Amazon Bedrock API Error Codes][5] in the Amazon Bedrock User Guide
2078
+ #
1625
2079
  #
1626
2080
  #
1627
2081
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html
2082
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
2083
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
2084
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
2085
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
1628
2086
  #
1629
- # @option params [required, String, StringIO, File] :body
2087
+ # @option params [String, StringIO, File] :body
1630
2088
  # The prompt and inference parameters in the format specified in the
1631
2089
  # `contentType` in the header. You must provide the body in JSON format.
1632
2090
  # To see the format and content of the request and response bodies for
@@ -1649,33 +2107,40 @@ module Aws::BedrockRuntime
1649
2107
  # @option params [required, String] :model_id
1650
2108
  # The unique identifier of the model to invoke to run inference.
1651
2109
  #
1652
- # The `modelId` to provide depends on the type of model that you use:
2110
+ # The `modelId` to provide depends on the type of model or throughput
2111
+ # that you use:
1653
2112
  #
1654
2113
  # * If you use a base model, specify the model ID or its ARN. For a list
1655
2114
  # of model IDs for base models, see [Amazon Bedrock base model IDs
1656
2115
  # (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1657
2116
  #
2117
+ # * If you use an inference profile, specify the inference profile ID or
2118
+ # its ARN. For a list of inference profile IDs, see [Supported Regions
2119
+ # and models for cross-region inference][2] in the Amazon Bedrock User
2120
+ # Guide.
2121
+ #
1658
2122
  # * If you use a provisioned model, specify the ARN of the Provisioned
1659
2123
  # Throughput. For more information, see [Run inference using a
1660
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
2124
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1661
2125
  #
1662
2126
  # * If you use a custom model, first purchase Provisioned Throughput for
1663
2127
  # it. Then specify the ARN of the resulting provisioned model. For
1664
- # more information, see [Use a custom model in Amazon Bedrock][3] in
2128
+ # more information, see [Use a custom model in Amazon Bedrock][4] in
1665
2129
  # the Amazon Bedrock User Guide.
1666
2130
  #
1667
- # * If you use an [imported model][4], specify the ARN of the imported
2131
+ # * If you use an [imported model][5], specify the ARN of the imported
1668
2132
  # model. You can get the model ARN from a successful call to
1669
- # [CreateModelImportJob][5] or from the Imported models page in the
2133
+ # [CreateModelImportJob][6] or from the Imported models page in the
1670
2134
  # Amazon Bedrock console.
1671
2135
  #
1672
2136
  #
1673
2137
  #
1674
2138
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1675
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1676
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1677
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1678
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
2139
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
2140
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
2141
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
2142
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
2143
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1679
2144
  #
1680
2145
  # @option params [String] :trace
1681
2146
  # Specifies whether to enable or disable the Bedrock trace. If enabled,
@@ -1699,10 +2164,14 @@ module Aws::BedrockRuntime
1699
2164
  # @option params [String] :guardrail_version
1700
2165
  # The version number for the guardrail. The value can also be `DRAFT`.
1701
2166
  #
2167
+ # @option params [String] :performance_config_latency
2168
+ # Model performance settings for the request.
2169
+ #
1702
2170
  # @return [Types::InvokeModelWithResponseStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1703
2171
  #
1704
2172
  # * {Types::InvokeModelWithResponseStreamResponse#body #body} => Types::ResponseStream
1705
2173
  # * {Types::InvokeModelWithResponseStreamResponse#content_type #content_type} => String
2174
+ # * {Types::InvokeModelWithResponseStreamResponse#performance_config_latency #performance_config_latency} => String
1706
2175
  #
1707
2176
  # @example EventStream Operation Example
1708
2177
  #
@@ -1844,13 +2313,14 @@ module Aws::BedrockRuntime
1844
2313
  # @example Request syntax with placeholder values
1845
2314
  #
1846
2315
  # resp = client.invoke_model_with_response_stream({
1847
- # body: "data", # required
2316
+ # body: "data",
1848
2317
  # content_type: "MimeType",
1849
2318
  # accept: "MimeType",
1850
2319
  # model_id: "InvokeModelIdentifier", # required
1851
- # trace: "ENABLED", # accepts ENABLED, DISABLED
2320
+ # trace: "ENABLED", # accepts ENABLED, DISABLED, ENABLED_FULL
1852
2321
  # guardrail_identifier: "GuardrailIdentifier",
1853
2322
  # guardrail_version: "GuardrailVersion",
2323
+ # performance_config_latency: "standard", # accepts standard, optimized
1854
2324
  # })
1855
2325
  #
1856
2326
  # @example Response structure
@@ -1883,6 +2353,7 @@ module Aws::BedrockRuntime
1883
2353
  # event.message #=> String
1884
2354
  #
1885
2355
  # resp.content_type #=> String
2356
+ # resp.performance_config_latency #=> String, one of "standard", "optimized"
1886
2357
  #
1887
2358
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStream AWS API Documentation
1888
2359
  #
@@ -1911,6 +2382,154 @@ module Aws::BedrockRuntime
1911
2382
  req.send_request(options, &block)
1912
2383
  end
1913
2384
 
2385
+ # Lists asynchronous invocations.
2386
+ #
2387
+ # @option params [Time,DateTime,Date,Integer,String] :submit_time_after
2388
+ # Include invocations submitted after this time.
2389
+ #
2390
+ # @option params [Time,DateTime,Date,Integer,String] :submit_time_before
2391
+ # Include invocations submitted before this time.
2392
+ #
2393
+ # @option params [String] :status_equals
2394
+ # Filter invocations by status.
2395
+ #
2396
+ # @option params [Integer] :max_results
2397
+ # The maximum number of invocations to return in one page of results.
2398
+ #
2399
+ # @option params [String] :next_token
2400
+ # Specify the pagination token from a previous request to retrieve the
2401
+ # next page of results.
2402
+ #
2403
+ # @option params [String] :sort_by
2404
+ # How to sort the response.
2405
+ #
2406
+ # @option params [String] :sort_order
2407
+ # The sorting order for the response.
2408
+ #
2409
+ # @return [Types::ListAsyncInvokesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2410
+ #
2411
+ # * {Types::ListAsyncInvokesResponse#next_token #next_token} => String
2412
+ # * {Types::ListAsyncInvokesResponse#async_invoke_summaries #async_invoke_summaries} => Array&lt;Types::AsyncInvokeSummary&gt;
2413
+ #
2414
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
2415
+ #
2416
+ # @example Request syntax with placeholder values
2417
+ #
2418
+ # resp = client.list_async_invokes({
2419
+ # submit_time_after: Time.now,
2420
+ # submit_time_before: Time.now,
2421
+ # status_equals: "InProgress", # accepts InProgress, Completed, Failed
2422
+ # max_results: 1,
2423
+ # next_token: "PaginationToken",
2424
+ # sort_by: "SubmissionTime", # accepts SubmissionTime
2425
+ # sort_order: "Ascending", # accepts Ascending, Descending
2426
+ # })
2427
+ #
2428
+ # @example Response structure
2429
+ #
2430
+ # resp.next_token #=> String
2431
+ # resp.async_invoke_summaries #=> Array
2432
+ # resp.async_invoke_summaries[0].invocation_arn #=> String
2433
+ # resp.async_invoke_summaries[0].model_arn #=> String
2434
+ # resp.async_invoke_summaries[0].client_request_token #=> String
2435
+ # resp.async_invoke_summaries[0].status #=> String, one of "InProgress", "Completed", "Failed"
2436
+ # resp.async_invoke_summaries[0].failure_message #=> String
2437
+ # resp.async_invoke_summaries[0].submit_time #=> Time
2438
+ # resp.async_invoke_summaries[0].last_modified_time #=> Time
2439
+ # resp.async_invoke_summaries[0].end_time #=> Time
2440
+ # resp.async_invoke_summaries[0].output_data_config.s3_output_data_config.s3_uri #=> String
2441
+ # resp.async_invoke_summaries[0].output_data_config.s3_output_data_config.kms_key_id #=> String
2442
+ # resp.async_invoke_summaries[0].output_data_config.s3_output_data_config.bucket_owner #=> String
2443
+ #
2444
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ListAsyncInvokes AWS API Documentation
2445
+ #
2446
+ # @overload list_async_invokes(params = {})
2447
+ # @param [Hash] params ({})
2448
+ def list_async_invokes(params = {}, options = {})
2449
+ req = build_request(:list_async_invokes, params)
2450
+ req.send_request(options)
2451
+ end
2452
+
2453
+ # Starts an asynchronous invocation.
2454
+ #
2455
+ # This operation requires permission for the `bedrock:InvokeModel`
2456
+ # action.
2457
+ #
2458
+ # To deny all inference access to resources that you specify in the
2459
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
2460
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
2461
+ # denies access to the resource through the Converse API actions
2462
+ # ([Converse][1] and [ConverseStream][2]). For more information see
2463
+ # [Deny access for inference on specific models][3].
2464
+ #
2465
+ #
2466
+ #
2467
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
2468
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
2469
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
2470
+ #
2471
+ # @option params [String] :client_request_token
2472
+ # Specify idempotency token to ensure that requests are not duplicated.
2473
+ #
2474
+ # **A suitable default value is auto-generated.** You should normally
2475
+ # not need to pass this option.**
2476
+ #
2477
+ # @option params [required, String] :model_id
2478
+ # The model to invoke.
2479
+ #
2480
+ # @option params [required, Hash,Array,String,Numeric,Boolean] :model_input
2481
+ # Input to send to the model.
2482
+ #
2483
+ # Document type used to carry open content
2484
+ # (Hash,Array,String,Numeric,Boolean). A document type value is
2485
+ # serialized using the same format as its surroundings and requires no
2486
+ # additional encoding or escaping.
2487
+ #
2488
+ # @option params [required, Types::AsyncInvokeOutputDataConfig] :output_data_config
2489
+ # Where to store the output.
2490
+ #
2491
+ # @option params [Array<Types::Tag>] :tags
2492
+ # Tags to apply to the invocation.
2493
+ #
2494
+ # @return [Types::StartAsyncInvokeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2495
+ #
2496
+ # * {Types::StartAsyncInvokeResponse#invocation_arn #invocation_arn} => String
2497
+ #
2498
+ # @example Request syntax with placeholder values
2499
+ #
2500
+ # resp = client.start_async_invoke({
2501
+ # client_request_token: "AsyncInvokeIdempotencyToken",
2502
+ # model_id: "AsyncInvokeIdentifier", # required
2503
+ # model_input: { # required
2504
+ # },
2505
+ # output_data_config: { # required
2506
+ # s3_output_data_config: {
2507
+ # s3_uri: "S3Uri", # required
2508
+ # kms_key_id: "KmsKeyId",
2509
+ # bucket_owner: "AccountId",
2510
+ # },
2511
+ # },
2512
+ # tags: [
2513
+ # {
2514
+ # key: "TagKey", # required
2515
+ # value: "TagValue", # required
2516
+ # },
2517
+ # ],
2518
+ # })
2519
+ #
2520
+ # @example Response structure
2521
+ #
2522
+ # resp.invocation_arn #=> String
2523
+ #
2524
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/StartAsyncInvoke AWS API Documentation
2525
+ #
2526
+ # @overload start_async_invoke(params = {})
2527
+ # @param [Hash] params ({})
2528
+ def start_async_invoke(params = {}, options = {})
2529
+ req = build_request(:start_async_invoke, params)
2530
+ req.send_request(options)
2531
+ end
2532
+
1914
2533
  # @!endgroup
1915
2534
 
1916
2535
  # @param params ({})
@@ -1929,7 +2548,7 @@ module Aws::BedrockRuntime
1929
2548
  tracer: tracer
1930
2549
  )
1931
2550
  context[:gem_name] = 'aws-sdk-bedrockruntime'
1932
- context[:gem_version] = '1.28.0'
2551
+ context[:gem_version] = '1.44.0'
1933
2552
  Seahorse::Client::Request.new(handlers, context)
1934
2553
  end
1935
2554