@aws-sdk/client-bedrock-runtime 3.839.0 → 3.840.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.
- package/dist-cjs/auth/httpAuthSchemeProvider.js +17 -0
- package/dist-cjs/index.js +80 -2
- package/dist-cjs/runtimeConfig.js +23 -0
- package/dist-cjs/runtimeConfig.shared.js +6 -0
- package/dist-es/BedrockRuntimeClient.js +1 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +8 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +17 -0
- package/dist-es/models/models_0.js +48 -0
- package/dist-es/protocols/Aws_restJson1.js +25 -0
- package/dist-es/runtimeConfig.js +24 -1
- package/dist-es/runtimeConfig.shared.js +6 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +4 -1
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +9 -1
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +6 -13
- package/dist-types/commands/ConverseCommand.d.ts +120 -44
- package/dist-types/commands/ConverseStreamCommand.d.ts +89 -48
- package/dist-types/commands/GetAsyncInvokeCommand.d.ts +4 -8
- package/dist-types/commands/InvokeModelCommand.d.ts +8 -30
- package/dist-types/commands/InvokeModelWithBidirectionalStreamCommand.d.ts +8 -18
- package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +8 -35
- package/dist-types/commands/ListAsyncInvokesCommand.d.ts +4 -8
- package/dist-types/commands/StartAsyncInvokeCommand.d.ts +7 -21
- package/dist-types/models/models_0.d.ts +432 -296
- package/dist-types/runtimeConfig.browser.d.ts +10 -1
- package/dist-types/runtimeConfig.d.ts +13 -1
- package/dist-types/runtimeConfig.native.d.ts +10 -1
- package/dist-types/runtimeConfig.shared.d.ts +12 -1
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +5 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +192 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +27 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +30 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +27 -1
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +27 -1
- package/package.json +15 -14
|
@@ -40,20 +40,7 @@ declare const InvokeModelCommand_base: {
|
|
|
40
40
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
|
-
* <p>Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body.
|
|
44
|
-
* You use model inference to generate text, images, and embeddings.</p>
|
|
45
|
-
* <p>For example code, see <i>Invoke model code examples</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
46
|
-
* </p>
|
|
47
|
-
* <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action.</p>
|
|
48
|
-
* <important>
|
|
49
|
-
* <p>To deny all inference access to resources that you specify in the modelId field, you
|
|
50
|
-
* need to deny access to the <code>bedrock:InvokeModel</code> and
|
|
51
|
-
* <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
|
|
52
|
-
* access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
|
|
53
|
-
* </p>
|
|
54
|
-
* </important>
|
|
55
|
-
* <p>For troubleshooting some of the common errors you might encounter when using the <code>InvokeModel</code> API,
|
|
56
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
43
|
+
* <p>Invokes the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. You use model inference to generate text, images, and embeddings.</p> <p>For example code, see <i>Invoke model code examples</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action.</p> <important> <p>To deny all inference access to resources that you specify in the modelId field, you need to deny access to the <code>bedrock:InvokeModel</code> and <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>. </p> </important> <p>For troubleshooting some of the common errors you might encounter when using the <code>InvokeModel</code> API, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
57
44
|
* @example
|
|
58
45
|
* Use a bare-bones client and the command you need to make an API call.
|
|
59
46
|
* ```javascript
|
|
@@ -87,43 +74,34 @@ declare const InvokeModelCommand_base: {
|
|
|
87
74
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
88
75
|
*
|
|
89
76
|
* @throws {@link AccessDeniedException} (client fault)
|
|
90
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
91
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
77
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
92
78
|
*
|
|
93
79
|
* @throws {@link InternalServerException} (server fault)
|
|
94
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
95
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
80
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
96
81
|
*
|
|
97
82
|
* @throws {@link ModelErrorException} (client fault)
|
|
98
83
|
* <p>The request failed due to an error while processing the model.</p>
|
|
99
84
|
*
|
|
100
85
|
* @throws {@link ModelNotReadyException} (client fault)
|
|
101
|
-
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
|
|
102
|
-
* will automatically retry the operation up to 5 times. For information about configuring
|
|
103
|
-
* automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
|
|
104
|
-
* reference guide.</p>
|
|
86
|
+
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i> reference guide.</p>
|
|
105
87
|
*
|
|
106
88
|
* @throws {@link ModelTimeoutException} (client fault)
|
|
107
89
|
* <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
|
108
90
|
*
|
|
109
91
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
110
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
111
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
92
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
112
93
|
*
|
|
113
94
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
114
95
|
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
115
96
|
*
|
|
116
97
|
* @throws {@link ServiceUnavailableException} (server fault)
|
|
117
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
118
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
98
|
+
* <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
119
99
|
*
|
|
120
100
|
* @throws {@link ThrottlingException} (client fault)
|
|
121
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
122
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
101
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
123
102
|
*
|
|
124
103
|
* @throws {@link ValidationException} (client fault)
|
|
125
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
126
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
104
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
127
105
|
*
|
|
128
106
|
* @throws {@link BedrockRuntimeServiceException}
|
|
129
107
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
@@ -27,8 +27,7 @@ declare const InvokeModelWithBidirectionalStreamCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.</p>
|
|
31
|
-
* <p>It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.</p>
|
|
30
|
+
* <p>Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.</p> <p>It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.</p>
|
|
32
31
|
* @example
|
|
33
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
34
33
|
* ```javascript
|
|
@@ -82,21 +81,16 @@ declare const InvokeModelWithBidirectionalStreamCommand_base: {
|
|
|
82
81
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
83
82
|
*
|
|
84
83
|
* @throws {@link AccessDeniedException} (client fault)
|
|
85
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
86
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
84
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
87
85
|
*
|
|
88
86
|
* @throws {@link InternalServerException} (server fault)
|
|
89
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
90
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
87
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
91
88
|
*
|
|
92
89
|
* @throws {@link ModelErrorException} (client fault)
|
|
93
90
|
* <p>The request failed due to an error while processing the model.</p>
|
|
94
91
|
*
|
|
95
92
|
* @throws {@link ModelNotReadyException} (client fault)
|
|
96
|
-
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
|
|
97
|
-
* will automatically retry the operation up to 5 times. For information about configuring
|
|
98
|
-
* automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
|
|
99
|
-
* reference guide.</p>
|
|
93
|
+
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i> reference guide.</p>
|
|
100
94
|
*
|
|
101
95
|
* @throws {@link ModelStreamErrorException} (client fault)
|
|
102
96
|
* <p>An error occurred while streaming the response. Retry your request.</p>
|
|
@@ -105,23 +99,19 @@ declare const InvokeModelWithBidirectionalStreamCommand_base: {
|
|
|
105
99
|
* <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
|
106
100
|
*
|
|
107
101
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
108
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
109
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
102
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
110
103
|
*
|
|
111
104
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
112
105
|
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
113
106
|
*
|
|
114
107
|
* @throws {@link ServiceUnavailableException} (server fault)
|
|
115
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
116
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
108
|
+
* <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
117
109
|
*
|
|
118
110
|
* @throws {@link ThrottlingException} (client fault)
|
|
119
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
120
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
111
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
121
112
|
*
|
|
122
113
|
* @throws {@link ValidationException} (client fault)
|
|
123
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
124
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
114
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
125
115
|
*
|
|
126
116
|
* @throws {@link BedrockRuntimeServiceException}
|
|
127
117
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
@@ -33,25 +33,7 @@ declare const InvokeModelWithResponseStreamCommand_base: {
|
|
|
33
33
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* <p>Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream.</p>
|
|
37
|
-
* <p>To see if a model supports streaming, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html">GetFoundationModel</a>
|
|
38
|
-
* and check the <code>responseStreamingSupported</code> field in the response.</p>
|
|
39
|
-
* <note>
|
|
40
|
-
* <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeModelWithResponseStream</code>.</p>
|
|
41
|
-
* </note>
|
|
42
|
-
* <p>For example code, see <i>Invoke model with streaming code
|
|
43
|
-
* example</i> in the <i>Amazon Bedrock User Guide</i>.
|
|
44
|
-
* </p>
|
|
45
|
-
* <p>This operation requires permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action. </p>
|
|
46
|
-
* <important>
|
|
47
|
-
* <p>To deny all inference access to resources that you specify in the modelId field, you
|
|
48
|
-
* need to deny access to the <code>bedrock:InvokeModel</code> and
|
|
49
|
-
* <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
|
|
50
|
-
* access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
|
|
51
|
-
* </p>
|
|
52
|
-
* </important>
|
|
53
|
-
* <p>For troubleshooting some of the common errors you might encounter when using the <code>InvokeModelWithResponseStream</code> API,
|
|
54
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
36
|
+
* <p>Invoke the specified Amazon Bedrock model to run inference using the prompt and inference parameters provided in the request body. The response is returned in a stream.</p> <p>To see if a model supports streaming, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html">GetFoundationModel</a> and check the <code>responseStreamingSupported</code> field in the response.</p> <note> <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeModelWithResponseStream</code>.</p> </note> <p>For example code, see <i>Invoke model with streaming code example</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action. </p> <important> <p>To deny all inference access to resources that you specify in the modelId field, you need to deny access to the <code>bedrock:InvokeModel</code> and <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>. </p> </important> <p>For troubleshooting some of the common errors you might encounter when using the <code>InvokeModelWithResponseStream</code> API, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
|
|
55
37
|
* @example
|
|
56
38
|
* Use a bare-bones client and the command you need to make an API call.
|
|
57
39
|
* ```javascript
|
|
@@ -109,21 +91,16 @@ declare const InvokeModelWithResponseStreamCommand_base: {
|
|
|
109
91
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
110
92
|
*
|
|
111
93
|
* @throws {@link AccessDeniedException} (client fault)
|
|
112
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
113
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
94
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
114
95
|
*
|
|
115
96
|
* @throws {@link InternalServerException} (server fault)
|
|
116
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
117
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
97
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
118
98
|
*
|
|
119
99
|
* @throws {@link ModelErrorException} (client fault)
|
|
120
100
|
* <p>The request failed due to an error while processing the model.</p>
|
|
121
101
|
*
|
|
122
102
|
* @throws {@link ModelNotReadyException} (client fault)
|
|
123
|
-
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
|
|
124
|
-
* will automatically retry the operation up to 5 times. For information about configuring
|
|
125
|
-
* automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
|
|
126
|
-
* reference guide.</p>
|
|
103
|
+
* <p>The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i> reference guide.</p>
|
|
127
104
|
*
|
|
128
105
|
* @throws {@link ModelStreamErrorException} (client fault)
|
|
129
106
|
* <p>An error occurred while streaming the response. Retry your request.</p>
|
|
@@ -132,23 +109,19 @@ declare const InvokeModelWithResponseStreamCommand_base: {
|
|
|
132
109
|
* <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
|
133
110
|
*
|
|
134
111
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
135
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
136
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
112
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
137
113
|
*
|
|
138
114
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
139
115
|
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
140
116
|
*
|
|
141
117
|
* @throws {@link ServiceUnavailableException} (server fault)
|
|
142
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
143
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
118
|
+
* <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
144
119
|
*
|
|
145
120
|
* @throws {@link ThrottlingException} (client fault)
|
|
146
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
147
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
121
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
148
122
|
*
|
|
149
123
|
* @throws {@link ValidationException} (client fault)
|
|
150
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
151
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
124
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
152
125
|
*
|
|
153
126
|
* @throws {@link BedrockRuntimeServiceException}
|
|
154
127
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
@@ -77,20 +77,16 @@ declare const ListAsyncInvokesCommand_base: {
|
|
|
77
77
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
78
78
|
*
|
|
79
79
|
* @throws {@link AccessDeniedException} (client fault)
|
|
80
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
81
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
80
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
82
81
|
*
|
|
83
82
|
* @throws {@link InternalServerException} (server fault)
|
|
84
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
85
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
83
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
86
84
|
*
|
|
87
85
|
* @throws {@link ThrottlingException} (client fault)
|
|
88
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
89
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
86
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
90
87
|
*
|
|
91
88
|
* @throws {@link ValidationException} (client fault)
|
|
92
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
93
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
89
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
94
90
|
*
|
|
95
91
|
* @throws {@link BedrockRuntimeServiceException}
|
|
96
92
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|
|
@@ -27,15 +27,7 @@ declare const StartAsyncInvokeCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Starts an asynchronous invocation.</p>
|
|
31
|
-
* <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action.</p>
|
|
32
|
-
* <important>
|
|
33
|
-
* <p>To deny all inference access to resources that you specify in the modelId field, you
|
|
34
|
-
* need to deny access to the <code>bedrock:InvokeModel</code> and
|
|
35
|
-
* <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
|
|
36
|
-
* access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
|
|
37
|
-
* </p>
|
|
38
|
-
* </important>
|
|
30
|
+
* <p>Starts an asynchronous invocation.</p> <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action.</p> <important> <p>To deny all inference access to resources that you specify in the modelId field, you need to deny access to the <code>bedrock:InvokeModel</code> and <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>. </p> </important>
|
|
39
31
|
* @example
|
|
40
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
41
33
|
* ```javascript
|
|
@@ -75,34 +67,28 @@ declare const StartAsyncInvokeCommand_base: {
|
|
|
75
67
|
* @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
|
|
76
68
|
*
|
|
77
69
|
* @throws {@link AccessDeniedException} (client fault)
|
|
78
|
-
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
|
|
79
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
70
|
+
* <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
|
80
71
|
*
|
|
81
72
|
* @throws {@link ConflictException} (client fault)
|
|
82
73
|
* <p>Error occurred because of a conflict while performing an operation.</p>
|
|
83
74
|
*
|
|
84
75
|
* @throws {@link InternalServerException} (server fault)
|
|
85
|
-
* <p>An internal server error occurred. For troubleshooting this error,
|
|
86
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
76
|
+
* <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
|
87
77
|
*
|
|
88
78
|
* @throws {@link ResourceNotFoundException} (client fault)
|
|
89
|
-
* <p>The specified resource ARN was not found. For troubleshooting this error,
|
|
90
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
79
|
+
* <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
|
91
80
|
*
|
|
92
81
|
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
93
82
|
* <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
|
94
83
|
*
|
|
95
84
|
* @throws {@link ServiceUnavailableException} (server fault)
|
|
96
|
-
* <p>The service isn't currently available. For troubleshooting this error,
|
|
97
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
85
|
+
* <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
|
98
86
|
*
|
|
99
87
|
* @throws {@link ThrottlingException} (client fault)
|
|
100
|
-
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
|
|
101
|
-
* troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
88
|
+
* <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
|
102
89
|
*
|
|
103
90
|
* @throws {@link ValidationException} (client fault)
|
|
104
|
-
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
|
|
105
|
-
* see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
91
|
+
* <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
|
106
92
|
*
|
|
107
93
|
* @throws {@link BedrockRuntimeServiceException}
|
|
108
94
|
* <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
|