Skip to content

Commit 690bc7f

Browse files
author
awstools
committed
feat(client-bedrock-runtime): Provides ServiceUnavailableException error message
1 parent 2156a87 commit 690bc7f

File tree

8 files changed

+210
-19
lines changed

8 files changed

+210
-19
lines changed

clients/client-bedrock-runtime/src/commands/ApplyGuardrailCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ export interface ApplyGuardrailCommandOutput extends ApplyGuardrailResponse, __M
151151
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
152152
*
153153
* @throws {@link ServiceQuotaExceededException} (client fault)
154-
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
154+
* <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>
155155
*
156156
* @throws {@link ThrottlingException} (client fault)
157-
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
157+
* <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
158158
*
159159
* @throws {@link ValidationException} (client fault)
160160
* <p>Input validation failed. Check your request parameters and retry the request.</p>

clients/client-bedrock-runtime/src/commands/ConverseCommand.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
3131
* <p>Sends messages to the specified Amazon Bedrock model. <code>Converse</code> provides
3232
* a consistent interface that works with all models that
3333
* support messages. This allows you to write code once and use it with different models.
34-
* Should a model have unique inference parameters, you can also pass those unique parameters
34+
* If a model has unique inference parameters, you can also pass those unique parameters
3535
* to the model.</p>
36+
* <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p>
3637
* <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
3738
* To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
3839
* To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i>
@@ -395,8 +396,11 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
395396
* @throws {@link ResourceNotFoundException} (client fault)
396397
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
397398
*
399+
* @throws {@link ServiceUnavailableException} (server fault)
400+
* <p>The service isn't currently available. Try again later.</p>
401+
*
398402
* @throws {@link ThrottlingException} (client fault)
399-
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
403+
* <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
400404
*
401405
* @throws {@link ValidationException} (client fault)
402406
* <p>Input validation failed. Check your request parameters and retry the request.</p>

clients/client-bedrock-runtime/src/commands/ConverseStreamCommand.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
4040
* model. </p>
4141
* <p>To find out if a model supports streaming, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html">GetFoundationModel</a>
4242
* and check the <code>responseStreamingSupported</code> field in the response.</p>
43+
* <note>
44+
* <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>ConverseStream</code>.</p>
45+
* </note>
46+
* <p>Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.</p>
4347
* <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
4448
* To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>.
4549
* To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i>
@@ -359,6 +363,9 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
359363
* // throttlingException: { // ThrottlingException
360364
* // message: "STRING_VALUE",
361365
* // },
366+
* // serviceUnavailableException: { // ServiceUnavailableException
367+
* // message: "STRING_VALUE",
368+
* // },
362369
* // },
363370
* // };
364371
*
@@ -388,8 +395,11 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
388395
* @throws {@link ResourceNotFoundException} (client fault)
389396
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
390397
*
398+
* @throws {@link ServiceUnavailableException} (server fault)
399+
* <p>The service isn't currently available. Try again later.</p>
400+
*
391401
* @throws {@link ThrottlingException} (client fault)
392-
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
402+
* <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
393403
*
394404
* @throws {@link ValidationException} (client fault)
395405
* <p>Input validation failed. Check your request parameters and retry the request.</p>

clients/client-bedrock-runtime/src/commands/InvokeModelCommand.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,13 @@ export interface InvokeModelCommandOutput extends InvokeModelCommandOutputType,
102102
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
103103
*
104104
* @throws {@link ServiceQuotaExceededException} (client fault)
105-
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
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>
106+
*
107+
* @throws {@link ServiceUnavailableException} (server fault)
108+
* <p>The service isn't currently available. Try again later.</p>
106109
*
107110
* @throws {@link ThrottlingException} (client fault)
108-
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
111+
* <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
109112
*
110113
* @throws {@link ValidationException} (client fault)
111114
* <p>Input validation failed. Check your request parameters and retry the request.</p>

clients/client-bedrock-runtime/src/commands/InvokeModelWithResponseStreamCommand.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export interface InvokeModelWithResponseStreamCommandOutput
4949
* <p>To see if a model supports streaming, call <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html">GetFoundationModel</a>
5050
* and check the <code>responseStreamingSupported</code> field in the response.</p>
5151
* <note>
52-
* <p>The CLI doesn't support <code>InvokeModelWithResponseStream</code>.</p>
52+
* <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeModelWithResponseStream</code>.</p>
5353
* </note>
5454
* <p>For example code, see <i>Invoke model with streaming code
5555
* example</i> in the <i>Amazon Bedrock User Guide</i>.
@@ -94,6 +94,9 @@ export interface InvokeModelWithResponseStreamCommandOutput
9494
* // modelTimeoutException: { // ModelTimeoutException
9595
* // message: "STRING_VALUE",
9696
* // },
97+
* // serviceUnavailableException: { // ServiceUnavailableException
98+
* // message: "STRING_VALUE",
99+
* // },
97100
* // },
98101
* // contentType: "STRING_VALUE", // required
99102
* // };
@@ -128,10 +131,13 @@ export interface InvokeModelWithResponseStreamCommandOutput
128131
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
129132
*
130133
* @throws {@link ServiceQuotaExceededException} (client fault)
131-
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
134+
* <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>
135+
*
136+
* @throws {@link ServiceUnavailableException} (server fault)
137+
* <p>The service isn't currently available. Try again later.</p>
132138
*
133139
* @throws {@link ThrottlingException} (client fault)
134-
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
140+
* <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
135141
*
136142
* @throws {@link ValidationException} (client fault)
137143
* <p>Input validation failed. Check your request parameters and retry the request.</p>

0 commit comments

Comments
 (0)