diff --git a/.changelog/0b35e0f7825543d7a73bb2a00f51e460.json b/.changelog/0b35e0f7825543d7a73bb2a00f51e460.json new file mode 100644 index 00000000000..ea494784ad7 --- /dev/null +++ b/.changelog/0b35e0f7825543d7a73bb2a00f51e460.json @@ -0,0 +1,8 @@ +{ + "id": "0b35e0f7-8255-43d7-a73b-b2a00f51e460", + "type": "feature", + "description": "Added support for passing role arn corresponding to the supported event destination", + "modules": [ + "service/socialmessaging" + ] +} \ No newline at end of file diff --git a/.changelog/12faa025f62d466ebdddb0032bc6ba5a.json b/.changelog/12faa025f62d466ebdddb0032bc6ba5a.json new file mode 100644 index 00000000000..8e920c936fb --- /dev/null +++ b/.changelog/12faa025f62d466ebdddb0032bc6ba5a.json @@ -0,0 +1,8 @@ +{ + "id": "12faa025-f62d-466e-bddd-b0032bc6ba5a", + "type": "feature", + "description": "It allows customers to pass CRC64NVME as a header in S3 Batch Operations copy requests", + "modules": [ + "service/s3control" + ] +} \ No newline at end of file diff --git a/.changelog/3b18c5dae00d432fb0c317978c710516.json b/.changelog/3b18c5dae00d432fb0c317978c710516.json new file mode 100644 index 00000000000..c9937d31c12 --- /dev/null +++ b/.changelog/3b18c5dae00d432fb0c317978c710516.json @@ -0,0 +1,8 @@ +{ + "id": "3b18c5da-e00d-432f-b0c3-17978c710516", + "type": "feature", + "description": "Add an API parameter that allows customers to set performance configuration for invoking a model.", + "modules": [ + "service/bedrockruntime" + ] +} \ No newline at end of file diff --git a/service/bedrockruntime/api_op_Converse.go b/service/bedrockruntime/api_op_Converse.go index 88d86429504..ae1aacaf647 100644 --- a/service/bedrockruntime/api_op_Converse.go +++ b/service/bedrockruntime/api_op_Converse.go @@ -42,6 +42,19 @@ import ( // // This operation requires permission for the bedrock:InvokeModel action. // +// To deny all inference access to resources that you specify in the modelId +// field, you need to deny access to the bedrock:InvokeModel and +// bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to +// the resource through the base inference actions ([InvokeModel] and [InvokeModelWithResponseStream]). For more information +// see [Deny access for inference on specific models]. +// +// For troubleshooting some of the common errors you might encounter when using +// the Converse API, see [Troubleshooting Amazon Bedrock API Error Codes] in the Amazon Bedrock User Guide +// +// [InvokeModelWithResponseStream]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html +// [Troubleshooting Amazon Bedrock API Error Codes]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html +// [Deny access for inference on specific models]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference +// [InvokeModel]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // [Use a prompt from Prompt management]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html func (c *Client) Converse(ctx context.Context, params *ConverseInput, optFns ...func(*Options)) (*ConverseOutput, error) { if params == nil { @@ -77,13 +90,14 @@ type ConverseInput struct { // Then specify the ARN of the resulting provisioned model. For more information, // see [Use a custom model in Amazon Bedrock]in the Amazon Bedrock User Guide. // - // - To include a prompt that was defined in Prompt management, specify the ARN - // of the prompt version to use. + // - To include a prompt that was defined in [Prompt management], specify the ARN of the prompt + // version to use. // // The Converse API doesn't support [imported models]. // // [Run inference using a Provisioned Throughput]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html // [Use a custom model in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html + // [Prompt management]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html // [Supported Regions and models for cross-region inference]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html // [imported models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html // [Amazon Bedrock base model IDs (on-demand throughput)]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns @@ -129,6 +143,9 @@ type ConverseInput struct { // The messages that you want to send to the model. Messages []types.Message + // Model performance settings for the request. + PerformanceConfig *types.PerformanceConfiguration + // Contains a map of variables in a prompt from Prompt management to objects // containing the values to fill in for them when running model invocation. This // field is ignored if you don't specify a prompt resource in the modelId field. @@ -174,6 +191,9 @@ type ConverseOutput struct { // Additional fields in the response that are unique to the model. AdditionalModelResponseFields document.Interface + // Model performance settings for the request. + PerformanceConfig *types.PerformanceConfiguration + // A trace object that contains information about the Guardrail behavior. Trace *types.ConverseTrace diff --git a/service/bedrockruntime/api_op_ConverseStream.go b/service/bedrockruntime/api_op_ConverseStream.go index 795bf3e5035..0f566234e5e 100644 --- a/service/bedrockruntime/api_op_ConverseStream.go +++ b/service/bedrockruntime/api_op_ConverseStream.go @@ -51,7 +51,20 @@ import ( // This operation requires permission for the bedrock:InvokeModelWithResponseStream // action. // +// To deny all inference access to resources that you specify in the modelId +// field, you need to deny access to the bedrock:InvokeModel and +// bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to +// the resource through the base inference actions ([InvokeModel] and [InvokeModelWithResponseStream]). For more information +// see [Deny access for inference on specific models]. +// +// For troubleshooting some of the common errors you might encounter when using +// the ConverseStream API, see [Troubleshooting Amazon Bedrock API Error Codes] in the Amazon Bedrock User Guide +// +// [InvokeModelWithResponseStream]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html // [GetFoundationModel]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html +// [Troubleshooting Amazon Bedrock API Error Codes]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html +// [Deny access for inference on specific models]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference +// [InvokeModel]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html // [Use a prompt from Prompt management]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-use.html func (c *Client) ConverseStream(ctx context.Context, params *ConverseStreamInput, optFns ...func(*Options)) (*ConverseStreamOutput, error) { if params == nil { @@ -87,13 +100,14 @@ type ConverseStreamInput struct { // Then specify the ARN of the resulting provisioned model. For more information, // see [Use a custom model in Amazon Bedrock]in the Amazon Bedrock User Guide. // - // - To include a prompt that was defined in Prompt management, specify the ARN - // of the prompt version to use. + // - To include a prompt that was defined in [Prompt management], specify the ARN of the prompt + // version to use. // // The Converse API doesn't support [imported models]. // // [Run inference using a Provisioned Throughput]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html // [Use a custom model in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html + // [Prompt management]: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html // [Supported Regions and models for cross-region inference]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html // [imported models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html // [Amazon Bedrock base model IDs (on-demand throughput)]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns @@ -139,6 +153,9 @@ type ConverseStreamInput struct { // The messages that you want to send to the model. Messages []types.Message + // Model performance settings for the request. + PerformanceConfig *types.PerformanceConfiguration + // Contains a map of variables in a prompt from Prompt management to objects // containing the values to fill in for them when running model invocation. This // field is ignored if you don't specify a prompt resource in the modelId field. diff --git a/service/bedrockruntime/api_op_InvokeModel.go b/service/bedrockruntime/api_op_InvokeModel.go index d9b02da3a43..e4b63131953 100644 --- a/service/bedrockruntime/api_op_InvokeModel.go +++ b/service/bedrockruntime/api_op_InvokeModel.go @@ -19,6 +19,20 @@ import ( // Guide. // // This operation requires permission for the bedrock:InvokeModel action. +// +// To deny all inference access to resources that you specify in the modelId +// field, you need to deny access to the bedrock:InvokeModel and +// bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to +// the resource through the Converse API actions ([Converse] and [ConverseStream]). For more information see [Deny access for inference on specific models] +// . +// +// For troubleshooting some of the common errors you might encounter when using +// the InvokeModel API, see [Troubleshooting Amazon Bedrock API Error Codes] in the Amazon Bedrock User Guide +// +// [Converse]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html +// [ConverseStream]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html +// [Troubleshooting Amazon Bedrock API Error Codes]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html +// [Deny access for inference on specific models]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference func (c *Client) InvokeModel(ctx context.Context, params *InvokeModelInput, optFns ...func(*Options)) (*InvokeModelOutput, error) { if params == nil { params = &InvokeModelInput{} @@ -38,11 +52,15 @@ type InvokeModelInput struct { // The unique identifier of the model to invoke to run inference. // - // The modelId to provide depends on the type of model that you use: + // The modelId to provide depends on the type of model or throughput that you use: // // - If you use a base model, specify the model ID or its ARN. For a list of // model IDs for base models, see [Amazon Bedrock base model IDs (on-demand throughput)]in the Amazon Bedrock User Guide. // + // - If you use an inference profile, specify the inference profile ID or its + // ARN. For a list of inference profile IDs, see [Supported Regions and models for cross-region inference]in the Amazon Bedrock User + // Guide. + // // - If you use a provisioned model, specify the ARN of the Provisioned // Throughput. For more information, see [Run inference using a Provisioned Throughput]in the Amazon Bedrock User Guide. // @@ -58,6 +76,7 @@ type InvokeModelInput struct { // [Use a custom model in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html // [imported model]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html // [CreateModelImportJob]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html + // [Supported Regions and models for cross-region inference]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html // [Amazon Bedrock base model IDs (on-demand throughput)]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns // // This member is required. @@ -96,6 +115,9 @@ type InvokeModelInput struct { // The version number for the guardrail. The value can also be DRAFT . GuardrailVersion *string + // Model performance settings for the request. + PerformanceConfigLatency types.PerformanceConfigLatency + // Specifies whether to enable or disable the Bedrock trace. If enabled, you can // see the full Bedrock trace. Trace types.Trace @@ -119,6 +141,9 @@ type InvokeModelOutput struct { // This member is required. ContentType *string + // Model performance settings for the request. + PerformanceConfigLatency types.PerformanceConfigLatency + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go b/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go index 9ea1f2afa33..193a843ec54 100644 --- a/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go +++ b/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go @@ -28,7 +28,20 @@ import ( // This operation requires permissions to perform the // bedrock:InvokeModelWithResponseStream action. // +// To deny all inference access to resources that you specify in the modelId +// field, you need to deny access to the bedrock:InvokeModel and +// bedrock:InvokeModelWithResponseStream actions. Doing this also denies access to +// the resource through the Converse API actions ([Converse] and [ConverseStream]). For more information see [Deny access for inference on specific models] +// . +// +// For troubleshooting some of the common errors you might encounter when using +// the InvokeModelWithResponseStream API, see [Troubleshooting Amazon Bedrock API Error Codes] in the Amazon Bedrock User Guide +// // [GetFoundationModel]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModel.html +// [Converse]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html +// [ConverseStream]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html +// [Troubleshooting Amazon Bedrock API Error Codes]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html +// [Deny access for inference on specific models]: https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference func (c *Client) InvokeModelWithResponseStream(ctx context.Context, params *InvokeModelWithResponseStreamInput, optFns ...func(*Options)) (*InvokeModelWithResponseStreamOutput, error) { if params == nil { params = &InvokeModelWithResponseStreamInput{} @@ -48,11 +61,15 @@ type InvokeModelWithResponseStreamInput struct { // The unique identifier of the model to invoke to run inference. // - // The modelId to provide depends on the type of model that you use: + // The modelId to provide depends on the type of model or throughput that you use: // // - If you use a base model, specify the model ID or its ARN. For a list of // model IDs for base models, see [Amazon Bedrock base model IDs (on-demand throughput)]in the Amazon Bedrock User Guide. // + // - If you use an inference profile, specify the inference profile ID or its + // ARN. For a list of inference profile IDs, see [Supported Regions and models for cross-region inference]in the Amazon Bedrock User + // Guide. + // // - If you use a provisioned model, specify the ARN of the Provisioned // Throughput. For more information, see [Run inference using a Provisioned Throughput]in the Amazon Bedrock User Guide. // @@ -68,6 +85,7 @@ type InvokeModelWithResponseStreamInput struct { // [Use a custom model in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html // [imported model]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html // [CreateModelImportJob]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_CreateModelImportJob.html + // [Supported Regions and models for cross-region inference]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html // [Amazon Bedrock base model IDs (on-demand throughput)]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns // // This member is required. @@ -106,6 +124,9 @@ type InvokeModelWithResponseStreamInput struct { // The version number for the guardrail. The value can also be DRAFT . GuardrailVersion *string + // Model performance settings for the request. + PerformanceConfigLatency types.PerformanceConfigLatency + // Specifies whether to enable or disable the Bedrock trace. If enabled, you can // see the full Bedrock trace. Trace types.Trace @@ -120,6 +141,9 @@ type InvokeModelWithResponseStreamOutput struct { // This member is required. ContentType *string + // Model performance settings for the request. + PerformanceConfigLatency types.PerformanceConfigLatency + eventStream *InvokeModelWithResponseStreamEventStream // Metadata pertaining to the operation's result. diff --git a/service/bedrockruntime/deserializers.go b/service/bedrockruntime/deserializers.go index fcf172ae5c0..792cb80ac0d 100644 --- a/service/bedrockruntime/deserializers.go +++ b/service/bedrockruntime/deserializers.go @@ -403,6 +403,11 @@ func awsRestjson1_deserializeOpDocumentConverseOutput(v **ConverseOutput, value return err } + case "performanceConfig": + if err := awsRestjson1_deserializeDocumentPerformanceConfiguration(&sv.PerformanceConfig, value); err != nil { + return err + } + case "stopReason": if value != nil { jtv, ok := value.(string) @@ -678,6 +683,11 @@ func awsRestjson1_deserializeOpHttpBindingsInvokeModelOutput(v *InvokeModelOutpu v.ContentType = ptr.String(headerValues[0]) } + if headerValues := response.Header.Values("X-Amzn-Bedrock-PerformanceConfig-Latency"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PerformanceConfigLatency = types.PerformanceConfigLatency(headerValues[0]) + } + return nil } func awsRestjson1_deserializeOpDocumentInvokeModelOutput(v *InvokeModelOutput, body io.ReadCloser, contentLength int64) error { @@ -835,6 +845,11 @@ func awsRestjson1_deserializeOpHttpBindingsInvokeModelWithResponseStreamOutput(v v.ContentType = ptr.String(headerValues[0]) } + if headerValues := response.Header.Values("X-Amzn-Bedrock-PerformanceConfig-Latency"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.PerformanceConfigLatency = types.PerformanceConfigLatency(headerValues[0]) + } + return nil } func awsRestjson1_deserializeEventStreamResponseStream(v *types.ResponseStream, msg *eventstream.Message) error { @@ -2089,6 +2104,11 @@ func awsRestjson1_deserializeDocumentConverseStreamMetadataEvent(v **types.Conve return err } + case "performanceConfig": + if err := awsRestjson1_deserializeDocumentPerformanceConfiguration(&sv.PerformanceConfig, value); err != nil { + return err + } + case "trace": if err := awsRestjson1_deserializeDocumentConverseStreamTrace(&sv.Trace, value); err != nil { return err @@ -3677,6 +3697,46 @@ func awsRestjson1_deserializeDocumentModelOutputs(v *[]string, value interface{} return nil } +func awsRestjson1_deserializeDocumentPerformanceConfiguration(v **types.PerformanceConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PerformanceConfiguration + if *v == nil { + sv = &types.PerformanceConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "latency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PerformanceConfigLatency to be of type string, got %T instead", value) + } + sv.Latency = types.PerformanceConfigLatency(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentTokenUsage(v **types.TokenUsage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/bedrockruntime/serializers.go b/service/bedrockruntime/serializers.go index 196de7c3f98..f2be6279280 100644 --- a/service/bedrockruntime/serializers.go +++ b/service/bedrockruntime/serializers.go @@ -249,6 +249,13 @@ func awsRestjson1_serializeOpDocumentConverseInput(v *ConverseInput, value smith } } + if v.PerformanceConfig != nil { + ok := object.Key("performanceConfig") + if err := awsRestjson1_serializeDocumentPerformanceConfiguration(v.PerformanceConfig, ok); err != nil { + return err + } + } + if v.PromptVariables != nil { ok := object.Key("promptVariables") if err := awsRestjson1_serializeDocumentPromptVariableMap(v.PromptVariables, ok); err != nil { @@ -394,6 +401,13 @@ func awsRestjson1_serializeOpDocumentConverseStreamInput(v *ConverseStreamInput, } } + if v.PerformanceConfig != nil { + ok := object.Key("performanceConfig") + if err := awsRestjson1_serializeDocumentPerformanceConfiguration(v.PerformanceConfig, ok); err != nil { + return err + } + } + if v.PromptVariables != nil { ok := object.Key("promptVariables") if err := awsRestjson1_serializeDocumentPromptVariableMap(v.PromptVariables, ok); err != nil { @@ -518,6 +532,11 @@ func awsRestjson1_serializeOpHttpBindingsInvokeModelInput(v *InvokeModelInput, e } } + if len(v.PerformanceConfigLatency) > 0 { + locationName := "X-Amzn-Bedrock-Performanceconfig-Latency" + encoder.SetHeader(locationName).String(string(v.PerformanceConfigLatency)) + } + if len(v.Trace) > 0 { locationName := "X-Amzn-Bedrock-Trace" encoder.SetHeader(locationName).String(string(v.Trace)) @@ -626,6 +645,11 @@ func awsRestjson1_serializeOpHttpBindingsInvokeModelWithResponseStreamInput(v *I } } + if len(v.PerformanceConfigLatency) > 0 { + locationName := "X-Amzn-Bedrock-Performanceconfig-Latency" + encoder.SetHeader(locationName).String(string(v.PerformanceConfigLatency)) + } + if len(v.Trace) > 0 { locationName := "X-Amzn-Bedrock-Trace" encoder.SetHeader(locationName).String(string(v.Trace)) @@ -1055,6 +1079,18 @@ func awsRestjson1_serializeDocumentNonEmptyStringList(v []string, value smithyjs return nil } +func awsRestjson1_serializeDocumentPerformanceConfiguration(v *types.PerformanceConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Latency) > 0 { + ok := object.Key("latency") + ok.String(string(v.Latency)) + } + + return nil +} + func awsRestjson1_serializeDocumentPromptVariableMap(v map[string]types.PromptVariableValues, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/bedrockruntime/types/enums.go b/service/bedrockruntime/types/enums.go index 726bcd7c415..faa788a0604 100644 --- a/service/bedrockruntime/types/enums.go +++ b/service/bedrockruntime/types/enums.go @@ -495,6 +495,25 @@ func (ImageFormat) Values() []ImageFormat { } } +type PerformanceConfigLatency string + +// Enum values for PerformanceConfigLatency +const ( + PerformanceConfigLatencyStandard PerformanceConfigLatency = "standard" + PerformanceConfigLatencyOptimized PerformanceConfigLatency = "optimized" +) + +// Values returns all known values for PerformanceConfigLatency. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PerformanceConfigLatency) Values() []PerformanceConfigLatency { + return []PerformanceConfigLatency{ + "standard", + "optimized", + } +} + type StopReason string // Enum values for StopReason diff --git a/service/bedrockruntime/types/errors.go b/service/bedrockruntime/types/errors.go index 82ff89b6aa9..da53ca0d0ec 100644 --- a/service/bedrockruntime/types/errors.go +++ b/service/bedrockruntime/types/errors.go @@ -7,7 +7,11 @@ import ( smithy "github.com/aws/smithy-go" ) -// The request is denied because of missing access permissions. +// The request is denied because you do not have sufficient permissions to perform +// the requested action. For troubleshooting this error, see [AccessDeniedException]in the Amazon Bedrock +// User Guide +// +// [AccessDeniedException]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied type AccessDeniedException struct { Message *string @@ -33,7 +37,10 @@ func (e *AccessDeniedException) ErrorCode() string { } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An internal server error occurred. Retry your request. +// An internal server error occurred. For troubleshooting this error, see [InternalFailure] in the +// Amazon Bedrock User Guide +// +// [InternalFailure]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure type InternalServerException struct { Message *string @@ -175,8 +182,10 @@ func (e *ModelTimeoutException) ErrorCode() string { } func (e *ModelTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified resource ARN was not found. Check the ARN and try your request -// again. +// The specified resource ARN was not found. For troubleshooting this error, see [ResourceNotFound] +// in the Amazon Bedrock User Guide +// +// [ResourceNotFound]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found type ResourceNotFoundException struct { Message *string @@ -231,7 +240,10 @@ func (e *ServiceQuotaExceededException) ErrorCode() string { } func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The service isn't currently available. Try again later. +// The service isn't currently available. For troubleshooting this error, see [ServiceUnavailable] in +// the Amazon Bedrock User Guide +// +// [ServiceUnavailable]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable type ServiceUnavailableException struct { Message *string @@ -257,11 +269,10 @@ func (e *ServiceUnavailableException) ErrorCode() string { } func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// 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. +// Your request was denied due to exceeding the account quotas for Amazon Bedrock. +// For troubleshooting this error, see [ThrottlingException]in the Amazon Bedrock User Guide // -// [Provisioned Throughput]: https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html +// [ThrottlingException]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception type ThrottlingException struct { Message *string @@ -287,7 +298,10 @@ func (e *ThrottlingException) ErrorCode() string { } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// Input validation failed. Check your request parameters and retry the request. +// The input fails to satisfy the constraints specified by Amazon Bedrock. For +// troubleshooting this error, see [ValidationError]in the Amazon Bedrock User Guide +// +// [ValidationError]: https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error type ValidationException struct { Message *string diff --git a/service/bedrockruntime/types/types.go b/service/bedrockruntime/types/types.go index df833607e2b..76d85edd661 100644 --- a/service/bedrockruntime/types/types.go +++ b/service/bedrockruntime/types/types.go @@ -233,6 +233,9 @@ type ConverseStreamMetadataEvent struct { // This member is required. Usage *TokenUsage + // Model performance configuration metadata for the conversation stream event. + PerformanceConfig *PerformanceConfiguration + // The trace object in the response from [ConverseStream] that contains information about the // guardrail behavior. // @@ -994,6 +997,15 @@ type PayloadPart struct { noSmithyDocumentSerde } +// Performance settings for a model. +type PerformanceConfiguration struct { + + // To use a latency-optimized version of the model, set to optimized . + Latency PerformanceConfigLatency + + noSmithyDocumentSerde +} + // Contains a map of variables in a prompt from Prompt management to an object // containing the values to fill in for them when running model invocation. For // more information, see [How Prompt management works]. diff --git a/service/dynamodbstreams/internal/endpoints/endpoints.go b/service/dynamodbstreams/internal/endpoints/endpoints.go index 5ab0b41d5e3..a257ad98ea9 100644 --- a/service/dynamodbstreams/internal/endpoints/endpoints.go +++ b/service/dynamodbstreams/internal/endpoints/endpoints.go @@ -190,9 +190,41 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.ca-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-central-1-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.ca-central-1.amazonaws.com", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "ca-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.ca-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.ca-west-1.amazonaws.com", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -241,15 +273,79 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.us-east-1.amazonaws.com", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.us-east-2.amazonaws.com", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.us-west-1.amazonaws.com", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.us-west-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.us-west-2.amazonaws.com", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, }, }, { @@ -337,9 +433,41 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.us-iso-east-1.c2s.ic.gov", + }, + endpoints.EndpointKey{ + Region: "us-iso-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.us-iso-east-1.c2s.ic.gov", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-iso-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.us-iso-west-1.c2s.ic.gov", + }, + endpoints.EndpointKey{ + Region: "us-iso-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.us-iso-west-1.c2s.ic.gov", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: aws.TrueTernary, + }, }, }, { @@ -372,6 +500,22 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "streams.dynamodb-fips.us-isob-east-1.sc2s.sgov.gov", + }, + endpoints.EndpointKey{ + Region: "us-isob-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "streams.dynamodb-fips.us-isob-east-1.sc2s.sgov.gov", + Protocols: []string{"https"}, + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: aws.TrueTernary, + }, }, }, { @@ -470,12 +614,13 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-gov-east-1", Variant: endpoints.FIPSVariant, }: { - Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com", + Hostname: "streams.dynamodb-fips.us-gov-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-gov-east-1-fips", }: endpoints.Endpoint{ - Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com", + Hostname: "streams.dynamodb-fips.us-gov-east-1.amazonaws.com", + Protocols: []string{"https"}, CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, @@ -488,12 +633,13 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-gov-west-1", Variant: endpoints.FIPSVariant, }: { - Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com", + Hostname: "streams.dynamodb-fips.us-gov-west-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-gov-west-1-fips", }: endpoints.Endpoint{ - Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com", + Hostname: "streams.dynamodb-fips.us-gov-west-1.amazonaws.com", + Protocols: []string{"https"}, CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, diff --git a/service/elasticbeanstalk/internal/endpoints/endpoints.go b/service/elasticbeanstalk/internal/endpoints/endpoints.go index fccc4285ff2..fc00ceece44 100644 --- a/service/elasticbeanstalk/internal/endpoints/endpoints.go +++ b/service/elasticbeanstalk/internal/endpoints/endpoints.go @@ -470,9 +470,21 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "elasticbeanstalk.cn-north-1.api.amazonwebservices.com.cn", + }, endpoints.EndpointKey{ Region: "cn-northwest-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "elasticbeanstalk.cn-northwest-1.api.amazonwebservices.com.cn", + }, }, }, { diff --git a/service/s3control/types/enums.go b/service/s3control/types/enums.go index f7d0a07afa5..f1d711bac8a 100644 --- a/service/s3control/types/enums.go +++ b/service/s3control/types/enums.go @@ -780,10 +780,11 @@ type S3ChecksumAlgorithm string // Enum values for S3ChecksumAlgorithm const ( - S3ChecksumAlgorithmCrc32 S3ChecksumAlgorithm = "CRC32" - S3ChecksumAlgorithmCrc32c S3ChecksumAlgorithm = "CRC32C" - S3ChecksumAlgorithmSha1 S3ChecksumAlgorithm = "SHA1" - S3ChecksumAlgorithmSha256 S3ChecksumAlgorithm = "SHA256" + S3ChecksumAlgorithmCrc32 S3ChecksumAlgorithm = "CRC32" + S3ChecksumAlgorithmCrc32c S3ChecksumAlgorithm = "CRC32C" + S3ChecksumAlgorithmSha1 S3ChecksumAlgorithm = "SHA1" + S3ChecksumAlgorithmSha256 S3ChecksumAlgorithm = "SHA256" + S3ChecksumAlgorithmCrc64nvme S3ChecksumAlgorithm = "CRC64NVME" ) // Values returns all known values for S3ChecksumAlgorithm. Note that this can be @@ -796,6 +797,7 @@ func (S3ChecksumAlgorithm) Values() []S3ChecksumAlgorithm { "CRC32C", "SHA1", "SHA256", + "CRC64NVME", } } diff --git a/service/s3control/types/types.go b/service/s3control/types/types.go index 971c41c1cfb..01cbba2bb2d 100644 --- a/service/s3control/types/types.go +++ b/service/s3control/types/types.go @@ -2259,17 +2259,10 @@ type S3CopyObjectOperation struct { // arn:aws:s3:::destinationBucket . // // - Directory buckets - For example, to copy objects to a directory bucket - // named destinationBucket in the Availability Zone identified by the AZ ID + // named destinationBucket in the Availability Zone; identified by the AZ ID // usw2-az1 , set the TargetResource property to // arn:aws:s3express:region:account_id:/bucket/destination_bucket_base_name--usw2-az1--x-s3 - // . A directory bucket as a destination bucket can be in Availability Zone or - // Local Zone. - // - // Copying objects across different Amazon Web Services Regions isn't supported - // when the source or destination bucket is in Amazon Web Services Local Zones. The - // source and destination buckets must have the same parent Amazon Web Services - // Region. Otherwise, you get an HTTP 400 Bad Request error with the error code - // InvalidRequest . + // . TargetResource *string // diff --git a/service/sagemakermetrics/internal/endpoints/endpoints.go b/service/sagemakermetrics/internal/endpoints/endpoints.go index 95f58e0c1ab..41f45852946 100644 --- a/service/sagemakermetrics/internal/endpoints/endpoints.go +++ b/service/sagemakermetrics/internal/endpoints/endpoints.go @@ -175,9 +175,39 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "metrics-fips.sagemaker.ca-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-central-1-fips", + }: endpoints.Endpoint{ + Hostname: "metrics-fips.sagemaker.ca-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "ca-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "metrics-fips.sagemaker.ca-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "metrics-fips.sagemaker.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -217,15 +247,75 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "metrics-fips.sagemaker.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "metrics-fips.sagemaker.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "metrics-fips.sagemaker.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2-fips", + }: endpoints.Endpoint{ + Hostname: "metrics-fips.sagemaker.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "metrics-fips.sagemaker.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "metrics-fips.sagemaker.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "metrics-fips.sagemaker.us-west-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2-fips", + }: endpoints.Endpoint{ + Hostname: "metrics-fips.sagemaker.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, }, }, { diff --git a/service/socialmessaging/deserializers.go b/service/socialmessaging/deserializers.go index f3d313820c0..6010d250be5 100644 --- a/service/socialmessaging/deserializers.go +++ b/service/socialmessaging/deserializers.go @@ -2843,6 +2843,15 @@ func awsRestjson1_deserializeDocumentLinkedWhatsAppBusinessAccountIdMetaData(v * return err } + case "wabaId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LinkedWhatsAppBusinessAccountId to be of type string, got %T instead", value) + } + sv.WabaId = ptr.String(jtv) + } + default: _, _ = key, value @@ -3217,6 +3226,15 @@ func awsRestjson1_deserializeDocumentWhatsAppBusinessAccountEventDestination(v * sv.EventDestinationArn = ptr.String(jtv) } + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/service/socialmessaging/serializers.go b/service/socialmessaging/serializers.go index 4f2bc0f6d5a..4295f318e85 100644 --- a/service/socialmessaging/serializers.go +++ b/service/socialmessaging/serializers.go @@ -1229,6 +1229,11 @@ func awsRestjson1_serializeDocumentWhatsAppBusinessAccountEventDestination(v *ty ok.String(*v.EventDestinationArn) } + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + return nil } diff --git a/service/socialmessaging/types/types.go b/service/socialmessaging/types/types.go index 669cd13eb5d..bd6d45c3b99 100644 --- a/service/socialmessaging/types/types.go +++ b/service/socialmessaging/types/types.go @@ -67,6 +67,9 @@ type LinkedWhatsAppBusinessAccountIdMetaData struct { // The details for unregistered WhatsApp phone numbers. UnregisteredWhatsAppPhoneNumbers []WhatsAppPhoneNumberDetail + // The Amazon Resource Name (ARN) of the WhatsApp Business Account ID. + WabaId *string + noSmithyDocumentSerde } @@ -258,6 +261,10 @@ type WhatsAppBusinessAccountEventDestination struct { // This member is required. EventDestinationArn *string + // The Amazon Resource Name (ARN) of an Identity and Access Management role that + // is able to import phone numbers and write events. + RoleArn *string + noSmithyDocumentSerde }