From 690bc7f848c59958ce107628d424aa5c750a2120 Mon Sep 17 00:00:00 2001
From: awstools The specified resource ARN was not found. Check the ARN and try your request again. The number of requests exceeds the service quota. Resubmit your request later. Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later. The number of requests exceeds the limit. Resubmit your request later. Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process. Input validation failed. Check your request parameters and retry the request. Sends messages to the specified Amazon Bedrock model. Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response. For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide.
* To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.
* To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide
@@ -395,8 +396,11 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
* @throws {@link ResourceNotFoundException} (client fault)
* The specified resource ARN was not found. Check the ARN and try your request again. The service isn't currently available. Try again later. The number of requests exceeds the limit. Resubmit your request later. Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process. Input validation failed. Check your request parameters and retry the request.Converse
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
+ * If a model has unique inference parameters, you can also pass those unique parameters
* to the model.
To find out if a model supports streaming, call GetFoundationModel
* and check the responseStreamingSupported
field in the response.
The CLI doesn't support streaming operations in Amazon Bedrock, including ConverseStream
.
Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.
*For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide. * To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide. * To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide @@ -359,6 +363,9 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M * // throttlingException: { // ThrottlingException * // message: "STRING_VALUE", * // }, + * // serviceUnavailableException: { // ServiceUnavailableException + * // message: "STRING_VALUE", + * // }, * // }, * // }; * @@ -388,8 +395,11 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M * @throws {@link ResourceNotFoundException} (client fault) *
The specified resource ARN was not found. Check the ARN and try your request again.
* + * @throws {@link ServiceUnavailableException} (server fault) + *The service isn't currently available. Try again later.
+ * * @throws {@link ThrottlingException} (client fault) - *The number of requests exceeds the limit. Resubmit your request later.
+ *Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.
* * @throws {@link ValidationException} (client fault) *Input validation failed. Check your request parameters and retry the request.
diff --git a/clients/client-bedrock-runtime/src/commands/InvokeModelCommand.ts b/clients/client-bedrock-runtime/src/commands/InvokeModelCommand.ts index 591638ba92b47..ab2a99ac829ca 100644 --- a/clients/client-bedrock-runtime/src/commands/InvokeModelCommand.ts +++ b/clients/client-bedrock-runtime/src/commands/InvokeModelCommand.ts @@ -102,10 +102,13 @@ export interface InvokeModelCommandOutput extends InvokeModelCommandOutputType, *The specified resource ARN was not found. Check the ARN and try your request again.
* * @throws {@link ServiceQuotaExceededException} (client fault) - *The number of requests exceeds the service quota. Resubmit your request later.
+ *Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.
+ * + * @throws {@link ServiceUnavailableException} (server fault) + *The service isn't currently available. Try again later.
* * @throws {@link ThrottlingException} (client fault) - *The number of requests exceeds the limit. Resubmit your request later.
+ *Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.
* * @throws {@link ValidationException} (client fault) *Input validation failed. Check your request parameters and retry the request.
diff --git a/clients/client-bedrock-runtime/src/commands/InvokeModelWithResponseStreamCommand.ts b/clients/client-bedrock-runtime/src/commands/InvokeModelWithResponseStreamCommand.ts index adb80b969f307..f4a82ca6e17f7 100644 --- a/clients/client-bedrock-runtime/src/commands/InvokeModelWithResponseStreamCommand.ts +++ b/clients/client-bedrock-runtime/src/commands/InvokeModelWithResponseStreamCommand.ts @@ -49,7 +49,7 @@ export interface InvokeModelWithResponseStreamCommandOutput *To see if a model supports streaming, call GetFoundationModel
* and check the responseStreamingSupported
field in the response.
The CLI doesn't support InvokeModelWithResponseStream
.
The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream
.
For example code, see Invoke model with streaming code * example in the Amazon Bedrock User Guide. @@ -94,6 +94,9 @@ export interface InvokeModelWithResponseStreamCommandOutput * // modelTimeoutException: { // ModelTimeoutException * // message: "STRING_VALUE", * // }, + * // serviceUnavailableException: { // ServiceUnavailableException + * // message: "STRING_VALUE", + * // }, * // }, * // contentType: "STRING_VALUE", // required * // }; @@ -128,10 +131,13 @@ export interface InvokeModelWithResponseStreamCommandOutput *
The specified resource ARN was not found. Check the ARN and try your request again.
* * @throws {@link ServiceQuotaExceededException} (client fault) - *The number of requests exceeds the service quota. Resubmit your request later.
+ *Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.
+ * + * @throws {@link ServiceUnavailableException} (server fault) + *The service isn't currently available. Try again later.
* * @throws {@link ThrottlingException} (client fault) - *The number of requests exceeds the limit. Resubmit your request later.
+ *Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.
* * @throws {@link ValidationException} (client fault) *Input validation failed. Check your request parameters and retry the request.
diff --git a/clients/client-bedrock-runtime/src/models/models_0.ts b/clients/client-bedrock-runtime/src/models/models_0.ts index cb83451b5114c..1929dc53f1bb4 100644 --- a/clients/client-bedrock-runtime/src/models/models_0.ts +++ b/clients/client-bedrock-runtime/src/models/models_0.ts @@ -748,7 +748,7 @@ export class ResourceNotFoundException extends __BaseException { } /** - *The number of requests exceeds the service quota. Resubmit your request later.
+ *Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.
* @public */ export class ServiceQuotaExceededException extends __BaseException { @@ -768,7 +768,7 @@ export class ServiceQuotaExceededException extends __BaseException { } /** - *The number of requests exceeds the limit. Resubmit your request later.
+ *Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.
* @public */ export class ThrottlingException extends __BaseException { @@ -2104,6 +2104,26 @@ export class ModelTimeoutException extends __BaseException { } } +/** + *The service isn't currently available. Try again later.
+ * @public + */ +export class ServiceUnavailableException extends __BaseException { + readonly name: "ServiceUnavailableException" = "ServiceUnavailableException"; + readonly $fault: "server" = "server"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThe service isn't currently available. Try again later.
+ * @public + */ + export interface ServiceUnavailableExceptionMember { + messageStart?: never; + contentBlockStart?: never; + contentBlockDelta?: never; + contentBlockStop?: never; + messageStop?: never; + metadata?: never; + internalServerException?: never; + modelStreamErrorException?: never; + validationException?: never; + throttlingException?: never; + serviceUnavailableException: ServiceUnavailableException; $unknown?: never; } @@ -2735,6 +2785,7 @@ export namespace ConverseStreamOutput { modelStreamErrorException?: never; validationException?: never; throttlingException?: never; + serviceUnavailableException?: never; $unknown: [string, any]; } @@ -2749,6 +2800,7 @@ export namespace ConverseStreamOutput { modelStreamErrorException: (value: ModelStreamErrorException) => T; validationException: (value: ValidationException) => T; throttlingException: (value: ThrottlingException) => T; + serviceUnavailableException: (value: ServiceUnavailableException) => T; _: (name: string, value: any) => T; } @@ -2765,6 +2817,8 @@ export namespace ConverseStreamOutput { return visitor.modelStreamErrorException(value.modelStreamErrorException); if (value.validationException !== undefined) return visitor.validationException(value.validationException); if (value.throttlingException !== undefined) return visitor.throttlingException(value.throttlingException); + if (value.serviceUnavailableException !== undefined) + return visitor.serviceUnavailableException(value.serviceUnavailableException); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -2979,6 +3033,7 @@ export type ResponseStream = | ResponseStream.InternalServerExceptionMember | ResponseStream.ModelStreamErrorExceptionMember | ResponseStream.ModelTimeoutExceptionMember + | ResponseStream.ServiceUnavailableExceptionMember | ResponseStream.ThrottlingExceptionMember | ResponseStream.ValidationExceptionMember | ResponseStream.$UnknownMember; @@ -2998,6 +3053,7 @@ export namespace ResponseStream { validationException?: never; throttlingException?: never; modelTimeoutException?: never; + serviceUnavailableException?: never; $unknown?: never; } @@ -3012,6 +3068,7 @@ export namespace ResponseStream { validationException?: never; throttlingException?: never; modelTimeoutException?: never; + serviceUnavailableException?: never; $unknown?: never; } @@ -3026,6 +3083,7 @@ export namespace ResponseStream { validationException?: never; throttlingException?: never; modelTimeoutException?: never; + serviceUnavailableException?: never; $unknown?: never; } @@ -3040,11 +3098,12 @@ export namespace ResponseStream { validationException: ValidationException; throttlingException?: never; modelTimeoutException?: never; + serviceUnavailableException?: never; $unknown?: never; } /** - *The number or frequency of requests exceeds the limit. Resubmit your request later.
+ *Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.
* @public */ export interface ThrottlingExceptionMember { @@ -3054,6 +3113,7 @@ export namespace ResponseStream { validationException?: never; throttlingException: ThrottlingException; modelTimeoutException?: never; + serviceUnavailableException?: never; $unknown?: never; } @@ -3068,6 +3128,22 @@ export namespace ResponseStream { validationException?: never; throttlingException?: never; modelTimeoutException: ModelTimeoutException; + serviceUnavailableException?: never; + $unknown?: never; + } + + /** + *The service isn't currently available. Try again later.
+ * @public + */ + export interface ServiceUnavailableExceptionMember { + chunk?: never; + internalServerException?: never; + modelStreamErrorException?: never; + validationException?: never; + throttlingException?: never; + modelTimeoutException?: never; + serviceUnavailableException: ServiceUnavailableException; $unknown?: never; } @@ -3081,6 +3157,7 @@ export namespace ResponseStream { validationException?: never; throttlingException?: never; modelTimeoutException?: never; + serviceUnavailableException?: never; $unknown: [string, any]; } @@ -3091,6 +3168,7 @@ export namespace ResponseStream { validationException: (value: ValidationException) => T; throttlingException: (value: ThrottlingException) => T; modelTimeoutException: (value: ModelTimeoutException) => T; + serviceUnavailableException: (value: ServiceUnavailableException) => T; _: (name: string, value: any) => T; } @@ -3103,6 +3181,8 @@ export namespace ResponseStream { if (value.validationException !== undefined) return visitor.validationException(value.validationException); if (value.throttlingException !== undefined) return visitor.throttlingException(value.throttlingException); if (value.modelTimeoutException !== undefined) return visitor.modelTimeoutException(value.modelTimeoutException); + if (value.serviceUnavailableException !== undefined) + return visitor.serviceUnavailableException(value.serviceUnavailableException); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -3138,6 +3218,8 @@ export const ConverseStreamOutputFilterSensitiveLog = (obj: ConverseStreamOutput if (obj.modelStreamErrorException !== undefined) return { modelStreamErrorException: obj.modelStreamErrorException }; if (obj.validationException !== undefined) return { validationException: obj.validationException }; if (obj.throttlingException !== undefined) return { throttlingException: obj.throttlingException }; + if (obj.serviceUnavailableException !== undefined) + return { serviceUnavailableException: obj.serviceUnavailableException }; if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; }; @@ -3193,6 +3275,8 @@ export const ResponseStreamFilterSensitiveLog = (obj: ResponseStream): any => { if (obj.validationException !== undefined) return { validationException: obj.validationException }; if (obj.throttlingException !== undefined) return { throttlingException: obj.throttlingException }; if (obj.modelTimeoutException !== undefined) return { modelTimeoutException: obj.modelTimeoutException }; + if (obj.serviceUnavailableException !== undefined) + return { serviceUnavailableException: obj.serviceUnavailableException }; if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; }; diff --git a/clients/client-bedrock-runtime/src/protocols/Aws_restJson1.ts b/clients/client-bedrock-runtime/src/protocols/Aws_restJson1.ts index ea41092086330..20d2e00dc00fc 100644 --- a/clients/client-bedrock-runtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-bedrock-runtime/src/protocols/Aws_restJson1.ts @@ -81,6 +81,7 @@ import { ResourceNotFoundException, ResponseStream, ServiceQuotaExceededException, + ServiceUnavailableException, SpecificToolChoice, SystemContentBlock, ThrottlingException, @@ -371,6 +372,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "ModelTimeoutException": case "com.amazonaws.bedrockruntime#ModelTimeoutException": throw await de_ModelTimeoutExceptionRes(parsedOutput, context); + case "ServiceUnavailableException": + case "com.amazonaws.bedrockruntime#ServiceUnavailableException": + throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); case "ModelStreamErrorException": case "com.amazonaws.bedrockruntime#ModelStreamErrorException": throw await de_ModelStreamErrorExceptionRes(parsedOutput, context); @@ -546,6 +550,26 @@ const de_ServiceQuotaExceededExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; +/** + * deserializeAws_restJson1ServiceUnavailableExceptionRes + */ +const de_ServiceUnavailableExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): PromiseSends messages to the specified Amazon Bedrock model. Converse
provides\n a consistent interface that works with all models that\n support messages. This allows you to write code once and use it with different models.\n Should a model have unique inference parameters, you can also pass those unique parameters\n to the model.
For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide.\n To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.\n To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide\n
\nFor example code, see Converse API examples in the Amazon Bedrock User Guide.\n
\nThis operation requires permission for the bedrock:InvokeModel
action.
Sends messages to the specified Amazon Bedrock model. Converse
provides\n a consistent interface that works with all models that\n support messages. This allows you to write code once and use it with different models.\n If a model has unique inference parameters, you can also pass those unique parameters\n to the model.
Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.
\nFor information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide.\n To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.\n To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide\n
\nFor example code, see Converse API examples in the Amazon Bedrock User Guide.\n
\nThis operation requires permission for the bedrock:InvokeModel
action.
Sends messages to the specified Amazon Bedrock model and returns\n the response in a stream. ConverseStream
provides a consistent API\n that works with all Amazon Bedrock models that support messages.\n This allows you to write code once and use it with different models. Should a\n model have unique inference parameters, you can also pass those unique parameters to the\n model.
To find out if a model supports streaming, call GetFoundationModel\n and check the responseStreamingSupported
field in the response.
For information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide.\n To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.\n To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide\n
\nFor example code, see Conversation streaming example in the Amazon Bedrock User Guide.\n
\nThis operation requires permission for the bedrock:InvokeModelWithResponseStream
action.
Sends messages to the specified Amazon Bedrock model and returns\n the response in a stream. ConverseStream
provides a consistent API\n that works with all Amazon Bedrock models that support messages.\n This allows you to write code once and use it with different models. Should a\n model have unique inference parameters, you can also pass those unique parameters to the\n model.
To find out if a model supports streaming, call GetFoundationModel\n and check the responseStreamingSupported
field in the response.
The CLI doesn't support streaming operations in Amazon Bedrock, including ConverseStream
.
Amazon Bedrock doesn't store any text, images, or documents that you provide as content. The data is only used to generate the response.
\nFor information about the Converse API, see Use the Converse API in the Amazon Bedrock User Guide.\n To use a guardrail, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.\n To use a tool with a model, see Tool use (Function calling) in the Amazon Bedrock User Guide\n
\nFor example code, see Conversation streaming example in the Amazon Bedrock User Guide.\n
\nThis operation requires permission for the bedrock:InvokeModelWithResponseStream
action.
The number of requests exceeds the limit. Resubmit your request later.
" } + }, + "serviceUnavailableException": { + "target": "com.amazonaws.bedrockruntime#ServiceUnavailableException", + "traits": { + "smithy.api#documentation": "The service isn't currently available. Try again later.
" + } } }, "traits": { @@ -2930,6 +2942,9 @@ { "target": "com.amazonaws.bedrockruntime#ServiceQuotaExceededException" }, + { + "target": "com.amazonaws.bedrockruntime#ServiceUnavailableException" + }, { "target": "com.amazonaws.bedrockruntime#ThrottlingException" }, @@ -3072,6 +3087,9 @@ { "target": "com.amazonaws.bedrockruntime#ServiceQuotaExceededException" }, + { + "target": "com.amazonaws.bedrockruntime#ServiceUnavailableException" + }, { "target": "com.amazonaws.bedrockruntime#ThrottlingException" }, @@ -3080,7 +3098,7 @@ } ], "traits": { - "smithy.api#documentation": "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.
\nTo see if a model supports streaming, call GetFoundationModel\n and check the responseStreamingSupported
field in the response.
The CLI doesn't support InvokeModelWithResponseStream
.
For example code, see Invoke model with streaming code\n example in the Amazon Bedrock User Guide.\n
\nThis operation requires permissions to perform the bedrock:InvokeModelWithResponseStream
action.
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.
\nTo see if a model supports streaming, call GetFoundationModel\n and check the responseStreamingSupported
field in the response.
The CLI doesn't support streaming operations in Amazon Bedrock, including InvokeModelWithResponseStream
.
For example code, see Invoke model with streaming code\n example in the Amazon Bedrock User Guide.\n
\nThis operation requires permissions to perform the bedrock:InvokeModelWithResponseStream
action.
The number or frequency of requests exceeds the limit. Resubmit your request later.
" + "smithy.api#documentation": "Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.
" } }, "modelTimeoutException": { @@ -3423,6 +3441,9 @@ "traits": { "smithy.api#documentation": "The request took too long to process. Processing time exceeded the model timeout length.
" } + }, + "serviceUnavailableException": { + "target": "com.amazonaws.bedrockruntime#ServiceUnavailableException" } }, "traits": { @@ -3438,11 +3459,24 @@ } }, "traits": { - "smithy.api#documentation": "The number of requests exceeds the service quota. Resubmit your request later.
", + "smithy.api#documentation": "Your request exceeds the service quota for your account. You can view your quotas at Viewing service quotas. You can resubmit your request later.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, + "com.amazonaws.bedrockruntime#ServiceUnavailableException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "The service isn't currently available. Try again later.
", + "smithy.api#error": "server", + "smithy.api#httpError": 503 + } + }, "com.amazonaws.bedrockruntime#SpecificToolChoice": { "type": "structure", "members": { @@ -3542,7 +3576,7 @@ } }, "traits": { - "smithy.api#documentation": "The number of requests exceeds the limit. Resubmit your request later.
", + "smithy.api#documentation": "Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase Provisioned Throughput to increase the rate or number of tokens you can process.
", "smithy.api#error": "client", "smithy.api#httpError": 429 }