Skip to content

Commit 8b29b1b

Browse files
author
AWS
committed
Amazon Bedrock Runtime Update: Provides ServiceUnavailableException error message
1 parent b2dd2e7 commit 8b29b1b

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Bedrock Runtime",
4+
"contributor": "",
5+
"description": "Provides ServiceUnavailableException error message"
6+
}

services/bedrockruntime/src/main/resources/codegen-resources/service-2.json

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
"version":"2.0",
33
"metadata":{
44
"apiVersion":"2023-09-30",
5+
"auth":["aws.auth#sigv4"],
56
"endpointPrefix":"bedrock-runtime",
6-
"jsonVersion":"1.1",
77
"protocol":"rest-json",
8+
"protocols":["rest-json"],
89
"serviceFullName":"Amazon Bedrock Runtime",
910
"serviceId":"Bedrock Runtime",
1011
"signatureVersion":"v4",
@@ -46,11 +47,12 @@
4647
{"shape":"ThrottlingException"},
4748
{"shape":"ModelTimeoutException"},
4849
{"shape":"InternalServerException"},
50+
{"shape":"ServiceUnavailableException"},
4951
{"shape":"ValidationException"},
5052
{"shape":"ModelNotReadyException"},
5153
{"shape":"ModelErrorException"}
5254
],
53-
"documentation":"<p>Sends messages to the specified Amazon Bedrock model. <code>Converse</code> provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model.</p> <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i> </p> <p>For example code, see <i>Converse API examples</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action. </p>"
55+
"documentation":"<p>Sends messages to the specified Amazon Bedrock model. <code>Converse</code> provides a consistent interface that works with all models that support messages. This allows you to write code once and use it with different models. If a model has unique inference parameters, you can also pass those unique parameters to the model.</p> <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> <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i> </p> <p>For example code, see <i>Converse API examples</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action. </p>"
5456
},
5557
"ConverseStream":{
5658
"name":"ConverseStream",
@@ -67,11 +69,12 @@
6769
{"shape":"ThrottlingException"},
6870
{"shape":"ModelTimeoutException"},
6971
{"shape":"InternalServerException"},
72+
{"shape":"ServiceUnavailableException"},
7073
{"shape":"ValidationException"},
7174
{"shape":"ModelNotReadyException"},
7275
{"shape":"ModelErrorException"}
7376
],
74-
"documentation":"<p>Sends messages to the specified Amazon Bedrock model and returns the response in a stream. <code>ConverseStream</code> provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model. </p> <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> and check the <code>responseStreamingSupported</code> field in the response.</p> <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i> </p> <p>For example code, see <i>Conversation streaming example</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permission for the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>"
77+
"documentation":"<p>Sends messages to the specified Amazon Bedrock model and returns the response in a stream. <code>ConverseStream</code> provides a consistent API that works with all Amazon Bedrock models that support messages. This allows you to write code once and use it with different models. Should a model have unique inference parameters, you can also pass those unique parameters to the model. </p> <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> 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>ConverseStream</code>.</p> </note> <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> <p>For information about the Converse API, see <i>Use the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a guardrail, see <i>Use a guardrail with the Converse API</i> in the <i>Amazon Bedrock User Guide</i>. To use a tool with a model, see <i>Tool use (Function calling)</i> in the <i>Amazon Bedrock User Guide</i> </p> <p>For example code, see <i>Conversation streaming example</i> in the <i>Amazon Bedrock User Guide</i>. </p> <p>This operation requires permission for the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>"
7578
},
7679
"InvokeModel":{
7780
"name":"InvokeModel",
@@ -88,6 +91,7 @@
8891
{"shape":"ThrottlingException"},
8992
{"shape":"ModelTimeoutException"},
9093
{"shape":"InternalServerException"},
94+
{"shape":"ServiceUnavailableException"},
9195
{"shape":"ValidationException"},
9296
{"shape":"ModelNotReadyException"},
9397
{"shape":"ServiceQuotaExceededException"},
@@ -110,13 +114,14 @@
110114
{"shape":"ThrottlingException"},
111115
{"shape":"ModelTimeoutException"},
112116
{"shape":"InternalServerException"},
117+
{"shape":"ServiceUnavailableException"},
113118
{"shape":"ModelStreamErrorException"},
114119
{"shape":"ValidationException"},
115120
{"shape":"ModelNotReadyException"},
116121
{"shape":"ServiceQuotaExceededException"},
117122
{"shape":"ModelErrorException"}
118123
],
119-
"documentation":"<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 <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>"
124+
"documentation":"<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>"
120125
}
121126
},
122127
"shapes":{
@@ -519,6 +524,10 @@
519524
"throttlingException":{
520525
"shape":"ThrottlingException",
521526
"documentation":"<p>The number of requests exceeds the limit. Resubmit your request later.</p>"
527+
},
528+
"serviceUnavailableException":{
529+
"shape":"ServiceUnavailableException",
530+
"documentation":"<p>The service isn't currently available. Try again later.</p>"
522531
}
523532
},
524533
"documentation":"<p>The messages output stream</p>",
@@ -1768,12 +1777,13 @@
17681777
},
17691778
"throttlingException":{
17701779
"shape":"ThrottlingException",
1771-
"documentation":"<p>The number or frequency of requests exceeds the limit. Resubmit your request later.</p>"
1780+
"documentation":"<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>"
17721781
},
17731782
"modelTimeoutException":{
17741783
"shape":"ModelTimeoutException",
17751784
"documentation":"<p>The request took too long to process. Processing time exceeded the model timeout length.</p>"
1776-
}
1785+
},
1786+
"serviceUnavailableException":{"shape":"ServiceUnavailableException"}
17771787
},
17781788
"documentation":"<p>Definition of content in the response stream.</p>",
17791789
"eventstream":true
@@ -1783,13 +1793,23 @@
17831793
"members":{
17841794
"message":{"shape":"NonBlankString"}
17851795
},
1786-
"documentation":"<p>The number of requests exceeds the service quota. Resubmit your request later.</p>",
1796+
"documentation":"<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>",
17871797
"error":{
17881798
"httpStatusCode":400,
17891799
"senderFault":true
17901800
},
17911801
"exception":true
17921802
},
1803+
"ServiceUnavailableException":{
1804+
"type":"structure",
1805+
"members":{
1806+
"message":{"shape":"NonBlankString"}
1807+
},
1808+
"documentation":"<p>The service isn't currently available. Try again later.</p>",
1809+
"error":{"httpStatusCode":503},
1810+
"exception":true,
1811+
"fault":true
1812+
},
17931813
"SpecificToolChoice":{
17941814
"type":"structure",
17951815
"required":["name"],
@@ -1843,7 +1863,7 @@
18431863
"members":{
18441864
"message":{"shape":"NonBlankString"}
18451865
},
1846-
"documentation":"<p>The number of requests exceeds the limit. Resubmit your request later.</p>",
1866+
"documentation":"<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>",
18471867
"error":{
18481868
"httpStatusCode":429,
18491869
"senderFault":true

0 commit comments

Comments
 (0)