aws-sdk-bedrockruntime 1.31.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f743e35a23c1b5da7f2f760eef26a9db4f6b4eb24e9487f0196138617e57c837
4
- data.tar.gz: 1c5b8ca501e869cc08952699f11747f48e20f2f1164c3f106514d708773c59ef
3
+ metadata.gz: b26f5d1abe35e559cf26bc3eeb31512409ec4ad73cc9a4e01d6bd85668b33092
4
+ data.tar.gz: e13c50f60cf7102b445fd0e94e513480708acd7d2e2a3cdd3a53829c70d5e2aa
5
5
  SHA512:
6
- metadata.gz: d78201650cc1ce6ac6c105b019fb07c966732c56329f34513e128af99fd12e27b4f0a29f0fb5c4e2d1ddc35314288f1376d4645de865d440bfaf2541bbb525ed
7
- data.tar.gz: 4d330688343a70c240dd6729cf2ac635676e42fb85c0ad63dee52934d4ca3833fea6eedb090c7d60a992b470b1b14ea6c3f03f1973813bb6ec8131aed6e9d652
6
+ metadata.gz: 37f564b9a312df24f7a1205bececc5d1c21530071862e53c5baedb3b432fec29c9b009f713b6f061faf9037d350886eedf0e2fbbbcc33e3dd103f25dbe620b2c
7
+ data.tar.gz: dbd487a061090ab606b46ccee6bb4a47469273692f89aafc31609271122b1768c78dee0d8e351b62339cdb58a9d3fb53b229cba8cdc3702aa105925c75238499
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.32.0 (2024-12-03)
5
+ ------------------
6
+
7
+ * Feature - Add an API parameter that allows customers to set performance configuration for invoking a model.
8
+
4
9
  1.31.0 (2024-11-07)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.31.0
1
+ 1.32.0
@@ -595,9 +595,24 @@ module Aws::BedrockRuntime
595
595
  # This operation requires permission for the `bedrock:InvokeModel`
596
596
  # action.
597
597
  #
598
+ # To deny all inference access to resources that you specify in the
599
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
600
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
601
+ # denies access to the resource through the base inference actions
602
+ # ([InvokeModel][2] and [InvokeModelWithResponseStream][3]). For more
603
+ # information see [Deny access for inference on specific models][4].
604
+ #
605
+ # For troubleshooting some of the common errors you might encounter when
606
+ # using the `Converse` API, see [Troubleshooting Amazon Bedrock API
607
+ # Error Codes][5] in the Amazon Bedrock User Guide
608
+ #
598
609
  #
599
610
  #
600
611
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html
612
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
613
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html
614
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
615
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
601
616
  #
602
617
  # @option params [required, String] :model_id
603
618
  # Specifies the model or throughput with which to run inference, or the
@@ -622,10 +637,10 @@ module Aws::BedrockRuntime
622
637
  # more information, see [Use a custom model in Amazon Bedrock][4] in
623
638
  # the Amazon Bedrock User Guide.
624
639
  #
625
- # * To include a prompt that was defined in Prompt management, specify
626
- # the ARN of the prompt version to use.
640
+ # * To include a prompt that was defined in [Prompt management][5],
641
+ # specify the ARN of the prompt version to use.
627
642
  #
628
- # The Converse API doesn't support [imported models][5].
643
+ # The Converse API doesn't support [imported models][6].
629
644
  #
630
645
  #
631
646
  #
@@ -633,7 +648,8 @@ module Aws::BedrockRuntime
633
648
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
634
649
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
635
650
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
636
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
651
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
652
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
637
653
  #
638
654
  # @option params [Array<Types::Message>] :messages
639
655
  # The messages that you want to send to the model.
@@ -707,6 +723,9 @@ module Aws::BedrockRuntime
707
723
  #
708
724
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
709
725
  #
726
+ # @option params [Types::PerformanceConfiguration] :performance_config
727
+ # Model performance settings for the request.
728
+ #
710
729
  # @return [Types::ConverseResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
711
730
  #
712
731
  # * {Types::ConverseResponse#output #output} => Types::ConverseOutput
@@ -715,6 +734,7 @@ module Aws::BedrockRuntime
715
734
  # * {Types::ConverseResponse#metrics #metrics} => Types::ConverseMetrics
716
735
  # * {Types::ConverseResponse#additional_model_response_fields #additional_model_response_fields} => Hash,Array,String,Numeric,Boolean
717
736
  # * {Types::ConverseResponse#trace #trace} => Types::ConverseTrace
737
+ # * {Types::ConverseResponse#performance_config #performance_config} => Types::PerformanceConfiguration
718
738
  #
719
739
  # @example Request syntax with placeholder values
720
740
  #
@@ -832,6 +852,9 @@ module Aws::BedrockRuntime
832
852
  # },
833
853
  # },
834
854
  # additional_model_response_field_paths: ["ConverseRequestAdditionalModelResponseFieldPathsListMemberString"],
855
+ # performance_config: {
856
+ # latency: "standard", # accepts standard, optimized
857
+ # },
835
858
  # })
836
859
  #
837
860
  # @example Response structure
@@ -946,6 +969,7 @@ module Aws::BedrockRuntime
946
969
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
947
970
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
948
971
  # resp.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
972
+ # resp.performance_config.latency #=> String, one of "standard", "optimized"
949
973
  #
950
974
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/Converse AWS API Documentation
951
975
  #
@@ -1002,10 +1026,25 @@ module Aws::BedrockRuntime
1002
1026
  # This operation requires permission for the
1003
1027
  # `bedrock:InvokeModelWithResponseStream` action.
1004
1028
  #
1029
+ # To deny all inference access to resources that you specify in the
1030
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
1031
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
1032
+ # denies access to the resource through the base inference actions
1033
+ # ([InvokeModel][3] and [InvokeModelWithResponseStream][4]). For more
1034
+ # information see [Deny access for inference on specific models][5].
1035
+ #
1036
+ # For troubleshooting some of the common errors you might encounter when
1037
+ # using the `ConverseStream` API, see [Troubleshooting Amazon Bedrock
1038
+ # API Error Codes][6] in the Amazon Bedrock User Guide
1039
+ #
1005
1040
  #
1006
1041
  #
1007
1042
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html
1008
1043
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html
1044
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html
1045
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html
1046
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
1047
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
1009
1048
  #
1010
1049
  # @option params [required, String] :model_id
1011
1050
  # Specifies the model or throughput with which to run inference, or the
@@ -1030,10 +1069,10 @@ module Aws::BedrockRuntime
1030
1069
  # more information, see [Use a custom model in Amazon Bedrock][4] in
1031
1070
  # the Amazon Bedrock User Guide.
1032
1071
  #
1033
- # * To include a prompt that was defined in Prompt management, specify
1034
- # the ARN of the prompt version to use.
1072
+ # * To include a prompt that was defined in [Prompt management][5],
1073
+ # specify the ARN of the prompt version to use.
1035
1074
  #
1036
- # The Converse API doesn't support [imported models][5].
1075
+ # The Converse API doesn't support [imported models][6].
1037
1076
  #
1038
1077
  #
1039
1078
  #
@@ -1041,7 +1080,8 @@ module Aws::BedrockRuntime
1041
1080
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
1042
1081
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1043
1082
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1044
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1083
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
1084
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1045
1085
  #
1046
1086
  # @option params [Array<Types::Message>] :messages
1047
1087
  # The messages that you want to send to the model.
@@ -1114,6 +1154,9 @@ module Aws::BedrockRuntime
1114
1154
  #
1115
1155
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
1116
1156
  #
1157
+ # @option params [Types::PerformanceConfiguration] :performance_config
1158
+ # Model performance settings for the request.
1159
+ #
1117
1160
  # @return [Types::ConverseStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1118
1161
  #
1119
1162
  # * {Types::ConverseStreamResponse#stream #stream} => Types::ConverseStreamOutput
@@ -1408,6 +1451,9 @@ module Aws::BedrockRuntime
1408
1451
  # },
1409
1452
  # },
1410
1453
  # additional_model_response_field_paths: ["ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString"],
1454
+ # performance_config: {
1455
+ # latency: "standard", # accepts standard, optimized
1456
+ # },
1411
1457
  # })
1412
1458
  #
1413
1459
  # @example Response structure
@@ -1523,6 +1569,7 @@ module Aws::BedrockRuntime
1523
1569
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.usage.contextual_grounding_policy_units #=> Integer
1524
1570
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.guarded #=> Integer
1525
1571
  # event.trace.guardrail.output_assessments["String"][0].invocation_metrics.guardrail_coverage.text_characters.total #=> Integer
1572
+ # event.performance_config.latency #=> String, one of "standard", "optimized"
1526
1573
  #
1527
1574
  # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
1528
1575
  # event.message #=> String
@@ -1578,6 +1625,24 @@ module Aws::BedrockRuntime
1578
1625
  # This operation requires permission for the `bedrock:InvokeModel`
1579
1626
  # action.
1580
1627
  #
1628
+ # To deny all inference access to resources that you specify in the
1629
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
1630
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
1631
+ # denies access to the resource through the Converse API actions
1632
+ # ([Converse][1] and [ConverseStream][2]). For more information see
1633
+ # [Deny access for inference on specific models][3].
1634
+ #
1635
+ # For troubleshooting some of the common errors you might encounter when
1636
+ # using the `InvokeModel` API, see [Troubleshooting Amazon Bedrock API
1637
+ # Error Codes][4] in the Amazon Bedrock User Guide
1638
+ #
1639
+ #
1640
+ #
1641
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
1642
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
1643
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
1644
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
1645
+ #
1581
1646
  # @option params [String, StringIO, File] :body
1582
1647
  # The prompt and inference parameters in the format specified in the
1583
1648
  # `contentType` in the header. You must provide the body in JSON format.
@@ -1601,33 +1666,40 @@ module Aws::BedrockRuntime
1601
1666
  # @option params [required, String] :model_id
1602
1667
  # The unique identifier of the model to invoke to run inference.
1603
1668
  #
1604
- # The `modelId` to provide depends on the type of model that you use:
1669
+ # The `modelId` to provide depends on the type of model or throughput
1670
+ # that you use:
1605
1671
  #
1606
1672
  # * If you use a base model, specify the model ID or its ARN. For a list
1607
1673
  # of model IDs for base models, see [Amazon Bedrock base model IDs
1608
1674
  # (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1609
1675
  #
1676
+ # * If you use an inference profile, specify the inference profile ID or
1677
+ # its ARN. For a list of inference profile IDs, see [Supported Regions
1678
+ # and models for cross-region inference][2] in the Amazon Bedrock User
1679
+ # Guide.
1680
+ #
1610
1681
  # * If you use a provisioned model, specify the ARN of the Provisioned
1611
1682
  # Throughput. For more information, see [Run inference using a
1612
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
1683
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1613
1684
  #
1614
1685
  # * If you use a custom model, first purchase Provisioned Throughput for
1615
1686
  # it. Then specify the ARN of the resulting provisioned model. For
1616
- # more information, see [Use a custom model in Amazon Bedrock][3] in
1687
+ # more information, see [Use a custom model in Amazon Bedrock][4] in
1617
1688
  # the Amazon Bedrock User Guide.
1618
1689
  #
1619
- # * If you use an [imported model][4], specify the ARN of the imported
1690
+ # * If you use an [imported model][5], specify the ARN of the imported
1620
1691
  # model. You can get the model ARN from a successful call to
1621
- # [CreateModelImportJob][5] or from the Imported models page in the
1692
+ # [CreateModelImportJob][6] or from the Imported models page in the
1622
1693
  # Amazon Bedrock console.
1623
1694
  #
1624
1695
  #
1625
1696
  #
1626
1697
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1627
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1628
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1629
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1630
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1698
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
1699
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1700
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1701
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1702
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1631
1703
  #
1632
1704
  # @option params [String] :trace
1633
1705
  # Specifies whether to enable or disable the Bedrock trace. If enabled,
@@ -1651,10 +1723,14 @@ module Aws::BedrockRuntime
1651
1723
  # @option params [String] :guardrail_version
1652
1724
  # The version number for the guardrail. The value can also be `DRAFT`.
1653
1725
  #
1726
+ # @option params [String] :performance_config_latency
1727
+ # Model performance settings for the request.
1728
+ #
1654
1729
  # @return [Types::InvokeModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1655
1730
  #
1656
1731
  # * {Types::InvokeModelResponse#body #body} => String
1657
1732
  # * {Types::InvokeModelResponse#content_type #content_type} => String
1733
+ # * {Types::InvokeModelResponse#performance_config_latency #performance_config_latency} => String
1658
1734
  #
1659
1735
  # @example Request syntax with placeholder values
1660
1736
  #
@@ -1666,12 +1742,14 @@ module Aws::BedrockRuntime
1666
1742
  # trace: "ENABLED", # accepts ENABLED, DISABLED
1667
1743
  # guardrail_identifier: "GuardrailIdentifier",
1668
1744
  # guardrail_version: "GuardrailVersion",
1745
+ # performance_config_latency: "standard", # accepts standard, optimized
1669
1746
  # })
1670
1747
  #
1671
1748
  # @example Response structure
1672
1749
  #
1673
1750
  # resp.body #=> String
1674
1751
  # resp.content_type #=> String
1752
+ # resp.performance_config_latency #=> String, one of "standard", "optimized"
1675
1753
  #
1676
1754
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModel AWS API Documentation
1677
1755
  #
@@ -1700,9 +1778,24 @@ module Aws::BedrockRuntime
1700
1778
  # This operation requires permissions to perform the
1701
1779
  # `bedrock:InvokeModelWithResponseStream` action.
1702
1780
  #
1781
+ # To deny all inference access to resources that you specify in the
1782
+ # modelId field, you need to deny access to the `bedrock:InvokeModel`
1783
+ # and `bedrock:InvokeModelWithResponseStream` actions. Doing this also
1784
+ # denies access to the resource through the Converse API actions
1785
+ # ([Converse][2] and [ConverseStream][3]). For more information see
1786
+ # [Deny access for inference on specific models][4].
1787
+ #
1788
+ # For troubleshooting some of the common errors you might encounter when
1789
+ # using the `InvokeModelWithResponseStream` API, see [Troubleshooting
1790
+ # Amazon Bedrock API Error Codes][5] in the Amazon Bedrock User Guide
1791
+ #
1703
1792
  #
1704
1793
  #
1705
1794
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html
1795
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
1796
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
1797
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference
1798
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html
1706
1799
  #
1707
1800
  # @option params [String, StringIO, File] :body
1708
1801
  # The prompt and inference parameters in the format specified in the
@@ -1727,33 +1820,40 @@ module Aws::BedrockRuntime
1727
1820
  # @option params [required, String] :model_id
1728
1821
  # The unique identifier of the model to invoke to run inference.
1729
1822
  #
1730
- # The `modelId` to provide depends on the type of model that you use:
1823
+ # The `modelId` to provide depends on the type of model or throughput
1824
+ # that you use:
1731
1825
  #
1732
1826
  # * If you use a base model, specify the model ID or its ARN. For a list
1733
1827
  # of model IDs for base models, see [Amazon Bedrock base model IDs
1734
1828
  # (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1735
1829
  #
1830
+ # * If you use an inference profile, specify the inference profile ID or
1831
+ # its ARN. For a list of inference profile IDs, see [Supported Regions
1832
+ # and models for cross-region inference][2] in the Amazon Bedrock User
1833
+ # Guide.
1834
+ #
1736
1835
  # * If you use a provisioned model, specify the ARN of the Provisioned
1737
1836
  # Throughput. For more information, see [Run inference using a
1738
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
1837
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1739
1838
  #
1740
1839
  # * If you use a custom model, first purchase Provisioned Throughput for
1741
1840
  # it. Then specify the ARN of the resulting provisioned model. For
1742
- # more information, see [Use a custom model in Amazon Bedrock][3] in
1841
+ # more information, see [Use a custom model in Amazon Bedrock][4] in
1743
1842
  # the Amazon Bedrock User Guide.
1744
1843
  #
1745
- # * If you use an [imported model][4], specify the ARN of the imported
1844
+ # * If you use an [imported model][5], specify the ARN of the imported
1746
1845
  # model. You can get the model ARN from a successful call to
1747
- # [CreateModelImportJob][5] or from the Imported models page in the
1846
+ # [CreateModelImportJob][6] or from the Imported models page in the
1748
1847
  # Amazon Bedrock console.
1749
1848
  #
1750
1849
  #
1751
1850
  #
1752
1851
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1753
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1754
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1755
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1756
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1852
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
1853
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1854
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1855
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1856
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1757
1857
  #
1758
1858
  # @option params [String] :trace
1759
1859
  # Specifies whether to enable or disable the Bedrock trace. If enabled,
@@ -1777,10 +1877,14 @@ module Aws::BedrockRuntime
1777
1877
  # @option params [String] :guardrail_version
1778
1878
  # The version number for the guardrail. The value can also be `DRAFT`.
1779
1879
  #
1880
+ # @option params [String] :performance_config_latency
1881
+ # Model performance settings for the request.
1882
+ #
1780
1883
  # @return [Types::InvokeModelWithResponseStreamResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1781
1884
  #
1782
1885
  # * {Types::InvokeModelWithResponseStreamResponse#body #body} => Types::ResponseStream
1783
1886
  # * {Types::InvokeModelWithResponseStreamResponse#content_type #content_type} => String
1887
+ # * {Types::InvokeModelWithResponseStreamResponse#performance_config_latency #performance_config_latency} => String
1784
1888
  #
1785
1889
  # @example EventStream Operation Example
1786
1890
  #
@@ -1929,6 +2033,7 @@ module Aws::BedrockRuntime
1929
2033
  # trace: "ENABLED", # accepts ENABLED, DISABLED
1930
2034
  # guardrail_identifier: "GuardrailIdentifier",
1931
2035
  # guardrail_version: "GuardrailVersion",
2036
+ # performance_config_latency: "standard", # accepts standard, optimized
1932
2037
  # })
1933
2038
  #
1934
2039
  # @example Response structure
@@ -1961,6 +2066,7 @@ module Aws::BedrockRuntime
1961
2066
  # event.message #=> String
1962
2067
  #
1963
2068
  # resp.content_type #=> String
2069
+ # resp.performance_config_latency #=> String, one of "standard", "optimized"
1964
2070
  #
1965
2071
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStream AWS API Documentation
1966
2072
  #
@@ -2007,7 +2113,7 @@ module Aws::BedrockRuntime
2007
2113
  tracer: tracer
2008
2114
  )
2009
2115
  context[:gem_name] = 'aws-sdk-bedrockruntime'
2010
- context[:gem_version] = '1.31.0'
2116
+ context[:gem_version] = '1.32.0'
2011
2117
  Seahorse::Client::Request.new(handlers, context)
2012
2118
  end
2013
2119
 
@@ -150,6 +150,8 @@ module Aws::BedrockRuntime
150
150
  NonNegativeInteger = Shapes::IntegerShape.new(name: 'NonNegativeInteger')
151
151
  PartBody = Shapes::BlobShape.new(name: 'PartBody')
152
152
  PayloadPart = Shapes::StructureShape.new(name: 'PayloadPart')
153
+ PerformanceConfigLatency = Shapes::StringShape.new(name: 'PerformanceConfigLatency')
154
+ PerformanceConfiguration = Shapes::StructureShape.new(name: 'PerformanceConfiguration')
153
155
  PromptVariableMap = Shapes::MapShape.new(name: 'PromptVariableMap')
154
156
  PromptVariableValues = Shapes::UnionShape.new(name: 'PromptVariableValues')
155
157
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
@@ -268,6 +270,7 @@ module Aws::BedrockRuntime
268
270
  ConverseRequest.add_member(:additional_model_request_fields, Shapes::ShapeRef.new(shape: Document, location_name: "additionalModelRequestFields"))
269
271
  ConverseRequest.add_member(:prompt_variables, Shapes::ShapeRef.new(shape: PromptVariableMap, location_name: "promptVariables"))
270
272
  ConverseRequest.add_member(:additional_model_response_field_paths, Shapes::ShapeRef.new(shape: ConverseRequestAdditionalModelResponseFieldPathsList, location_name: "additionalModelResponseFieldPaths"))
273
+ ConverseRequest.add_member(:performance_config, Shapes::ShapeRef.new(shape: PerformanceConfiguration, location_name: "performanceConfig"))
271
274
  ConverseRequest.struct_class = Types::ConverseRequest
272
275
 
273
276
  ConverseRequestAdditionalModelResponseFieldPathsList.member = Shapes::ShapeRef.new(shape: ConverseRequestAdditionalModelResponseFieldPathsListMemberString)
@@ -278,11 +281,13 @@ module Aws::BedrockRuntime
278
281
  ConverseResponse.add_member(:metrics, Shapes::ShapeRef.new(shape: ConverseMetrics, required: true, location_name: "metrics"))
279
282
  ConverseResponse.add_member(:additional_model_response_fields, Shapes::ShapeRef.new(shape: Document, location_name: "additionalModelResponseFields"))
280
283
  ConverseResponse.add_member(:trace, Shapes::ShapeRef.new(shape: ConverseTrace, location_name: "trace"))
284
+ ConverseResponse.add_member(:performance_config, Shapes::ShapeRef.new(shape: PerformanceConfiguration, location_name: "performanceConfig"))
281
285
  ConverseResponse.struct_class = Types::ConverseResponse
282
286
 
283
287
  ConverseStreamMetadataEvent.add_member(:usage, Shapes::ShapeRef.new(shape: TokenUsage, required: true, location_name: "usage"))
284
288
  ConverseStreamMetadataEvent.add_member(:metrics, Shapes::ShapeRef.new(shape: ConverseStreamMetrics, required: true, location_name: "metrics"))
285
289
  ConverseStreamMetadataEvent.add_member(:trace, Shapes::ShapeRef.new(shape: ConverseStreamTrace, location_name: "trace"))
290
+ ConverseStreamMetadataEvent.add_member(:performance_config, Shapes::ShapeRef.new(shape: PerformanceConfiguration, location_name: "performanceConfig"))
286
291
  ConverseStreamMetadataEvent.struct_class = Types::ConverseStreamMetadataEvent
287
292
 
288
293
  ConverseStreamMetrics.add_member(:latency_ms, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "latencyMs"))
@@ -310,6 +315,7 @@ module Aws::BedrockRuntime
310
315
  ConverseStreamRequest.add_member(:additional_model_request_fields, Shapes::ShapeRef.new(shape: Document, location_name: "additionalModelRequestFields"))
311
316
  ConverseStreamRequest.add_member(:prompt_variables, Shapes::ShapeRef.new(shape: PromptVariableMap, location_name: "promptVariables"))
312
317
  ConverseStreamRequest.add_member(:additional_model_response_field_paths, Shapes::ShapeRef.new(shape: ConverseStreamRequestAdditionalModelResponseFieldPathsList, location_name: "additionalModelResponseFieldPaths"))
318
+ ConverseStreamRequest.add_member(:performance_config, Shapes::ShapeRef.new(shape: PerformanceConfiguration, location_name: "performanceConfig"))
313
319
  ConverseStreamRequest.struct_class = Types::ConverseStreamRequest
314
320
 
315
321
  ConverseStreamRequestAdditionalModelResponseFieldPathsList.member = Shapes::ShapeRef.new(shape: ConverseStreamRequestAdditionalModelResponseFieldPathsListMemberString)
@@ -515,12 +521,14 @@ module Aws::BedrockRuntime
515
521
  InvokeModelRequest.add_member(:trace, Shapes::ShapeRef.new(shape: Trace, location: "header", location_name: "X-Amzn-Bedrock-Trace"))
516
522
  InvokeModelRequest.add_member(:guardrail_identifier, Shapes::ShapeRef.new(shape: GuardrailIdentifier, location: "header", location_name: "X-Amzn-Bedrock-GuardrailIdentifier"))
517
523
  InvokeModelRequest.add_member(:guardrail_version, Shapes::ShapeRef.new(shape: GuardrailVersion, location: "header", location_name: "X-Amzn-Bedrock-GuardrailVersion"))
524
+ InvokeModelRequest.add_member(:performance_config_latency, Shapes::ShapeRef.new(shape: PerformanceConfigLatency, location: "header", location_name: "X-Amzn-Bedrock-PerformanceConfig-Latency"))
518
525
  InvokeModelRequest.struct_class = Types::InvokeModelRequest
519
526
  InvokeModelRequest[:payload] = :body
520
527
  InvokeModelRequest[:payload_member] = InvokeModelRequest.member(:body)
521
528
 
522
529
  InvokeModelResponse.add_member(:body, Shapes::ShapeRef.new(shape: Body, required: true, location_name: "body"))
523
530
  InvokeModelResponse.add_member(:content_type, Shapes::ShapeRef.new(shape: MimeType, required: true, location: "header", location_name: "Content-Type"))
531
+ InvokeModelResponse.add_member(:performance_config_latency, Shapes::ShapeRef.new(shape: PerformanceConfigLatency, location: "header", location_name: "X-Amzn-Bedrock-PerformanceConfig-Latency"))
524
532
  InvokeModelResponse.struct_class = Types::InvokeModelResponse
525
533
  InvokeModelResponse[:payload] = :body
526
534
  InvokeModelResponse[:payload_member] = InvokeModelResponse.member(:body)
@@ -532,12 +540,14 @@ module Aws::BedrockRuntime
532
540
  InvokeModelWithResponseStreamRequest.add_member(:trace, Shapes::ShapeRef.new(shape: Trace, location: "header", location_name: "X-Amzn-Bedrock-Trace"))
533
541
  InvokeModelWithResponseStreamRequest.add_member(:guardrail_identifier, Shapes::ShapeRef.new(shape: GuardrailIdentifier, location: "header", location_name: "X-Amzn-Bedrock-GuardrailIdentifier"))
534
542
  InvokeModelWithResponseStreamRequest.add_member(:guardrail_version, Shapes::ShapeRef.new(shape: GuardrailVersion, location: "header", location_name: "X-Amzn-Bedrock-GuardrailVersion"))
543
+ InvokeModelWithResponseStreamRequest.add_member(:performance_config_latency, Shapes::ShapeRef.new(shape: PerformanceConfigLatency, location: "header", location_name: "X-Amzn-Bedrock-PerformanceConfig-Latency"))
535
544
  InvokeModelWithResponseStreamRequest.struct_class = Types::InvokeModelWithResponseStreamRequest
536
545
  InvokeModelWithResponseStreamRequest[:payload] = :body
537
546
  InvokeModelWithResponseStreamRequest[:payload_member] = InvokeModelWithResponseStreamRequest.member(:body)
538
547
 
539
548
  InvokeModelWithResponseStreamResponse.add_member(:body, Shapes::ShapeRef.new(shape: ResponseStream, required: true, eventstream: true, location_name: "body"))
540
549
  InvokeModelWithResponseStreamResponse.add_member(:content_type, Shapes::ShapeRef.new(shape: MimeType, required: true, location: "header", location_name: "X-Amzn-Bedrock-Content-Type"))
550
+ InvokeModelWithResponseStreamResponse.add_member(:performance_config_latency, Shapes::ShapeRef.new(shape: PerformanceConfigLatency, location: "header", location_name: "X-Amzn-Bedrock-PerformanceConfig-Latency"))
541
551
  InvokeModelWithResponseStreamResponse.struct_class = Types::InvokeModelWithResponseStreamResponse
542
552
  InvokeModelWithResponseStreamResponse[:payload] = :body
543
553
  InvokeModelWithResponseStreamResponse[:payload_member] = InvokeModelWithResponseStreamResponse.member(:body)
@@ -576,6 +586,9 @@ module Aws::BedrockRuntime
576
586
  PayloadPart.add_member(:bytes, Shapes::ShapeRef.new(shape: PartBody, location_name: "bytes"))
577
587
  PayloadPart.struct_class = Types::PayloadPart
578
588
 
589
+ PerformanceConfiguration.add_member(:latency, Shapes::ShapeRef.new(shape: PerformanceConfigLatency, location_name: "latency"))
590
+ PerformanceConfiguration.struct_class = Types::PerformanceConfiguration
591
+
579
592
  PromptVariableMap.key = Shapes::ShapeRef.new(shape: String)
580
593
  PromptVariableMap.value = Shapes::ShapeRef.new(shape: PromptVariableValues)
581
594
 
@@ -10,7 +10,13 @@
10
10
  module Aws::BedrockRuntime
11
11
  module Types
12
12
 
13
- # The request is denied because of missing access permissions.
13
+ # The request is denied because you do not have sufficient permissions
14
+ # to perform the requested action. For troubleshooting this error, see
15
+ # [AccessDeniedException][1] in the Amazon Bedrock User Guide
16
+ #
17
+ #
18
+ #
19
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied
14
20
  #
15
21
  # @!attribute [rw] message
16
22
  # @return [String]
@@ -337,10 +343,10 @@ module Aws::BedrockRuntime
337
343
  # For more information, see [Use a custom model in Amazon
338
344
  # Bedrock][4] in the Amazon Bedrock User Guide.
339
345
  #
340
- # * To include a prompt that was defined in Prompt management, specify
341
- # the ARN of the prompt version to use.
346
+ # * To include a prompt that was defined in [Prompt management][5],
347
+ # specify the ARN of the prompt version to use.
342
348
  #
343
- # The Converse API doesn't support [imported models][5].
349
+ # The Converse API doesn't support [imported models][6].
344
350
  #
345
351
  #
346
352
  #
@@ -348,7 +354,8 @@ module Aws::BedrockRuntime
348
354
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
349
355
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
350
356
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
351
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
357
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
358
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
352
359
  # @return [String]
353
360
  #
354
361
  # @!attribute [rw] messages
@@ -427,6 +434,10 @@ module Aws::BedrockRuntime
427
434
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
428
435
  # @return [Array<String>]
429
436
  #
437
+ # @!attribute [rw] performance_config
438
+ # Model performance settings for the request.
439
+ # @return [Types::PerformanceConfiguration]
440
+ #
430
441
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseRequest AWS API Documentation
431
442
  #
432
443
  class ConverseRequest < Struct.new(
@@ -438,7 +449,8 @@ module Aws::BedrockRuntime
438
449
  :guardrail_config,
439
450
  :additional_model_request_fields,
440
451
  :prompt_variables,
441
- :additional_model_response_field_paths)
452
+ :additional_model_response_field_paths,
453
+ :performance_config)
442
454
  SENSITIVE = [:prompt_variables]
443
455
  include Aws::Structure
444
456
  end
@@ -470,6 +482,10 @@ module Aws::BedrockRuntime
470
482
  # behavior.
471
483
  # @return [Types::ConverseTrace]
472
484
  #
485
+ # @!attribute [rw] performance_config
486
+ # Model performance settings for the request.
487
+ # @return [Types::PerformanceConfiguration]
488
+ #
473
489
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseResponse AWS API Documentation
474
490
  #
475
491
  class ConverseResponse < Struct.new(
@@ -478,7 +494,8 @@ module Aws::BedrockRuntime
478
494
  :usage,
479
495
  :metrics,
480
496
  :additional_model_response_fields,
481
- :trace)
497
+ :trace,
498
+ :performance_config)
482
499
  SENSITIVE = []
483
500
  include Aws::Structure
484
501
  end
@@ -502,12 +519,18 @@ module Aws::BedrockRuntime
502
519
  # [1]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
503
520
  # @return [Types::ConverseStreamTrace]
504
521
  #
522
+ # @!attribute [rw] performance_config
523
+ # Model performance configuration metadata for the conversation stream
524
+ # event.
525
+ # @return [Types::PerformanceConfiguration]
526
+ #
505
527
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamMetadataEvent AWS API Documentation
506
528
  #
507
529
  class ConverseStreamMetadataEvent < Struct.new(
508
530
  :usage,
509
531
  :metrics,
510
532
  :trace,
533
+ :performance_config,
511
534
  :event_type)
512
535
  SENSITIVE = []
513
536
  include Aws::Structure
@@ -550,10 +573,10 @@ module Aws::BedrockRuntime
550
573
  # For more information, see [Use a custom model in Amazon
551
574
  # Bedrock][4] in the Amazon Bedrock User Guide.
552
575
  #
553
- # * To include a prompt that was defined in Prompt management, specify
554
- # the ARN of the prompt version to use.
576
+ # * To include a prompt that was defined in [Prompt management][5],
577
+ # specify the ARN of the prompt version to use.
555
578
  #
556
- # The Converse API doesn't support [imported models][5].
579
+ # The Converse API doesn't support [imported models][6].
557
580
  #
558
581
  #
559
582
  #
@@ -561,7 +584,8 @@ module Aws::BedrockRuntime
561
584
  # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
562
585
  # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
563
586
  # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
564
- # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
587
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html
588
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
565
589
  # @return [String]
566
590
  #
567
591
  # @!attribute [rw] messages
@@ -639,6 +663,10 @@ module Aws::BedrockRuntime
639
663
  # [1]: https://datatracker.ietf.org/doc/html/rfc6901
640
664
  # @return [Array<String>]
641
665
  #
666
+ # @!attribute [rw] performance_config
667
+ # Model performance settings for the request.
668
+ # @return [Types::PerformanceConfiguration]
669
+ #
642
670
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/ConverseStreamRequest AWS API Documentation
643
671
  #
644
672
  class ConverseStreamRequest < Struct.new(
@@ -650,7 +678,8 @@ module Aws::BedrockRuntime
650
678
  :guardrail_config,
651
679
  :additional_model_request_fields,
652
680
  :prompt_variables,
653
- :additional_model_response_field_paths)
681
+ :additional_model_response_field_paths,
682
+ :performance_config)
654
683
  SENSITIVE = [:prompt_variables]
655
684
  include Aws::Structure
656
685
  end
@@ -1475,7 +1504,12 @@ module Aws::BedrockRuntime
1475
1504
  include Aws::Structure
1476
1505
  end
1477
1506
 
1478
- # An internal server error occurred. Retry your request.
1507
+ # An internal server error occurred. For troubleshooting this error, see
1508
+ # [InternalFailure][1] in the Amazon Bedrock User Guide
1509
+ #
1510
+ #
1511
+ #
1512
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure
1479
1513
  #
1480
1514
  # @!attribute [rw] message
1481
1515
  # @return [String]
@@ -1515,33 +1549,40 @@ module Aws::BedrockRuntime
1515
1549
  # @!attribute [rw] model_id
1516
1550
  # The unique identifier of the model to invoke to run inference.
1517
1551
  #
1518
- # The `modelId` to provide depends on the type of model that you use:
1552
+ # The `modelId` to provide depends on the type of model or throughput
1553
+ # that you use:
1519
1554
  #
1520
1555
  # * If you use a base model, specify the model ID or its ARN. For a
1521
1556
  # list of model IDs for base models, see [Amazon Bedrock base model
1522
1557
  # IDs (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1523
1558
  #
1559
+ # * If you use an inference profile, specify the inference profile ID
1560
+ # or its ARN. For a list of inference profile IDs, see [Supported
1561
+ # Regions and models for cross-region inference][2] in the Amazon
1562
+ # Bedrock User Guide.
1563
+ #
1524
1564
  # * If you use a provisioned model, specify the ARN of the Provisioned
1525
1565
  # Throughput. For more information, see [Run inference using a
1526
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
1566
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1527
1567
  #
1528
1568
  # * If you use a custom model, first purchase Provisioned Throughput
1529
1569
  # for it. Then specify the ARN of the resulting provisioned model.
1530
1570
  # For more information, see [Use a custom model in Amazon
1531
- # Bedrock][3] in the Amazon Bedrock User Guide.
1571
+ # Bedrock][4] in the Amazon Bedrock User Guide.
1532
1572
  #
1533
- # * If you use an [imported model][4], specify the ARN of the imported
1573
+ # * If you use an [imported model][5], specify the ARN of the imported
1534
1574
  # model. You can get the model ARN from a successful call to
1535
- # [CreateModelImportJob][5] or from the Imported models page in the
1575
+ # [CreateModelImportJob][6] or from the Imported models page in the
1536
1576
  # Amazon Bedrock console.
1537
1577
  #
1538
1578
  #
1539
1579
  #
1540
1580
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1541
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1542
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1543
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1544
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1581
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
1582
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1583
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1584
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1585
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1545
1586
  # @return [String]
1546
1587
  #
1547
1588
  # @!attribute [rw] trace
@@ -1569,6 +1610,10 @@ module Aws::BedrockRuntime
1569
1610
  # The version number for the guardrail. The value can also be `DRAFT`.
1570
1611
  # @return [String]
1571
1612
  #
1613
+ # @!attribute [rw] performance_config_latency
1614
+ # Model performance settings for the request.
1615
+ # @return [String]
1616
+ #
1572
1617
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelRequest AWS API Documentation
1573
1618
  #
1574
1619
  class InvokeModelRequest < Struct.new(
@@ -1578,7 +1623,8 @@ module Aws::BedrockRuntime
1578
1623
  :model_id,
1579
1624
  :trace,
1580
1625
  :guardrail_identifier,
1581
- :guardrail_version)
1626
+ :guardrail_version,
1627
+ :performance_config_latency)
1582
1628
  SENSITIVE = [:body]
1583
1629
  include Aws::Structure
1584
1630
  end
@@ -1598,11 +1644,16 @@ module Aws::BedrockRuntime
1598
1644
  # The MIME type of the inference result.
1599
1645
  # @return [String]
1600
1646
  #
1647
+ # @!attribute [rw] performance_config_latency
1648
+ # Model performance settings for the request.
1649
+ # @return [String]
1650
+ #
1601
1651
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelResponse AWS API Documentation
1602
1652
  #
1603
1653
  class InvokeModelResponse < Struct.new(
1604
1654
  :body,
1605
- :content_type)
1655
+ :content_type,
1656
+ :performance_config_latency)
1606
1657
  SENSITIVE = [:body]
1607
1658
  include Aws::Structure
1608
1659
  end
@@ -1633,33 +1684,40 @@ module Aws::BedrockRuntime
1633
1684
  # @!attribute [rw] model_id
1634
1685
  # The unique identifier of the model to invoke to run inference.
1635
1686
  #
1636
- # The `modelId` to provide depends on the type of model that you use:
1687
+ # The `modelId` to provide depends on the type of model or throughput
1688
+ # that you use:
1637
1689
  #
1638
1690
  # * If you use a base model, specify the model ID or its ARN. For a
1639
1691
  # list of model IDs for base models, see [Amazon Bedrock base model
1640
1692
  # IDs (on-demand throughput)][1] in the Amazon Bedrock User Guide.
1641
1693
  #
1694
+ # * If you use an inference profile, specify the inference profile ID
1695
+ # or its ARN. For a list of inference profile IDs, see [Supported
1696
+ # Regions and models for cross-region inference][2] in the Amazon
1697
+ # Bedrock User Guide.
1698
+ #
1642
1699
  # * If you use a provisioned model, specify the ARN of the Provisioned
1643
1700
  # Throughput. For more information, see [Run inference using a
1644
- # Provisioned Throughput][2] in the Amazon Bedrock User Guide.
1701
+ # Provisioned Throughput][3] in the Amazon Bedrock User Guide.
1645
1702
  #
1646
1703
  # * If you use a custom model, first purchase Provisioned Throughput
1647
1704
  # for it. Then specify the ARN of the resulting provisioned model.
1648
1705
  # For more information, see [Use a custom model in Amazon
1649
- # Bedrock][3] in the Amazon Bedrock User Guide.
1706
+ # Bedrock][4] in the Amazon Bedrock User Guide.
1650
1707
  #
1651
- # * If you use an [imported model][4], specify the ARN of the imported
1708
+ # * If you use an [imported model][5], specify the ARN of the imported
1652
1709
  # model. You can get the model ARN from a successful call to
1653
- # [CreateModelImportJob][5] or from the Imported models page in the
1710
+ # [CreateModelImportJob][6] or from the Imported models page in the
1654
1711
  # Amazon Bedrock console.
1655
1712
  #
1656
1713
  #
1657
1714
  #
1658
1715
  # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns
1659
- # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1660
- # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1661
- # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1662
- # [5]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1716
+ # [2]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html
1717
+ # [3]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html
1718
+ # [4]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html
1719
+ # [5]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html
1720
+ # [6]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html
1663
1721
  # @return [String]
1664
1722
  #
1665
1723
  # @!attribute [rw] trace
@@ -1687,6 +1745,10 @@ module Aws::BedrockRuntime
1687
1745
  # The version number for the guardrail. The value can also be `DRAFT`.
1688
1746
  # @return [String]
1689
1747
  #
1748
+ # @!attribute [rw] performance_config_latency
1749
+ # Model performance settings for the request.
1750
+ # @return [String]
1751
+ #
1690
1752
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStreamRequest AWS API Documentation
1691
1753
  #
1692
1754
  class InvokeModelWithResponseStreamRequest < Struct.new(
@@ -1696,7 +1758,8 @@ module Aws::BedrockRuntime
1696
1758
  :model_id,
1697
1759
  :trace,
1698
1760
  :guardrail_identifier,
1699
- :guardrail_version)
1761
+ :guardrail_version,
1762
+ :performance_config_latency)
1700
1763
  SENSITIVE = [:body]
1701
1764
  include Aws::Structure
1702
1765
  end
@@ -1715,11 +1778,16 @@ module Aws::BedrockRuntime
1715
1778
  # The MIME type of the inference result.
1716
1779
  # @return [String]
1717
1780
  #
1781
+ # @!attribute [rw] performance_config_latency
1782
+ # Model performance settings for the request.
1783
+ # @return [String]
1784
+ #
1718
1785
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStreamResponse AWS API Documentation
1719
1786
  #
1720
1787
  class InvokeModelWithResponseStreamResponse < Struct.new(
1721
1788
  :body,
1722
- :content_type)
1789
+ :content_type,
1790
+ :performance_config_latency)
1723
1791
  SENSITIVE = []
1724
1792
  include Aws::Structure
1725
1793
  end
@@ -1893,6 +1961,20 @@ module Aws::BedrockRuntime
1893
1961
  include Aws::Structure
1894
1962
  end
1895
1963
 
1964
+ # Performance settings for a model.
1965
+ #
1966
+ # @!attribute [rw] latency
1967
+ # To use a latency-optimized version of the model, set to `optimized`.
1968
+ # @return [String]
1969
+ #
1970
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/PerformanceConfiguration AWS API Documentation
1971
+ #
1972
+ class PerformanceConfiguration < Struct.new(
1973
+ :latency)
1974
+ SENSITIVE = []
1975
+ include Aws::Structure
1976
+ end
1977
+
1896
1978
  # Contains a map of variables in a prompt from Prompt management to an
1897
1979
  # object containing the values to fill in for them when running model
1898
1980
  # invocation. For more information, see [How Prompt management
@@ -1921,8 +2003,12 @@ module Aws::BedrockRuntime
1921
2003
  class Unknown < PromptVariableValues; end
1922
2004
  end
1923
2005
 
1924
- # The specified resource ARN was not found. Check the ARN and try your
1925
- # request again.
2006
+ # The specified resource ARN was not found. For troubleshooting this
2007
+ # error, see [ResourceNotFound][1] in the Amazon Bedrock User Guide
2008
+ #
2009
+ #
2010
+ #
2011
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found
1926
2012
  #
1927
2013
  # @!attribute [rw] message
1928
2014
  # @return [String]
@@ -1954,7 +2040,12 @@ module Aws::BedrockRuntime
1954
2040
  include Aws::Structure
1955
2041
  end
1956
2042
 
1957
- # The service isn't currently available. Try again later.
2043
+ # The service isn't currently available. For troubleshooting this
2044
+ # error, see [ServiceUnavailable][1] in the Amazon Bedrock User Guide
2045
+ #
2046
+ #
2047
+ #
2048
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable
1958
2049
  #
1959
2050
  # @!attribute [rw] message
1960
2051
  # @return [String]
@@ -2023,14 +2114,13 @@ module Aws::BedrockRuntime
2023
2114
  class Unknown < SystemContentBlock; end
2024
2115
  end
2025
2116
 
2026
- # Your request was throttled because of service-wide limitations.
2027
- # Resubmit your request later or in a different region. You can also
2028
- # purchase [Provisioned Throughput][1] to increase the rate or number of
2029
- # tokens you can process.
2117
+ # Your request was denied due to exceeding the account quotas for
2118
+ # *Amazon Bedrock*. For troubleshooting this error, see
2119
+ # [ThrottlingException][1] in the Amazon Bedrock User Guide
2030
2120
  #
2031
2121
  #
2032
2122
  #
2033
- # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html
2123
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception
2034
2124
  #
2035
2125
  # @!attribute [rw] message
2036
2126
  # @return [String]
@@ -2345,8 +2435,13 @@ module Aws::BedrockRuntime
2345
2435
  include Aws::Structure
2346
2436
  end
2347
2437
 
2348
- # Input validation failed. Check your request parameters and retry the
2349
- # request.
2438
+ # The input fails to satisfy the constraints specified by *Amazon
2439
+ # Bedrock*. For troubleshooting this error, see [ValidationError][1] in
2440
+ # the Amazon Bedrock User Guide
2441
+ #
2442
+ #
2443
+ #
2444
+ # [1]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error
2350
2445
  #
2351
2446
  # @!attribute [rw] message
2352
2447
  # @return [String]
@@ -56,7 +56,7 @@ module Aws::BedrockRuntime
56
56
  autoload :Endpoints, 'aws-sdk-bedrockruntime/endpoints'
57
57
  autoload :EventStreams, 'aws-sdk-bedrockruntime/event_streams'
58
58
 
59
- GEM_VERSION = '1.31.0'
59
+ GEM_VERSION = '1.32.0'
60
60
 
61
61
  end
62
62
 
data/sig/client.rbs CHANGED
@@ -110,6 +110,7 @@ module Aws
110
110
  def metrics: () -> Types::ConverseMetrics
111
111
  def additional_model_response_fields: () -> untyped
112
112
  def trace: () -> Types::ConverseTrace
113
+ def performance_config: () -> Types::PerformanceConfiguration
113
114
  end
114
115
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#converse-instance_method
115
116
  def converse: (
@@ -223,7 +224,10 @@ module Aws
223
224
  ?prompt_variables: Hash[::String, {
224
225
  text: ::String?
225
226
  }],
226
- ?additional_model_response_field_paths: Array[::String]
227
+ ?additional_model_response_field_paths: Array[::String],
228
+ ?performance_config: {
229
+ latency: ("standard" | "optimized")?
230
+ }
227
231
  ) -> _ConverseResponseSuccess
228
232
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ConverseResponseSuccess
229
233
 
@@ -344,7 +348,10 @@ module Aws
344
348
  ?prompt_variables: Hash[::String, {
345
349
  text: ::String?
346
350
  }],
347
- ?additional_model_response_field_paths: Array[::String]
351
+ ?additional_model_response_field_paths: Array[::String],
352
+ ?performance_config: {
353
+ latency: ("standard" | "optimized")?
354
+ }
348
355
  ) ?{ (*untyped) -> void } -> _ConverseStreamResponseSuccess
349
356
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _ConverseStreamResponseSuccess
350
357
 
@@ -352,6 +359,7 @@ module Aws
352
359
  include ::Seahorse::Client::_ResponseSuccess[Types::InvokeModelResponse]
353
360
  def body: () -> ::String
354
361
  def content_type: () -> ::String
362
+ def performance_config_latency: () -> ("standard" | "optimized")
355
363
  end
356
364
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#invoke_model-instance_method
357
365
  def invoke_model: (
@@ -361,7 +369,8 @@ module Aws
361
369
  model_id: ::String,
362
370
  ?trace: ("ENABLED" | "DISABLED"),
363
371
  ?guardrail_identifier: ::String,
364
- ?guardrail_version: ::String
372
+ ?guardrail_version: ::String,
373
+ ?performance_config_latency: ("standard" | "optimized")
365
374
  ) -> _InvokeModelResponseSuccess
366
375
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _InvokeModelResponseSuccess
367
376
 
@@ -369,6 +378,7 @@ module Aws
369
378
  include ::Seahorse::Client::_ResponseSuccess[Types::InvokeModelWithResponseStreamResponse]
370
379
  def body: () -> Types::ResponseStream
371
380
  def content_type: () -> ::String
381
+ def performance_config_latency: () -> ("standard" | "optimized")
372
382
  end
373
383
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html#invoke_model_with_response_stream-instance_method
374
384
  def invoke_model_with_response_stream: (
@@ -378,7 +388,8 @@ module Aws
378
388
  model_id: ::String,
379
389
  ?trace: ("ENABLED" | "DISABLED"),
380
390
  ?guardrail_identifier: ::String,
381
- ?guardrail_version: ::String
391
+ ?guardrail_version: ::String,
392
+ ?performance_config_latency: ("standard" | "optimized")
382
393
  ) ?{ (*untyped) -> void } -> _InvokeModelWithResponseStreamResponseSuccess
383
394
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeModelWithResponseStreamResponseSuccess
384
395
  end
data/sig/types.rbs CHANGED
@@ -133,6 +133,7 @@ module Aws::BedrockRuntime
133
133
  attr_accessor additional_model_request_fields: untyped
134
134
  attr_accessor prompt_variables: ::Hash[::String, Types::PromptVariableValues]
135
135
  attr_accessor additional_model_response_field_paths: ::Array[::String]
136
+ attr_accessor performance_config: Types::PerformanceConfiguration
136
137
  SENSITIVE: [:prompt_variables]
137
138
  end
138
139
 
@@ -143,6 +144,7 @@ module Aws::BedrockRuntime
143
144
  attr_accessor metrics: Types::ConverseMetrics
144
145
  attr_accessor additional_model_response_fields: untyped
145
146
  attr_accessor trace: Types::ConverseTrace
147
+ attr_accessor performance_config: Types::PerformanceConfiguration
146
148
  SENSITIVE: []
147
149
  end
148
150
 
@@ -150,6 +152,7 @@ module Aws::BedrockRuntime
150
152
  attr_accessor usage: Types::TokenUsage
151
153
  attr_accessor metrics: Types::ConverseStreamMetrics
152
154
  attr_accessor trace: Types::ConverseStreamTrace
155
+ attr_accessor performance_config: Types::PerformanceConfiguration
153
156
  attr_accessor event_type: untyped
154
157
  SENSITIVE: []
155
158
  end
@@ -169,6 +172,7 @@ module Aws::BedrockRuntime
169
172
  attr_accessor additional_model_request_fields: untyped
170
173
  attr_accessor prompt_variables: ::Hash[::String, Types::PromptVariableValues]
171
174
  attr_accessor additional_model_response_field_paths: ::Array[::String]
175
+ attr_accessor performance_config: Types::PerformanceConfiguration
172
176
  SENSITIVE: [:prompt_variables]
173
177
  end
174
178
 
@@ -421,12 +425,14 @@ module Aws::BedrockRuntime
421
425
  attr_accessor trace: ("ENABLED" | "DISABLED")
422
426
  attr_accessor guardrail_identifier: ::String
423
427
  attr_accessor guardrail_version: ::String
428
+ attr_accessor performance_config_latency: ("standard" | "optimized")
424
429
  SENSITIVE: [:body]
425
430
  end
426
431
 
427
432
  class InvokeModelResponse
428
433
  attr_accessor body: ::String
429
434
  attr_accessor content_type: ::String
435
+ attr_accessor performance_config_latency: ("standard" | "optimized")
430
436
  SENSITIVE: [:body]
431
437
  end
432
438
 
@@ -438,12 +444,14 @@ module Aws::BedrockRuntime
438
444
  attr_accessor trace: ("ENABLED" | "DISABLED")
439
445
  attr_accessor guardrail_identifier: ::String
440
446
  attr_accessor guardrail_version: ::String
447
+ attr_accessor performance_config_latency: ("standard" | "optimized")
441
448
  SENSITIVE: [:body]
442
449
  end
443
450
 
444
451
  class InvokeModelWithResponseStreamResponse
445
452
  attr_accessor body: Types::ResponseStream
446
453
  attr_accessor content_type: ::String
454
+ attr_accessor performance_config_latency: ("standard" | "optimized")
447
455
  SENSITIVE: []
448
456
  end
449
457
 
@@ -498,6 +506,11 @@ module Aws::BedrockRuntime
498
506
  SENSITIVE: [:bytes]
499
507
  end
500
508
 
509
+ class PerformanceConfiguration
510
+ attr_accessor latency: ("standard" | "optimized")
511
+ SENSITIVE: []
512
+ end
513
+
501
514
  class PromptVariableValues
502
515
  attr_accessor text: ::String
503
516
  attr_accessor unknown: untyped
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.31.0
4
+ version: 1.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-07 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core