diff --git a/.changelog/0542498b5d544a15b1b1935583efad40.json b/.changelog/0542498b5d544a15b1b1935583efad40.json new file mode 100644 index 00000000000..d08de6001d5 --- /dev/null +++ b/.changelog/0542498b5d544a15b1b1935583efad40.json @@ -0,0 +1,8 @@ +{ + "id": "0542498b-5d54-4a15-b1b1-935583efad40", + "type": "feature", + "description": "Add enums for Agentless scan statuses and EC2 enablement error states", + "modules": [ + "service/inspector2" + ] +} \ No newline at end of file diff --git a/.changelog/10a12b3e67614044bf61074c72dd1610.json b/.changelog/10a12b3e67614044bf61074c72dd1610.json new file mode 100644 index 00000000000..e441dd655f9 --- /dev/null +++ b/.changelog/10a12b3e67614044bf61074c72dd1610.json @@ -0,0 +1,8 @@ +{ + "id": "10a12b3e-6761-4044-bf61-074c72dd1610", + "type": "feature", + "description": "Explicit query for authors and dashboard viewing sharing for embedded users", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/66baf64c35ef431e8154624ea5d0d2e9.json b/.changelog/66baf64c35ef431e8154624ea5d0d2e9.json new file mode 100644 index 00000000000..72b80e0b1a1 --- /dev/null +++ b/.changelog/66baf64c35ef431e8154624ea5d0d2e9.json @@ -0,0 +1,8 @@ +{ + "id": "66baf64c-35ef-431e-8154-624ea5d0d2e9", + "type": "documentation", + "description": "Amazon EC2 Auto Scaling now provides EBS health check to manage EC2 instance replacement", + "modules": [ + "service/autoscaling" + ] +} \ No newline at end of file diff --git a/.changelog/815574cf03d7496a92122d0b30ce48af.json b/.changelog/815574cf03d7496a92122d0b30ce48af.json new file mode 100644 index 00000000000..a5c9426fea1 --- /dev/null +++ b/.changelog/815574cf03d7496a92122d0b30ce48af.json @@ -0,0 +1,8 @@ +{ + "id": "815574cf-03d7-496a-9212-2d0b30ce48af", + "type": "feature", + "description": "Correct endpoint for FIPS is configured for US Gov Regions.", + "modules": [ + "service/emrcontainers" + ] +} \ No newline at end of file diff --git a/.changelog/d5c6ca88e6d3469985431bc2af44f8d1.json b/.changelog/d5c6ca88e6d3469985431bc2af44f8d1.json new file mode 100644 index 00000000000..ffb2a502325 --- /dev/null +++ b/.changelog/d5c6ca88e6d3469985431bc2af44f8d1.json @@ -0,0 +1,8 @@ +{ + "id": "d5c6ca88-e6d3-4699-8543-1bc2af44f8d1", + "type": "feature", + "description": "Amazon Bedrock Evaluation BatchDeleteEvaluationJob API allows customers to delete evaluation jobs under terminated evaluation job statuses - Stopped, Failed, or Completed. Customers can submit a batch of 25 evaluation jobs to be deleted at once.", + "modules": [ + "service/bedrock" + ] +} \ No newline at end of file diff --git a/.changelog/ea474fcfc2174708875944a041c8ac62.json b/.changelog/ea474fcfc2174708875944a041c8ac62.json new file mode 100644 index 00000000000..1e9d028c69d --- /dev/null +++ b/.changelog/ea474fcfc2174708875944a041c8ac62.json @@ -0,0 +1,8 @@ +{ + "id": "ea474fcf-c217-4708-8759-44a041c8ac62", + "type": "feature", + "description": "Amazon Route 53 now supports the Asia Pacific (Malaysia) Region (ap-southeast-5) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region.", + "modules": [ + "service/route53" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 73f9329172c..47cde575fac 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.69" +const goModuleVersion = "1.14.11" diff --git a/service/accessanalyzer/internal/endpoints/endpoints.go b/service/accessanalyzer/internal/endpoints/endpoints.go index 559a6135bcd..0537ca92c4e 100644 --- a/service/accessanalyzer/internal/endpoints/endpoints.go +++ b/service/accessanalyzer/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/acm/internal/endpoints/endpoints.go b/service/acm/internal/endpoints/endpoints.go index b125b22ea1d..27429990e9a 100644 --- a/service/acm/internal/endpoints/endpoints.go +++ b/service/acm/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/acmpca/internal/endpoints/endpoints.go b/service/acmpca/internal/endpoints/endpoints.go index ceaeb7941c4..f7b6b82eb04 100644 --- a/service/acmpca/internal/endpoints/endpoints.go +++ b/service/acmpca/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/apigateway/internal/endpoints/endpoints.go b/service/apigateway/internal/endpoints/endpoints.go index 310e00cd211..4104d3c9fcd 100644 --- a/service/apigateway/internal/endpoints/endpoints.go +++ b/service/apigateway/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/apigatewayv2/internal/endpoints/endpoints.go b/service/apigatewayv2/internal/endpoints/endpoints.go index 967af07547b..24c22049cb0 100644 --- a/service/apigatewayv2/internal/endpoints/endpoints.go +++ b/service/apigatewayv2/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/appconfig/internal/endpoints/endpoints.go b/service/appconfig/internal/endpoints/endpoints.go index 84173e9279c..df67a7d9f7f 100644 --- a/service/appconfig/internal/endpoints/endpoints.go +++ b/service/appconfig/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/appconfigdata/internal/endpoints/endpoints.go b/service/appconfigdata/internal/endpoints/endpoints.go index bf0301d7fd3..c6fd44d2e9a 100644 --- a/service/appconfigdata/internal/endpoints/endpoints.go +++ b/service/appconfigdata/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/applicationautoscaling/internal/endpoints/endpoints.go b/service/applicationautoscaling/internal/endpoints/endpoints.go index fdbc33c5b1b..b3c073cb8d7 100644 --- a/service/applicationautoscaling/internal/endpoints/endpoints.go +++ b/service/applicationautoscaling/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/arczonalshift/internal/endpoints/endpoints.go b/service/arczonalshift/internal/endpoints/endpoints.go index 18a85d38b2d..e861ac02d15 100644 --- a/service/arczonalshift/internal/endpoints/endpoints.go +++ b/service/arczonalshift/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/autoscaling/api_op_CreateAutoScalingGroup.go b/service/autoscaling/api_op_CreateAutoScalingGroup.go index ade2cfb7c5f..53dc7366c12 100644 --- a/service/autoscaling/api_op_CreateAutoScalingGroup.go +++ b/service/autoscaling/api_op_CreateAutoScalingGroup.go @@ -164,9 +164,9 @@ type CreateAutoScalingGroupInput struct { // A comma-separated value string of one or more health check types. // - // The valid values are EC2 , ELB , and VPC_LATTICE . EC2 is the default health - // check and cannot be disabled. For more information, see [Health checks for instances in an Auto Scaling group]in the Amazon EC2 Auto - // Scaling User Guide. + // The valid values are EC2 , EBS , ELB , and VPC_LATTICE . EC2 is the default + // health check and cannot be disabled. For more information, see [Health checks for instances in an Auto Scaling group]in the Amazon + // EC2 Auto Scaling User Guide. // // Only specify EC2 if you must clear a value that was previously set. // diff --git a/service/autoscaling/api_op_SetInstanceHealth.go b/service/autoscaling/api_op_SetInstanceHealth.go index 53f9d6dae1e..5a33a3f0602 100644 --- a/service/autoscaling/api_op_SetInstanceHealth.go +++ b/service/autoscaling/api_op_SetInstanceHealth.go @@ -12,9 +12,9 @@ import ( // Sets the health status of the specified instance. // -// For more information, see [Health checks for instances in an Auto Scaling group] in the Amazon EC2 Auto Scaling User Guide. +// For more information, see [Set up a custom health check for your Auto Scaling group] in the Amazon EC2 Auto Scaling User Guide. // -// [Health checks for instances in an Auto Scaling group]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html +// [Set up a custom health check for your Auto Scaling group]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/set-up-a-custom-health-check.html func (c *Client) SetInstanceHealth(ctx context.Context, params *SetInstanceHealthInput, optFns ...func(*Options)) (*SetInstanceHealthOutput, error) { if params == nil { params = &SetInstanceHealthInput{} diff --git a/service/autoscaling/api_op_UpdateAutoScalingGroup.go b/service/autoscaling/api_op_UpdateAutoScalingGroup.go index 60ce07e2723..1fb0952efab 100644 --- a/service/autoscaling/api_op_UpdateAutoScalingGroup.go +++ b/service/autoscaling/api_op_UpdateAutoScalingGroup.go @@ -146,9 +146,9 @@ type UpdateAutoScalingGroupInput struct { // A comma-separated value string of one or more health check types. // - // The valid values are EC2 , ELB , and VPC_LATTICE . EC2 is the default health - // check and cannot be disabled. For more information, see [Health checks for instances in an Auto Scaling group]in the Amazon EC2 Auto - // Scaling User Guide. + // The valid values are EC2 , EBS , ELB , and VPC_LATTICE . EC2 is the default + // health check and cannot be disabled. For more information, see [Health checks for instances in an Auto Scaling group]in the Amazon + // EC2 Auto Scaling User Guide. // // Only specify EC2 if you must clear a value that was previously set. // diff --git a/service/autoscaling/internal/endpoints/endpoints.go b/service/autoscaling/internal/endpoints/endpoints.go index 4d46a59a4e8..c7965fbc290 100644 --- a/service/autoscaling/internal/endpoints/endpoints.go +++ b/service/autoscaling/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/batch/internal/endpoints/endpoints.go b/service/batch/internal/endpoints/endpoints.go index c961e4f71f9..c2b8513a0d3 100644 --- a/service/batch/internal/endpoints/endpoints.go +++ b/service/batch/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/bedrock/api_op_BatchDeleteEvaluationJob.go b/service/bedrock/api_op_BatchDeleteEvaluationJob.go new file mode 100644 index 00000000000..12eb008da48 --- /dev/null +++ b/service/bedrock/api_op_BatchDeleteEvaluationJob.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrock/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a batch deletion job. A model evaluation job can only be deleted if it +// has following status FAILED , COMPLETED , and STOPPED . You can request up to 25 +// model evaluation jobs be deleted in a single request. +func (c *Client) BatchDeleteEvaluationJob(ctx context.Context, params *BatchDeleteEvaluationJobInput, optFns ...func(*Options)) (*BatchDeleteEvaluationJobOutput, error) { + if params == nil { + params = &BatchDeleteEvaluationJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchDeleteEvaluationJob", params, optFns, c.addOperationBatchDeleteEvaluationJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchDeleteEvaluationJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchDeleteEvaluationJobInput struct { + + // An array of model evaluation job ARNs to be deleted. + // + // This member is required. + JobIdentifiers []string + + noSmithyDocumentSerde +} + +type BatchDeleteEvaluationJobOutput struct { + + // A JSON object containing the HTTP status codes and the ARNs of model evaluation + // jobs that failed to be deleted. + // + // This member is required. + Errors []types.BatchDeleteEvaluationJobError + + // The list of model evaluation jobs to be deleted. + // + // This member is required. + EvaluationJobs []types.BatchDeleteEvaluationJobItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchDeleteEvaluationJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchDeleteEvaluationJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchDeleteEvaluationJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchDeleteEvaluationJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpBatchDeleteEvaluationJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteEvaluationJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchDeleteEvaluationJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchDeleteEvaluationJob", + } +} diff --git a/service/bedrock/api_op_CreateModelImportJob.go b/service/bedrock/api_op_CreateModelImportJob.go new file mode 100644 index 00000000000..550b9b8f7d4 --- /dev/null +++ b/service/bedrock/api_op_CreateModelImportJob.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrock/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a model import job to import model that you have customized in other +// environments, such as Amazon SageMaker. For more information, see [Import a customized model] +// +// [Import a customized model]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html +func (c *Client) CreateModelImportJob(ctx context.Context, params *CreateModelImportJobInput, optFns ...func(*Options)) (*CreateModelImportJobOutput, error) { + if params == nil { + params = &CreateModelImportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateModelImportJob", params, optFns, c.addOperationCreateModelImportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateModelImportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateModelImportJobInput struct { + + // The name of the imported model. + // + // This member is required. + ImportedModelName *string + + // The name of the import job. + // + // This member is required. + JobName *string + + // The data source for the imported model. + // + // This member is required. + ModelDataSource types.ModelDataSource + + // The Amazon Resource Name (ARN) of the model import job. + // + // This member is required. + RoleArn *string + + // A unique, case-sensitive identifier to ensure that the API request completes no + // more than one time. If this token matches a previous request, Amazon Bedrock + // ignores the request, but does not return an error. For more information, see [Ensuring idempotency]. + // + // [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html + ClientRequestToken *string + + // The imported model is encrypted at rest using this key. + ImportedModelKmsKeyId *string + + // Tags to attach to the imported model. + ImportedModelTags []types.Tag + + // Tags to attach to this import job. + JobTags []types.Tag + + // VPC configuration parameters for the private Virtual Private Cloud (VPC) that + // contains the resources you are using for the import job. + VpcConfig *types.VpcConfig + + noSmithyDocumentSerde +} + +type CreateModelImportJobOutput struct { + + // The Amazon Resource Name (ARN) of the model import job. + // + // This member is required. + JobArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateModelImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateModelImportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateModelImportJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateModelImportJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpCreateModelImportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateModelImportJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateModelImportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateModelImportJob", + } +} diff --git a/service/bedrock/api_op_DeleteImportedModel.go b/service/bedrock/api_op_DeleteImportedModel.go new file mode 100644 index 00000000000..7c08191896a --- /dev/null +++ b/service/bedrock/api_op_DeleteImportedModel.go @@ -0,0 +1,141 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a custom model that you imported earlier. For more information, see [Import a customized model] in +// the [Amazon Bedrock User Guide]. +// +// [Import a customized model]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html +// [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html +func (c *Client) DeleteImportedModel(ctx context.Context, params *DeleteImportedModelInput, optFns ...func(*Options)) (*DeleteImportedModelOutput, error) { + if params == nil { + params = &DeleteImportedModelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteImportedModel", params, optFns, c.addOperationDeleteImportedModelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteImportedModelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteImportedModelInput struct { + + // Name of the imported model to delete. + // + // This member is required. + ModelIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteImportedModelOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteImportedModelMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteImportedModel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteImportedModel{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteImportedModel"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteImportedModelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteImportedModel(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteImportedModel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteImportedModel", + } +} diff --git a/service/bedrock/api_op_GetImportedModel.go b/service/bedrock/api_op_GetImportedModel.go new file mode 100644 index 00000000000..02a738d9232 --- /dev/null +++ b/service/bedrock/api_op_GetImportedModel.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrock/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets properties associated with a customized model you imported. +func (c *Client) GetImportedModel(ctx context.Context, params *GetImportedModelInput, optFns ...func(*Options)) (*GetImportedModelOutput, error) { + if params == nil { + params = &GetImportedModelInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetImportedModel", params, optFns, c.addOperationGetImportedModelMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetImportedModelOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetImportedModelInput struct { + + // Name or Amazon Resource Name (ARN) of the imported model. + // + // This member is required. + ModelIdentifier *string + + noSmithyDocumentSerde +} + +type GetImportedModelOutput struct { + + // Creation time of the imported model. + CreationTime *time.Time + + // Job Amazon Resource Name (ARN) associated with the imported model. + JobArn *string + + // Job name associated with the imported model. + JobName *string + + // The architecture of the imported model. + ModelArchitecture *string + + // The Amazon Resource Name (ARN) associated with this imported model. + ModelArn *string + + // The data source for this imported model. + ModelDataSource types.ModelDataSource + + // The imported model is encrypted at rest using this key. + ModelKmsKeyArn *string + + // The name of the imported model. + ModelName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetImportedModelMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetImportedModel{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetImportedModel{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetImportedModel"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetImportedModelValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImportedModel(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetImportedModel(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetImportedModel", + } +} diff --git a/service/bedrock/api_op_GetModelImportJob.go b/service/bedrock/api_op_GetModelImportJob.go new file mode 100644 index 00000000000..02bdb69384f --- /dev/null +++ b/service/bedrock/api_op_GetModelImportJob.go @@ -0,0 +1,185 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrock/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the properties associated with import model job, including the status +// of the job. For more information, see [Import a customized model]in the [Amazon Bedrock User Guide]. +// +// [Import a customized model]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html +// [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html +func (c *Client) GetModelImportJob(ctx context.Context, params *GetModelImportJobInput, optFns ...func(*Options)) (*GetModelImportJobOutput, error) { + if params == nil { + params = &GetModelImportJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetModelImportJob", params, optFns, c.addOperationGetModelImportJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetModelImportJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetModelImportJobInput struct { + + // The identifier of the import job. + // + // This member is required. + JobIdentifier *string + + noSmithyDocumentSerde +} + +type GetModelImportJobOutput struct { + + // The time the resource was created. + CreationTime *time.Time + + // Time that the resource transitioned to terminal state. + EndTime *time.Time + + // Information about why the import job failed. + FailureMessage *string + + // The Amazon Resource Name (ARN) of the imported model. + ImportedModelArn *string + + // The imported model is encrypted at rest using this key. + ImportedModelKmsKeyArn *string + + // The name of the imported model. + ImportedModelName *string + + // The Amazon Resource Name (ARN) of the import job. + JobArn *string + + // The name of the import job. + JobName *string + + // Time the resource was last modified. + LastModifiedTime *time.Time + + // The data source for the imported model. + ModelDataSource types.ModelDataSource + + // The Amazon Resource Name (ARN) of the IAM role associated with this job. + RoleArn *string + + // The status of the job. A successful job transitions from in-progress to + // completed when the imported model is ready to use. If the job failed, the + // failure message contains information about why the job failed. + Status types.ModelImportJobStatus + + // The Virtual Private Cloud (VPC) configuration of the import model job. + VpcConfig *types.VpcConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetModelImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetModelImportJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetModelImportJob{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetModelImportJob"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetModelImportJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetModelImportJob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetModelImportJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetModelImportJob", + } +} diff --git a/service/bedrock/api_op_ListImportedModels.go b/service/bedrock/api_op_ListImportedModels.go new file mode 100644 index 00000000000..93ff820ba51 --- /dev/null +++ b/service/bedrock/api_op_ListImportedModels.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrock/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns a list of models you've imported. You can filter the results to return +// based on one or more criteria. For more information, see [Import a customized model]in the [Amazon Bedrock User Guide]. +// +// [Import a customized model]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html +// [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html +func (c *Client) ListImportedModels(ctx context.Context, params *ListImportedModelsInput, optFns ...func(*Options)) (*ListImportedModelsOutput, error) { + if params == nil { + params = &ListImportedModelsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListImportedModels", params, optFns, c.addOperationListImportedModelsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListImportedModelsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListImportedModelsInput struct { + + // Return imported models that were created after the specified time. + CreationTimeAfter *time.Time + + // Return imported models that created before the specified time. + CreationTimeBefore *time.Time + + // The maximum number of results to return in the response. If the total number of + // results is greater than this value, use the token returned in the response in + // the nextToken field when making another request to return the next batch of + // results. + MaxResults *int32 + + // Return imported models only if the model name contains these characters. + NameContains *string + + // If the total number of results is greater than the maxResults value provided in + // the request, enter the token returned in the nextToken field in the response in + // this field to return the next batch of results. + NextToken *string + + // The field to sort by in the returned list of imported models. + SortBy types.SortModelsBy + + // Specifies whetehr to sort the results in ascending or descending order. + SortOrder types.SortOrder + + noSmithyDocumentSerde +} + +type ListImportedModelsOutput struct { + + // Model summaries. + ModelSummaries []types.ImportedModelSummary + + // If the total number of results is greater than the maxResults value provided in + // the request, use this token when making another request in the nextToken field + // to return the next batch of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListImportedModelsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListImportedModels{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListImportedModels{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListImportedModels"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImportedModels(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListImportedModelsPaginatorOptions is the paginator options for +// ListImportedModels +type ListImportedModelsPaginatorOptions struct { + // The maximum number of results to return in the response. If the total number of + // results is greater than this value, use the token returned in the response in + // the nextToken field when making another request to return the next batch of + // results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListImportedModelsPaginator is a paginator for ListImportedModels +type ListImportedModelsPaginator struct { + options ListImportedModelsPaginatorOptions + client ListImportedModelsAPIClient + params *ListImportedModelsInput + nextToken *string + firstPage bool +} + +// NewListImportedModelsPaginator returns a new ListImportedModelsPaginator +func NewListImportedModelsPaginator(client ListImportedModelsAPIClient, params *ListImportedModelsInput, optFns ...func(*ListImportedModelsPaginatorOptions)) *ListImportedModelsPaginator { + if params == nil { + params = &ListImportedModelsInput{} + } + + options := ListImportedModelsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListImportedModelsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListImportedModelsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListImportedModels page. +func (p *ListImportedModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImportedModelsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListImportedModels(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListImportedModelsAPIClient is a client that implements the ListImportedModels +// operation. +type ListImportedModelsAPIClient interface { + ListImportedModels(context.Context, *ListImportedModelsInput, ...func(*Options)) (*ListImportedModelsOutput, error) +} + +var _ ListImportedModelsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListImportedModels(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListImportedModels", + } +} diff --git a/service/bedrock/api_op_ListModelImportJobs.go b/service/bedrock/api_op_ListModelImportJobs.go new file mode 100644 index 00000000000..8e9e0b0351d --- /dev/null +++ b/service/bedrock/api_op_ListModelImportJobs.go @@ -0,0 +1,270 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package bedrock + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/bedrock/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns a list of import jobs you've submitted. You can filter the results to +// return based on one or more criteria. For more information, see [Import a customized model]in the [Amazon Bedrock User Guide]. +// +// [Import a customized model]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html +// [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html +func (c *Client) ListModelImportJobs(ctx context.Context, params *ListModelImportJobsInput, optFns ...func(*Options)) (*ListModelImportJobsOutput, error) { + if params == nil { + params = &ListModelImportJobsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListModelImportJobs", params, optFns, c.addOperationListModelImportJobsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListModelImportJobsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListModelImportJobsInput struct { + + // Return import jobs that were created after the specified time. + CreationTimeAfter *time.Time + + // Return import jobs that were created before the specified time. + CreationTimeBefore *time.Time + + // The maximum number of results to return in the response. If the total number of + // results is greater than this value, use the token returned in the response in + // the nextToken field when making another request to return the next batch of + // results. + MaxResults *int32 + + // Return imported jobs only if the job name contains these characters. + NameContains *string + + // If the total number of results is greater than the maxResults value provided in + // the request, enter the token returned in the nextToken field in the response in + // this field to return the next batch of results. + NextToken *string + + // The field to sort by in the returned list of imported jobs. + SortBy types.SortJobsBy + + // Specifies whether to sort the results in ascending or descending order. + SortOrder types.SortOrder + + // Return imported jobs with the specified status. + StatusEquals types.ModelImportJobStatus + + noSmithyDocumentSerde +} + +type ListModelImportJobsOutput struct { + + // Import job summaries. + ModelImportJobSummaries []types.ModelImportJobSummary + + // If the total number of results is greater than the maxResults value provided in + // the request, enter the token returned in the nextToken field in the response in + // this field to return the next batch of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListModelImportJobsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListModelImportJobs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListModelImportJobs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListModelImportJobs"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelImportJobs(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListModelImportJobsPaginatorOptions is the paginator options for +// ListModelImportJobs +type ListModelImportJobsPaginatorOptions struct { + // The maximum number of results to return in the response. If the total number of + // results is greater than this value, use the token returned in the response in + // the nextToken field when making another request to return the next batch of + // results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListModelImportJobsPaginator is a paginator for ListModelImportJobs +type ListModelImportJobsPaginator struct { + options ListModelImportJobsPaginatorOptions + client ListModelImportJobsAPIClient + params *ListModelImportJobsInput + nextToken *string + firstPage bool +} + +// NewListModelImportJobsPaginator returns a new ListModelImportJobsPaginator +func NewListModelImportJobsPaginator(client ListModelImportJobsAPIClient, params *ListModelImportJobsInput, optFns ...func(*ListModelImportJobsPaginatorOptions)) *ListModelImportJobsPaginator { + if params == nil { + params = &ListModelImportJobsInput{} + } + + options := ListModelImportJobsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListModelImportJobsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListModelImportJobsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListModelImportJobs page. +func (p *ListModelImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListModelImportJobsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListModelImportJobs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListModelImportJobsAPIClient is a client that implements the +// ListModelImportJobs operation. +type ListModelImportJobsAPIClient interface { + ListModelImportJobs(context.Context, *ListModelImportJobsInput, ...func(*Options)) (*ListModelImportJobsOutput, error) +} + +var _ ListModelImportJobsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListModelImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListModelImportJobs", + } +} diff --git a/service/bedrock/deserializers.go b/service/bedrock/deserializers.go index bb83d0bf5ec..822d60e3f2a 100644 --- a/service/bedrock/deserializers.go +++ b/service/bedrock/deserializers.go @@ -29,6 +29,173 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsRestjson1_deserializeOpBatchDeleteEvaluationJob struct { +} + +func (*awsRestjson1_deserializeOpBatchDeleteEvaluationJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpBatchDeleteEvaluationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorBatchDeleteEvaluationJob(response, &metadata) + } + output := &BatchDeleteEvaluationJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentBatchDeleteEvaluationJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorBatchDeleteEvaluationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentBatchDeleteEvaluationJobOutput(v **BatchDeleteEvaluationJobOutput, 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 *BatchDeleteEvaluationJobOutput + if *v == nil { + sv = &BatchDeleteEvaluationJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobErrors(&sv.Errors, value); err != nil { + return err + } + + case "evaluationJobs": + if err := awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobItems(&sv.EvaluationJobs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateEvaluationJob struct { } @@ -911,14 +1078,14 @@ func awsRestjson1_deserializeOpDocumentCreateModelCustomizationJobOutput(v **Cre return nil } -type awsRestjson1_deserializeOpCreateModelInvocationJob struct { +type awsRestjson1_deserializeOpCreateModelImportJob struct { } -func (*awsRestjson1_deserializeOpCreateModelInvocationJob) ID() string { +func (*awsRestjson1_deserializeOpCreateModelImportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateModelInvocationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateModelImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -932,9 +1099,9 @@ func (m *awsRestjson1_deserializeOpCreateModelInvocationJob) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateModelInvocationJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateModelImportJob(response, &metadata) } - output := &CreateModelInvocationJobOutput{} + output := &CreateModelImportJobOutput{} out.Result = output var buff [1024]byte @@ -955,7 +1122,7 @@ func (m *awsRestjson1_deserializeOpCreateModelInvocationJob) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateModelInvocationJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateModelImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -968,7 +1135,7 @@ func (m *awsRestjson1_deserializeOpCreateModelInvocationJob) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateModelInvocationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateModelImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1027,6 +1194,9 @@ func awsRestjson1_deserializeOpErrorCreateModelInvocationJob(response *smithyhtt case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TooManyTagsException", errorCode): + return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1040,7 +1210,7 @@ func awsRestjson1_deserializeOpErrorCreateModelInvocationJob(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentCreateModelInvocationJobOutput(v **CreateModelInvocationJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateModelImportJobOutput(v **CreateModelImportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1053,9 +1223,9 @@ func awsRestjson1_deserializeOpDocumentCreateModelInvocationJobOutput(v **Create return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateModelInvocationJobOutput + var sv *CreateModelImportJobOutput if *v == nil { - sv = &CreateModelInvocationJobOutput{} + sv = &CreateModelImportJobOutput{} } else { sv = *v } @@ -1066,7 +1236,7 @@ func awsRestjson1_deserializeOpDocumentCreateModelInvocationJobOutput(v **Create if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModelInvocationJobArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ModelImportJobArn to be of type string, got %T instead", value) } sv.JobArn = ptr.String(jtv) } @@ -1080,14 +1250,14 @@ func awsRestjson1_deserializeOpDocumentCreateModelInvocationJobOutput(v **Create return nil } -type awsRestjson1_deserializeOpCreateProvisionedModelThroughput struct { +type awsRestjson1_deserializeOpCreateModelInvocationJob struct { } -func (*awsRestjson1_deserializeOpCreateProvisionedModelThroughput) ID() string { +func (*awsRestjson1_deserializeOpCreateModelInvocationJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateProvisionedModelThroughput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateModelInvocationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1101,9 +1271,9 @@ func (m *awsRestjson1_deserializeOpCreateProvisionedModelThroughput) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateProvisionedModelThroughput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateModelInvocationJob(response, &metadata) } - output := &CreateProvisionedModelThroughputOutput{} + output := &CreateModelInvocationJobOutput{} out.Result = output var buff [1024]byte @@ -1124,7 +1294,7 @@ func (m *awsRestjson1_deserializeOpCreateProvisionedModelThroughput) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateProvisionedModelThroughputOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateModelInvocationJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1137,7 +1307,7 @@ func (m *awsRestjson1_deserializeOpCreateProvisionedModelThroughput) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateProvisionedModelThroughput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateModelInvocationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1181,6 +1351,9 @@ func awsRestjson1_deserializeOpErrorCreateProvisionedModelThroughput(response *s case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -1193,9 +1366,6 @@ func awsRestjson1_deserializeOpErrorCreateProvisionedModelThroughput(response *s case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1209,7 +1379,7 @@ func awsRestjson1_deserializeOpErrorCreateProvisionedModelThroughput(response *s } } -func awsRestjson1_deserializeOpDocumentCreateProvisionedModelThroughputOutput(v **CreateProvisionedModelThroughputOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateModelInvocationJobOutput(v **CreateModelInvocationJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1222,22 +1392,22 @@ func awsRestjson1_deserializeOpDocumentCreateProvisionedModelThroughputOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateProvisionedModelThroughputOutput + var sv *CreateModelInvocationJobOutput if *v == nil { - sv = &CreateProvisionedModelThroughputOutput{} + sv = &CreateModelInvocationJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "provisionedModelArn": + case "jobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProvisionedModelArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ModelInvocationJobArn to be of type string, got %T instead", value) } - sv.ProvisionedModelArn = ptr.String(jtv) + sv.JobArn = ptr.String(jtv) } default: @@ -1249,14 +1419,14 @@ func awsRestjson1_deserializeOpDocumentCreateProvisionedModelThroughputOutput(v return nil } -type awsRestjson1_deserializeOpDeleteCustomModel struct { +type awsRestjson1_deserializeOpCreateProvisionedModelThroughput struct { } -func (*awsRestjson1_deserializeOpDeleteCustomModel) ID() string { +func (*awsRestjson1_deserializeOpCreateProvisionedModelThroughput) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteCustomModel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateProvisionedModelThroughput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1270,15 +1440,43 @@ func (m *awsRestjson1_deserializeOpDeleteCustomModel) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteCustomModel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateProvisionedModelThroughput(response, &metadata) } - output := &DeleteCustomModelOutput{} + output := &CreateProvisionedModelThroughputOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateProvisionedModelThroughputOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteCustomModel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateProvisionedModelThroughput(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1322,18 +1520,21 @@ func awsRestjson1_deserializeOpErrorDeleteCustomModel(response *smithyhttp.Respo case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TooManyTagsException", errorCode): + return awsRestjson1_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1347,14 +1548,152 @@ func awsRestjson1_deserializeOpErrorDeleteCustomModel(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpDeleteGuardrail struct { -} - -func (*awsRestjson1_deserializeOpDeleteGuardrail) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteGuardrail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func awsRestjson1_deserializeOpDocumentCreateProvisionedModelThroughputOutput(v **CreateProvisionedModelThroughputOutput, 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 *CreateProvisionedModelThroughputOutput + if *v == nil { + sv = &CreateProvisionedModelThroughputOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "provisionedModelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedModelArn to be of type string, got %T instead", value) + } + sv.ProvisionedModelArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteCustomModel struct { +} + +func (*awsRestjson1_deserializeOpDeleteCustomModel) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteCustomModel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCustomModel(response, &metadata) + } + output := &DeleteCustomModelOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteCustomModel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteGuardrail struct { +} + +func (*awsRestjson1_deserializeOpDeleteGuardrail) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteGuardrail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1445,6 +1784,104 @@ func awsRestjson1_deserializeOpErrorDeleteGuardrail(response *smithyhttp.Respons } } +type awsRestjson1_deserializeOpDeleteImportedModel struct { +} + +func (*awsRestjson1_deserializeOpDeleteImportedModel) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteImportedModel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteImportedModel(response, &metadata) + } + output := &DeleteImportedModelOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteImportedModel(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDeleteModelInvocationLoggingConfiguration struct { } @@ -2610,14 +3047,14 @@ func awsRestjson1_deserializeOpDocumentGetGuardrailOutput(v **GetGuardrailOutput return nil } -type awsRestjson1_deserializeOpGetModelCopyJob struct { +type awsRestjson1_deserializeOpGetImportedModel struct { } -func (*awsRestjson1_deserializeOpGetModelCopyJob) ID() string { +func (*awsRestjson1_deserializeOpGetImportedModel) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetModelCopyJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetImportedModel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2631,9 +3068,9 @@ func (m *awsRestjson1_deserializeOpGetModelCopyJob) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetModelCopyJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetImportedModel(response, &metadata) } - output := &GetModelCopyJobOutput{} + output := &GetImportedModelOutput{} out.Result = output var buff [1024]byte @@ -2654,7 +3091,7 @@ func (m *awsRestjson1_deserializeOpGetModelCopyJob) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetModelCopyJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetImportedModelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2667,7 +3104,7 @@ func (m *awsRestjson1_deserializeOpGetModelCopyJob) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetModelCopyJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetImportedModel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2733,7 +3170,7 @@ func awsRestjson1_deserializeOpErrorGetModelCopyJob(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentGetModelCopyJobOutput(v **GetModelCopyJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetImportedModelOutput(v **GetImportedModelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2746,9 +3183,9 @@ func awsRestjson1_deserializeOpDocumentGetModelCopyJobOutput(v **GetModelCopyJob return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetModelCopyJobOutput + var sv *GetImportedModelOutput if *v == nil { - sv = &GetModelCopyJobOutput{} + sv = &GetImportedModelOutput{} } else { sv = *v } @@ -2768,20 +3205,246 @@ func awsRestjson1_deserializeOpDocumentGetModelCopyJobOutput(v **GetModelCopyJob sv.CreationTime = ptr.Time(t) } - case "failureMessage": + case "jobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ModelImportJobArn to be of type string, got %T instead", value) } - sv.FailureMessage = ptr.String(jtv) + sv.JobArn = ptr.String(jtv) } - case "jobArn": + case "jobName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModelCopyJobArn to be of type string, got %T instead", value) + return fmt.Errorf("expected JobName to be of type string, got %T instead", value) + } + sv.JobName = ptr.String(jtv) + } + + case "modelArchitecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ModelArchitecture = ptr.String(jtv) + } + + case "modelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportedModelArn to be of type string, got %T instead", value) + } + sv.ModelArn = ptr.String(jtv) + } + + case "modelDataSource": + if err := awsRestjson1_deserializeDocumentModelDataSource(&sv.ModelDataSource, value); err != nil { + return err + } + + case "modelKmsKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) + } + sv.ModelKmsKeyArn = ptr.String(jtv) + } + + case "modelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportedModelName to be of type string, got %T instead", value) + } + sv.ModelName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetModelCopyJob struct { +} + +func (*awsRestjson1_deserializeOpGetModelCopyJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetModelCopyJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetModelCopyJob(response, &metadata) + } + output := &GetModelCopyJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetModelCopyJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetModelCopyJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetModelCopyJobOutput(v **GetModelCopyJobOutput, 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 *GetModelCopyJobOutput + if *v == nil { + sv = &GetModelCopyJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) + } + + case "jobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelCopyJobArn to be of type string, got %T instead", value) } sv.JobArn = ptr.String(jtv) } @@ -3190,14 +3853,14 @@ func awsRestjson1_deserializeOpDocumentGetModelCustomizationJobOutput(v **GetMod return nil } -type awsRestjson1_deserializeOpGetModelInvocationJob struct { +type awsRestjson1_deserializeOpGetModelImportJob struct { } -func (*awsRestjson1_deserializeOpGetModelInvocationJob) ID() string { +func (*awsRestjson1_deserializeOpGetModelImportJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetModelInvocationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetModelImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3211,9 +3874,9 @@ func (m *awsRestjson1_deserializeOpGetModelInvocationJob) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetModelInvocationJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetModelImportJob(response, &metadata) } - output := &GetModelInvocationJobOutput{} + output := &GetModelImportJobOutput{} out.Result = output var buff [1024]byte @@ -3234,7 +3897,7 @@ func (m *awsRestjson1_deserializeOpGetModelInvocationJob) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetModelImportJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3247,7 +3910,7 @@ func (m *awsRestjson1_deserializeOpGetModelInvocationJob) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetModelInvocationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetModelImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3313,7 +3976,7 @@ func awsRestjson1_deserializeOpErrorGetModelInvocationJob(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(v **GetModelInvocationJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetModelImportJobOutput(v **GetModelImportJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3326,22 +3989,26 @@ func awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(v **GetModelI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetModelInvocationJobOutput + var sv *GetModelImportJobOutput if *v == nil { - sv = &GetModelInvocationJobOutput{} + sv = &GetModelImportJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "clientRequestToken": + case "creationTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModelInvocationIdempotencyToken to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.ClientRequestToken = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) } case "endTime": @@ -3357,75 +4024,75 @@ func awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(v **GetModelI sv.EndTime = ptr.Time(t) } - case "inputDataConfig": - if err := awsRestjson1_deserializeDocumentModelInvocationJobInputDataConfig(&sv.InputDataConfig, value); err != nil { - return err + case "failureMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.FailureMessage = ptr.String(jtv) } - case "jobArn": + case "importedModelArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModelInvocationJobArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ImportedModelArn to be of type string, got %T instead", value) } - sv.JobArn = ptr.String(jtv) + sv.ImportedModelArn = ptr.String(jtv) } - case "jobExpirationTime": + case "importedModelKmsKeyArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) } - sv.JobExpirationTime = ptr.Time(t) + sv.ImportedModelKmsKeyArn = ptr.String(jtv) } - case "jobName": + case "importedModelName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModelInvocationJobName to be of type string, got %T instead", value) + return fmt.Errorf("expected ImportedModelName to be of type string, got %T instead", value) } - sv.JobName = ptr.String(jtv) + sv.ImportedModelName = ptr.String(jtv) } - case "lastModifiedTime": + case "jobArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected ModelImportJobArn to be of type string, got %T instead", value) } - sv.LastModifiedTime = ptr.Time(t) + sv.JobArn = ptr.String(jtv) } - case "message": + case "jobName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) + return fmt.Errorf("expected JobName to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.JobName = ptr.String(jtv) } - case "modelId": + case "lastModifiedTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModelId to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.ModelId = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) } - case "outputDataConfig": - if err := awsRestjson1_deserializeDocumentModelInvocationJobOutputDataConfig(&sv.OutputDataConfig, value); err != nil { + case "modelDataSource": + if err := awsRestjson1_deserializeDocumentModelDataSource(&sv.ModelDataSource, value); err != nil { return err } @@ -3442,35 +4109,14 @@ func awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(v **GetModelI if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModelInvocationJobStatus to be of type string, got %T instead", value) - } - sv.Status = types.ModelInvocationJobStatus(jtv) - } - - case "submitTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected ModelImportJobStatus to be of type string, got %T instead", value) } - sv.SubmitTime = ptr.Time(t) + sv.Status = types.ModelImportJobStatus(jtv) } - case "timeoutDurationInHours": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ModelInvocationJobTimeoutDurationInHours to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.TimeoutDurationInHours = ptr.Int32(int32(i64)) + case "vpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil { + return err } default: @@ -3482,14 +4128,14 @@ func awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(v **GetModelI return nil } -type awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration struct { +type awsRestjson1_deserializeOpGetModelInvocationJob struct { } -func (*awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration) ID() string { +func (*awsRestjson1_deserializeOpGetModelInvocationJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetModelInvocationJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3503,9 +4149,9 @@ func (m *awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetModelInvocationLoggingConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetModelInvocationJob(response, &metadata) } - output := &GetModelInvocationLoggingConfigurationOutput{} + output := &GetModelInvocationJobOutput{} out.Result = output var buff [1024]byte @@ -3526,7 +4172,7 @@ func (m *awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration) Handl return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetModelInvocationLoggingConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3539,7 +4185,7 @@ func (m *awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration) Handl return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetModelInvocationLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetModelInvocationJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3586,9 +4232,15 @@ func awsRestjson1_deserializeOpErrorGetModelInvocationLoggingConfiguration(respo case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3599,7 +4251,7 @@ func awsRestjson1_deserializeOpErrorGetModelInvocationLoggingConfiguration(respo } } -func awsRestjson1_deserializeOpDocumentGetModelInvocationLoggingConfigurationOutput(v **GetModelInvocationLoggingConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetModelInvocationJobOutput(v **GetModelInvocationJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3612,20 +4264,153 @@ func awsRestjson1_deserializeOpDocumentGetModelInvocationLoggingConfigurationOut return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetModelInvocationLoggingConfigurationOutput + var sv *GetModelInvocationJobOutput if *v == nil { - sv = &GetModelInvocationLoggingConfigurationOutput{} + sv = &GetModelInvocationJobOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "loggingConfig": - if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + case "clientRequestToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelInvocationIdempotencyToken to be of type string, got %T instead", value) + } + sv.ClientRequestToken = ptr.String(jtv) + } + + case "endTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.EndTime = ptr.Time(t) + } + + case "inputDataConfig": + if err := awsRestjson1_deserializeDocumentModelInvocationJobInputDataConfig(&sv.InputDataConfig, value); err != nil { + return err + } + + case "jobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelInvocationJobArn to be of type string, got %T instead", value) + } + sv.JobArn = ptr.String(jtv) + } + + case "jobExpirationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.JobExpirationTime = ptr.Time(t) + } + + case "jobName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelInvocationJobName to be of type string, got %T instead", value) + } + sv.JobName = ptr.String(jtv) + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "modelId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelId to be of type string, got %T instead", value) + } + sv.ModelId = ptr.String(jtv) + } + + case "outputDataConfig": + if err := awsRestjson1_deserializeDocumentModelInvocationJobOutputDataConfig(&sv.OutputDataConfig, value); err != nil { return err } + 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) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelInvocationJobStatus to be of type string, got %T instead", value) + } + sv.Status = types.ModelInvocationJobStatus(jtv) + } + + case "submitTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.SubmitTime = ptr.Time(t) + } + + case "timeoutDurationInHours": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ModelInvocationJobTimeoutDurationInHours to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutDurationInHours = ptr.Int32(int32(i64)) + } + default: _, _ = key, value @@ -3635,14 +4420,14 @@ func awsRestjson1_deserializeOpDocumentGetModelInvocationLoggingConfigurationOut return nil } -type awsRestjson1_deserializeOpGetProvisionedModelThroughput struct { +type awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration struct { } -func (*awsRestjson1_deserializeOpGetProvisionedModelThroughput) ID() string { +func (*awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetProvisionedModelThroughput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetModelInvocationLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3656,9 +4441,9 @@ func (m *awsRestjson1_deserializeOpGetProvisionedModelThroughput) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetProvisionedModelThroughput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetModelInvocationLoggingConfiguration(response, &metadata) } - output := &GetProvisionedModelThroughputOutput{} + output := &GetModelInvocationLoggingConfigurationOutput{} out.Result = output var buff [1024]byte @@ -3679,7 +4464,7 @@ func (m *awsRestjson1_deserializeOpGetProvisionedModelThroughput) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetProvisionedModelThroughputOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetModelInvocationLoggingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3692,7 +4477,7 @@ func (m *awsRestjson1_deserializeOpGetProvisionedModelThroughput) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetProvisionedModelThroughput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetModelInvocationLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3739,15 +4524,9 @@ func awsRestjson1_deserializeOpErrorGetProvisionedModelThroughput(response *smit case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3758,7 +4537,7 @@ func awsRestjson1_deserializeOpErrorGetProvisionedModelThroughput(response *smit } } -func awsRestjson1_deserializeOpDocumentGetProvisionedModelThroughputOutput(v **GetProvisionedModelThroughputOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetModelInvocationLoggingConfigurationOutput(v **GetModelInvocationLoggingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3771,17 +4550,176 @@ func awsRestjson1_deserializeOpDocumentGetProvisionedModelThroughputOutput(v **G return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetProvisionedModelThroughputOutput + var sv *GetModelInvocationLoggingConfigurationOutput if *v == nil { - sv = &GetProvisionedModelThroughputOutput{} + sv = &GetModelInvocationLoggingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "commitmentDuration": - if value != nil { + case "loggingConfig": + if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetProvisionedModelThroughput struct { +} + +func (*awsRestjson1_deserializeOpGetProvisionedModelThroughput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetProvisionedModelThroughput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetProvisionedModelThroughput(response, &metadata) + } + output := &GetProvisionedModelThroughputOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetProvisionedModelThroughputOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetProvisionedModelThroughput(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetProvisionedModelThroughputOutput(v **GetProvisionedModelThroughputOutput, 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 *GetProvisionedModelThroughputOutput + if *v == nil { + sv = &GetProvisionedModelThroughputOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commitmentDuration": + if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CommitmentDuration to be of type string, got %T instead", value) @@ -3890,31 +4828,361 @@ func awsRestjson1_deserializeOpDocumentGetProvisionedModelThroughputOutput(v **G sv.ModelUnits = ptr.Int32(int32(i64)) } - case "provisionedModelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProvisionedModelArn to be of type string, got %T instead", value) - } - sv.ProvisionedModelArn = ptr.String(jtv) - } + case "provisionedModelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedModelArn to be of type string, got %T instead", value) + } + sv.ProvisionedModelArn = ptr.String(jtv) + } + + case "provisionedModelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedModelName to be of type string, got %T instead", value) + } + sv.ProvisionedModelName = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedModelStatus to be of type string, got %T instead", value) + } + sv.Status = types.ProvisionedModelStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCustomModels struct { +} + +func (*awsRestjson1_deserializeOpListCustomModels) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCustomModels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListCustomModels(response, &metadata) + } + output := &ListCustomModelsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListCustomModelsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListCustomModels(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCustomModelsOutput(v **ListCustomModelsOutput, 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 *ListCustomModelsOutput + if *v == nil { + sv = &ListCustomModelsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "modelSummaries": + if err := awsRestjson1_deserializeDocumentCustomModelSummaryList(&sv.ModelSummaries, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEvaluationJobs struct { +} + +func (*awsRestjson1_deserializeOpListEvaluationJobs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListEvaluationJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListEvaluationJobs(response, &metadata) + } + output := &ListEvaluationJobsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListEvaluationJobsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListEvaluationJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListEvaluationJobsOutput(v **ListEvaluationJobsOutput, 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) + } - case "provisionedModelName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProvisionedModelName to be of type string, got %T instead", value) - } - sv.ProvisionedModelName = ptr.String(jtv) + var sv *ListEvaluationJobsOutput + if *v == nil { + sv = &ListEvaluationJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobSummaries": + if err := awsRestjson1_deserializeDocumentEvaluationSummaries(&sv.JobSummaries, value); err != nil { + return err } - case "status": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProvisionedModelStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } - sv.Status = types.ProvisionedModelStatus(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -3926,14 +5194,14 @@ func awsRestjson1_deserializeOpDocumentGetProvisionedModelThroughputOutput(v **G return nil } -type awsRestjson1_deserializeOpListCustomModels struct { +type awsRestjson1_deserializeOpListFoundationModels struct { } -func (*awsRestjson1_deserializeOpListCustomModels) ID() string { +func (*awsRestjson1_deserializeOpListFoundationModels) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCustomModels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFoundationModels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3947,9 +5215,9 @@ func (m *awsRestjson1_deserializeOpListCustomModels) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCustomModels(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFoundationModels(response, &metadata) } - output := &ListCustomModelsOutput{} + output := &ListFoundationModelsOutput{} out.Result = output var buff [1024]byte @@ -3970,7 +5238,7 @@ func (m *awsRestjson1_deserializeOpListCustomModels) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCustomModelsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFoundationModelsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3983,7 +5251,7 @@ func (m *awsRestjson1_deserializeOpListCustomModels) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCustomModels(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFoundationModels(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4046,7 +5314,7 @@ func awsRestjson1_deserializeOpErrorListCustomModels(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListCustomModelsOutput(v **ListCustomModelsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFoundationModelsOutput(v **ListFoundationModelsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4059,9 +5327,9 @@ func awsRestjson1_deserializeOpDocumentListCustomModelsOutput(v **ListCustomMode return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCustomModelsOutput + var sv *ListFoundationModelsOutput if *v == nil { - sv = &ListCustomModelsOutput{} + sv = &ListFoundationModelsOutput{} } else { sv = *v } @@ -4069,19 +5337,10 @@ func awsRestjson1_deserializeOpDocumentListCustomModelsOutput(v **ListCustomMode for key, value := range shape { switch key { case "modelSummaries": - if err := awsRestjson1_deserializeDocumentCustomModelSummaryList(&sv.ModelSummaries, value); err != nil { + if err := awsRestjson1_deserializeDocumentFoundationModelSummaryList(&sv.ModelSummaries, value); err != nil { return err } - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -4091,14 +5350,14 @@ func awsRestjson1_deserializeOpDocumentListCustomModelsOutput(v **ListCustomMode return nil } -type awsRestjson1_deserializeOpListEvaluationJobs struct { +type awsRestjson1_deserializeOpListGuardrails struct { } -func (*awsRestjson1_deserializeOpListEvaluationJobs) ID() string { +func (*awsRestjson1_deserializeOpListGuardrails) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEvaluationJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGuardrails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4112,9 +5371,9 @@ func (m *awsRestjson1_deserializeOpListEvaluationJobs) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEvaluationJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGuardrails(response, &metadata) } - output := &ListEvaluationJobsOutput{} + output := &ListGuardrailsOutput{} out.Result = output var buff [1024]byte @@ -4135,7 +5394,7 @@ func (m *awsRestjson1_deserializeOpListEvaluationJobs) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEvaluationJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListGuardrailsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4148,7 +5407,7 @@ func (m *awsRestjson1_deserializeOpListEvaluationJobs) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEvaluationJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGuardrails(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4195,6 +5454,9 @@ func awsRestjson1_deserializeOpErrorListEvaluationJobs(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4211,7 +5473,7 @@ func awsRestjson1_deserializeOpErrorListEvaluationJobs(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentListEvaluationJobsOutput(v **ListEvaluationJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListGuardrailsOutput(v **ListGuardrailsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4224,17 +5486,17 @@ func awsRestjson1_deserializeOpDocumentListEvaluationJobsOutput(v **ListEvaluati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEvaluationJobsOutput + var sv *ListGuardrailsOutput if *v == nil { - sv = &ListEvaluationJobsOutput{} + sv = &ListGuardrailsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobSummaries": - if err := awsRestjson1_deserializeDocumentEvaluationSummaries(&sv.JobSummaries, value); err != nil { + case "guardrails": + if err := awsRestjson1_deserializeDocumentGuardrailSummaries(&sv.Guardrails, value); err != nil { return err } @@ -4256,14 +5518,14 @@ func awsRestjson1_deserializeOpDocumentListEvaluationJobsOutput(v **ListEvaluati return nil } -type awsRestjson1_deserializeOpListFoundationModels struct { +type awsRestjson1_deserializeOpListImportedModels struct { } -func (*awsRestjson1_deserializeOpListFoundationModels) ID() string { +func (*awsRestjson1_deserializeOpListImportedModels) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFoundationModels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListImportedModels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4277,9 +5539,9 @@ func (m *awsRestjson1_deserializeOpListFoundationModels) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFoundationModels(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListImportedModels(response, &metadata) } - output := &ListFoundationModelsOutput{} + output := &ListImportedModelsOutput{} out.Result = output var buff [1024]byte @@ -4300,7 +5562,7 @@ func (m *awsRestjson1_deserializeOpListFoundationModels) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFoundationModelsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListImportedModelsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4313,7 +5575,7 @@ func (m *awsRestjson1_deserializeOpListFoundationModels) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFoundationModels(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListImportedModels(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4376,7 +5638,7 @@ func awsRestjson1_deserializeOpErrorListFoundationModels(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListFoundationModelsOutput(v **ListFoundationModelsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListImportedModelsOutput(v **ListImportedModelsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4389,9 +5651,9 @@ func awsRestjson1_deserializeOpDocumentListFoundationModelsOutput(v **ListFounda return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFoundationModelsOutput + var sv *ListImportedModelsOutput if *v == nil { - sv = &ListFoundationModelsOutput{} + sv = &ListImportedModelsOutput{} } else { sv = *v } @@ -4399,10 +5661,19 @@ func awsRestjson1_deserializeOpDocumentListFoundationModelsOutput(v **ListFounda for key, value := range shape { switch key { case "modelSummaries": - if err := awsRestjson1_deserializeDocumentFoundationModelSummaryList(&sv.ModelSummaries, value); err != nil { + if err := awsRestjson1_deserializeDocumentImportedModelSummaryList(&sv.ModelSummaries, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -4412,14 +5683,14 @@ func awsRestjson1_deserializeOpDocumentListFoundationModelsOutput(v **ListFounda return nil } -type awsRestjson1_deserializeOpListGuardrails struct { +type awsRestjson1_deserializeOpListModelCopyJobs struct { } -func (*awsRestjson1_deserializeOpListGuardrails) ID() string { +func (*awsRestjson1_deserializeOpListModelCopyJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListGuardrails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListModelCopyJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4433,9 +5704,9 @@ func (m *awsRestjson1_deserializeOpListGuardrails) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListGuardrails(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListModelCopyJobs(response, &metadata) } - output := &ListGuardrailsOutput{} + output := &ListModelCopyJobsOutput{} out.Result = output var buff [1024]byte @@ -4456,7 +5727,7 @@ func (m *awsRestjson1_deserializeOpListGuardrails) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListGuardrailsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListModelCopyJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4469,7 +5740,7 @@ func (m *awsRestjson1_deserializeOpListGuardrails) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListGuardrails(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListModelCopyJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4535,7 +5806,7 @@ func awsRestjson1_deserializeOpErrorListGuardrails(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentListGuardrailsOutput(v **ListGuardrailsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListModelCopyJobsOutput(v **ListModelCopyJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4548,17 +5819,17 @@ func awsRestjson1_deserializeOpDocumentListGuardrailsOutput(v **ListGuardrailsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListGuardrailsOutput + var sv *ListModelCopyJobsOutput if *v == nil { - sv = &ListGuardrailsOutput{} + sv = &ListModelCopyJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "guardrails": - if err := awsRestjson1_deserializeDocumentGuardrailSummaries(&sv.Guardrails, value); err != nil { + case "modelCopyJobSummaries": + if err := awsRestjson1_deserializeDocumentModelCopyJobSummaries(&sv.ModelCopyJobSummaries, value); err != nil { return err } @@ -4580,14 +5851,14 @@ func awsRestjson1_deserializeOpDocumentListGuardrailsOutput(v **ListGuardrailsOu return nil } -type awsRestjson1_deserializeOpListModelCopyJobs struct { +type awsRestjson1_deserializeOpListModelCustomizationJobs struct { } -func (*awsRestjson1_deserializeOpListModelCopyJobs) ID() string { +func (*awsRestjson1_deserializeOpListModelCustomizationJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListModelCopyJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListModelCustomizationJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4601,9 +5872,9 @@ func (m *awsRestjson1_deserializeOpListModelCopyJobs) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListModelCopyJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListModelCustomizationJobs(response, &metadata) } - output := &ListModelCopyJobsOutput{} + output := &ListModelCustomizationJobsOutput{} out.Result = output var buff [1024]byte @@ -4624,7 +5895,7 @@ func (m *awsRestjson1_deserializeOpListModelCopyJobs) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListModelCopyJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListModelCustomizationJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4637,7 +5908,7 @@ func (m *awsRestjson1_deserializeOpListModelCopyJobs) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListModelCopyJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListModelCustomizationJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4684,9 +5955,6 @@ func awsRestjson1_deserializeOpErrorListModelCopyJobs(response *smithyhttp.Respo case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4703,7 +5971,7 @@ func awsRestjson1_deserializeOpErrorListModelCopyJobs(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListModelCopyJobsOutput(v **ListModelCopyJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListModelCustomizationJobsOutput(v **ListModelCustomizationJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4716,17 +5984,17 @@ func awsRestjson1_deserializeOpDocumentListModelCopyJobsOutput(v **ListModelCopy return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListModelCopyJobsOutput + var sv *ListModelCustomizationJobsOutput if *v == nil { - sv = &ListModelCopyJobsOutput{} + sv = &ListModelCustomizationJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "modelCopyJobSummaries": - if err := awsRestjson1_deserializeDocumentModelCopyJobSummaries(&sv.ModelCopyJobSummaries, value); err != nil { + case "modelCustomizationJobSummaries": + if err := awsRestjson1_deserializeDocumentModelCustomizationJobSummaries(&sv.ModelCustomizationJobSummaries, value); err != nil { return err } @@ -4748,14 +6016,14 @@ func awsRestjson1_deserializeOpDocumentListModelCopyJobsOutput(v **ListModelCopy return nil } -type awsRestjson1_deserializeOpListModelCustomizationJobs struct { +type awsRestjson1_deserializeOpListModelImportJobs struct { } -func (*awsRestjson1_deserializeOpListModelCustomizationJobs) ID() string { +func (*awsRestjson1_deserializeOpListModelImportJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListModelCustomizationJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListModelImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4769,9 +6037,9 @@ func (m *awsRestjson1_deserializeOpListModelCustomizationJobs) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListModelCustomizationJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListModelImportJobs(response, &metadata) } - output := &ListModelCustomizationJobsOutput{} + output := &ListModelImportJobsOutput{} out.Result = output var buff [1024]byte @@ -4792,7 +6060,7 @@ func (m *awsRestjson1_deserializeOpListModelCustomizationJobs) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListModelCustomizationJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListModelImportJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4805,7 +6073,7 @@ func (m *awsRestjson1_deserializeOpListModelCustomizationJobs) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListModelCustomizationJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListModelImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4868,7 +6136,7 @@ func awsRestjson1_deserializeOpErrorListModelCustomizationJobs(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListModelCustomizationJobsOutput(v **ListModelCustomizationJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListModelImportJobsOutput(v **ListModelImportJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4881,17 +6149,17 @@ func awsRestjson1_deserializeOpDocumentListModelCustomizationJobsOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListModelCustomizationJobsOutput + var sv *ListModelImportJobsOutput if *v == nil { - sv = &ListModelCustomizationJobsOutput{} + sv = &ListModelImportJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "modelCustomizationJobSummaries": - if err := awsRestjson1_deserializeDocumentModelCustomizationJobSummaries(&sv.ModelCustomizationJobSummaries, value); err != nil { + case "modelImportJobSummaries": + if err := awsRestjson1_deserializeDocumentModelImportJobSummaries(&sv.ModelImportJobSummaries, value); err != nil { return err } @@ -6547,24 +7815,100 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, 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.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonBlankString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutomatedEvaluationConfig(v **types.AutomatedEvaluationConfig, 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.AutomatedEvaluationConfig + if *v == nil { + sv = &types.AutomatedEvaluationConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "datasetMetricConfigs": + if err := awsRestjson1_deserializeDocumentEvaluationDatasetMetricConfigs(&sv.DatasetMetricConfigs, value); err != nil { + return err + } + + default: + _, _ = key, value - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), } - return err } - - errorBody.Seek(0, io.SeekStart) - - return output + *v = sv + return nil } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobError(v **types.BatchDeleteEvaluationJobError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6577,20 +7921,38 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.BatchDeleteEvaluationJobError if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.BatchDeleteEvaluationJobError{} } else { sv = *v } for key, value := range shape { switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + + case "jobIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationJobIdentifier to be of type string, got %T instead", value) + } + sv.JobIdentifier = ptr.String(jtv) + } + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonBlankString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -6604,7 +7966,41 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentAutomatedEvaluationConfig(v **types.AutomatedEvaluationConfig, value interface{}) error { +func awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobErrors(v *[]types.BatchDeleteEvaluationJobError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BatchDeleteEvaluationJobError + if *v == nil { + cv = []types.BatchDeleteEvaluationJobError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchDeleteEvaluationJobError + destAddr := &col + if err := awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobItem(v **types.BatchDeleteEvaluationJobItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6617,18 +8013,31 @@ func awsRestjson1_deserializeDocumentAutomatedEvaluationConfig(v **types.Automat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AutomatedEvaluationConfig + var sv *types.BatchDeleteEvaluationJobItem if *v == nil { - sv = &types.AutomatedEvaluationConfig{} + sv = &types.BatchDeleteEvaluationJobItem{} } else { sv = *v } for key, value := range shape { switch key { - case "datasetMetricConfigs": - if err := awsRestjson1_deserializeDocumentEvaluationDatasetMetricConfigs(&sv.DatasetMetricConfigs, value); err != nil { - return err + case "jobIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationJobIdentifier to be of type string, got %T instead", value) + } + sv.JobIdentifier = ptr.String(jtv) + } + + case "jobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationJobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.EvaluationJobStatus(jtv) } default: @@ -6640,6 +8049,40 @@ func awsRestjson1_deserializeDocumentAutomatedEvaluationConfig(v **types.Automat return nil } +func awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobItems(v *[]types.BatchDeleteEvaluationJobItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BatchDeleteEvaluationJobItem + if *v == nil { + cv = []types.BatchDeleteEvaluationJobItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchDeleteEvaluationJobItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentBatchDeleteEvaluationJobItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentCloudWatchConfig(v **types.CloudWatchConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9019,17 +10462,162 @@ func awsRestjson1_deserializeDocumentHumanEvaluationCustomMetrics(v *[]types.Hum return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.HumanEvaluationCustomMetric + var cv []types.HumanEvaluationCustomMetric + if *v == nil { + cv = []types.HumanEvaluationCustomMetric{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.HumanEvaluationCustomMetric + destAddr := &col + if err := awsRestjson1_deserializeDocumentHumanEvaluationCustomMetric(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentHumanWorkflowConfig(v **types.HumanWorkflowConfig, 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.HumanWorkflowConfig + if *v == nil { + sv = &types.HumanWorkflowConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowDefinitionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SageMakerFlowDefinitionArn to be of type string, got %T instead", value) + } + sv.FlowDefinitionArn = ptr.String(jtv) + } + + case "instructions": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HumanTaskInstructions to be of type string, got %T instead", value) + } + sv.Instructions = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImportedModelSummary(v **types.ImportedModelSummary, 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.ImportedModelSummary + if *v == nil { + sv = &types.ImportedModelSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "modelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportedModelArn to be of type string, got %T instead", value) + } + sv.ModelArn = ptr.String(jtv) + } + + case "modelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportedModelName to be of type string, got %T instead", value) + } + sv.ModelName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImportedModelSummaryList(v *[]types.ImportedModelSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ImportedModelSummary if *v == nil { - cv = []types.HumanEvaluationCustomMetric{} + cv = []types.ImportedModelSummary{} } else { cv = *v } for _, value := range shape { - var col types.HumanEvaluationCustomMetric + var col types.ImportedModelSummary destAddr := &col - if err := awsRestjson1_deserializeDocumentHumanEvaluationCustomMetric(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentImportedModelSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -9040,55 +10628,6 @@ func awsRestjson1_deserializeDocumentHumanEvaluationCustomMetrics(v *[]types.Hum return nil } -func awsRestjson1_deserializeDocumentHumanWorkflowConfig(v **types.HumanWorkflowConfig, 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.HumanWorkflowConfig - if *v == nil { - sv = &types.HumanWorkflowConfig{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "flowDefinitionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SageMakerFlowDefinitionArn to be of type string, got %T instead", value) - } - sv.FlowDefinitionArn = ptr.String(jtv) - } - - case "instructions": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected HumanTaskInstructions to be of type string, got %T instead", value) - } - sv.Instructions = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeDocumentInferenceTypeList(v *[]types.InferenceType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9636,6 +11175,195 @@ func awsRestjson1_deserializeDocumentModelCustomizationList(v *[]types.ModelCust return nil } +func awsRestjson1_deserializeDocumentModelDataSource(v *types.ModelDataSource, 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 uv types.ModelDataSource +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "s3DataSource": + var mv types.S3DataSource + destAddr := &mv + if err := awsRestjson1_deserializeDocumentS3DataSource(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ModelDataSourceMemberS3DataSource{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentModelImportJobSummaries(v *[]types.ModelImportJobSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ModelImportJobSummary + if *v == nil { + cv = []types.ModelImportJobSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ModelImportJobSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentModelImportJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentModelImportJobSummary(v **types.ModelImportJobSummary, 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.ModelImportJobSummary + if *v == nil { + sv = &types.ModelImportJobSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "endTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.EndTime = ptr.Time(t) + } + + case "importedModelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportedModelArn to be of type string, got %T instead", value) + } + sv.ImportedModelArn = ptr.String(jtv) + } + + case "importedModelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportedModelName to be of type string, got %T instead", value) + } + sv.ImportedModelName = ptr.String(jtv) + } + + case "jobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelImportJobArn to be of type string, got %T instead", value) + } + sv.JobArn = ptr.String(jtv) + } + + case "jobName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobName to be of type string, got %T instead", value) + } + sv.JobName = ptr.String(jtv) + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Time(t) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelImportJobStatus to be of type string, got %T instead", value) + } + sv.Status = types.ModelImportJobStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentModelInvocationJobInputDataConfig(v *types.ModelInvocationJobInputDataConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10375,6 +12103,46 @@ func awsRestjson1_deserializeDocumentS3Config(v **types.S3Config, value interfac return nil } +func awsRestjson1_deserializeDocumentS3DataSource(v **types.S3DataSource, 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.S3DataSource + if *v == nil { + sv = &types.S3DataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSecurityGroupIds(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/bedrock/generated.json b/service/bedrock/generated.json index 5c1ac6e5c85..cca32923411 100644 --- a/service/bedrock/generated.json +++ b/service/bedrock/generated.json @@ -8,23 +8,28 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_BatchDeleteEvaluationJob.go", "api_op_CreateEvaluationJob.go", "api_op_CreateGuardrail.go", "api_op_CreateGuardrailVersion.go", "api_op_CreateModelCopyJob.go", "api_op_CreateModelCustomizationJob.go", + "api_op_CreateModelImportJob.go", "api_op_CreateModelInvocationJob.go", "api_op_CreateProvisionedModelThroughput.go", "api_op_DeleteCustomModel.go", "api_op_DeleteGuardrail.go", + "api_op_DeleteImportedModel.go", "api_op_DeleteModelInvocationLoggingConfiguration.go", "api_op_DeleteProvisionedModelThroughput.go", "api_op_GetCustomModel.go", "api_op_GetEvaluationJob.go", "api_op_GetFoundationModel.go", "api_op_GetGuardrail.go", + "api_op_GetImportedModel.go", "api_op_GetModelCopyJob.go", "api_op_GetModelCustomizationJob.go", + "api_op_GetModelImportJob.go", "api_op_GetModelInvocationJob.go", "api_op_GetModelInvocationLoggingConfiguration.go", "api_op_GetProvisionedModelThroughput.go", @@ -32,8 +37,10 @@ "api_op_ListEvaluationJobs.go", "api_op_ListFoundationModels.go", "api_op_ListGuardrails.go", + "api_op_ListImportedModels.go", "api_op_ListModelCopyJobs.go", "api_op_ListModelCustomizationJobs.go", + "api_op_ListModelImportJobs.go", "api_op_ListModelInvocationJobs.go", "api_op_ListProvisionedModelThroughputs.go", "api_op_ListTagsForResource.go", diff --git a/service/bedrock/serializers.go b/service/bedrock/serializers.go index c5807770288..2040a4c420b 100644 --- a/service/bedrock/serializers.go +++ b/service/bedrock/serializers.go @@ -16,6 +16,83 @@ import ( "math" ) +type awsRestjson1_serializeOpBatchDeleteEvaluationJob struct { +} + +func (*awsRestjson1_serializeOpBatchDeleteEvaluationJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchDeleteEvaluationJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchDeleteEvaluationJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/evaluation-jobs/batch-delete") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentBatchDeleteEvaluationJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsBatchDeleteEvaluationJobInput(v *BatchDeleteEvaluationJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentBatchDeleteEvaluationJobInput(v *BatchDeleteEvaluationJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.JobIdentifiers != nil { + ok := object.Key("jobIdentifiers") + if err := awsRestjson1_serializeDocumentEvaluationJobIdentifiers(v.JobIdentifiers, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateEvaluationJob struct { } @@ -625,6 +702,129 @@ func awsRestjson1_serializeOpDocumentCreateModelCustomizationJobInput(v *CreateM return nil } +type awsRestjson1_serializeOpCreateModelImportJob struct { +} + +func (*awsRestjson1_serializeOpCreateModelImportJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateModelImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateModelImportJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/model-import-jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateModelImportJobInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateModelImportJobInput(v *CreateModelImportJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateModelImportJobInput(v *CreateModelImportJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("clientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.ImportedModelKmsKeyId != nil { + ok := object.Key("importedModelKmsKeyId") + ok.String(*v.ImportedModelKmsKeyId) + } + + if v.ImportedModelName != nil { + ok := object.Key("importedModelName") + ok.String(*v.ImportedModelName) + } + + if v.ImportedModelTags != nil { + ok := object.Key("importedModelTags") + if err := awsRestjson1_serializeDocumentTagList(v.ImportedModelTags, ok); err != nil { + return err + } + } + + if v.JobName != nil { + ok := object.Key("jobName") + ok.String(*v.JobName) + } + + if v.JobTags != nil { + ok := object.Key("jobTags") + if err := awsRestjson1_serializeDocumentTagList(v.JobTags, ok); err != nil { + return err + } + } + + if v.ModelDataSource != nil { + ok := object.Key("modelDataSource") + if err := awsRestjson1_serializeDocumentModelDataSource(v.ModelDataSource, ok); err != nil { + return err + } + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.VpcConfig != nil { + ok := object.Key("vpcConfig") + if err := awsRestjson1_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateModelInvocationJob struct { } @@ -977,6 +1177,71 @@ func awsRestjson1_serializeOpHttpBindingsDeleteGuardrailInput(v *DeleteGuardrail return nil } +type awsRestjson1_serializeOpDeleteImportedModel struct { +} + +func (*awsRestjson1_serializeOpDeleteImportedModel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteImportedModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteImportedModelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/imported-models/{modelIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteImportedModelInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteImportedModelInput(v *DeleteImportedModelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ModelIdentifier == nil || len(*v.ModelIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member modelIdentifier must not be empty")} + } + if v.ModelIdentifier != nil { + if err := encoder.SetURI("modelIdentifier").String(*v.ModelIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteModelInvocationLoggingConfiguration struct { } @@ -1224,14 +1489,148 @@ func awsRestjson1_serializeOpHttpBindingsGetEvaluationJobInput(v *GetEvaluationJ return nil } -type awsRestjson1_serializeOpGetFoundationModel struct { +type awsRestjson1_serializeOpGetFoundationModel struct { +} + +func (*awsRestjson1_serializeOpGetFoundationModel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFoundationModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetFoundationModelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/foundation-models/{modelIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFoundationModelInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFoundationModelInput(v *GetFoundationModelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ModelIdentifier == nil || len(*v.ModelIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member modelIdentifier must not be empty")} + } + if v.ModelIdentifier != nil { + if err := encoder.SetURI("modelIdentifier").String(*v.ModelIdentifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetGuardrail struct { +} + +func (*awsRestjson1_serializeOpGetGuardrail) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetGuardrail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetGuardrailInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/guardrails/{guardrailIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetGuardrailInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetGuardrailInput(v *GetGuardrailInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GuardrailIdentifier == nil || len(*v.GuardrailIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member guardrailIdentifier must not be empty")} + } + if v.GuardrailIdentifier != nil { + if err := encoder.SetURI("guardrailIdentifier").String(*v.GuardrailIdentifier); err != nil { + return err + } + } + + if v.GuardrailVersion != nil { + encoder.SetQuery("guardrailVersion").String(*v.GuardrailVersion) + } + + return nil +} + +type awsRestjson1_serializeOpGetImportedModel struct { } -func (*awsRestjson1_serializeOpGetFoundationModel) ID() string { +func (*awsRestjson1_serializeOpGetImportedModel) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetFoundationModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetImportedModel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1239,13 +1638,13 @@ func (m *awsRestjson1_serializeOpGetFoundationModel) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetFoundationModelInput) + input, ok := in.Parameters.(*GetImportedModelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/foundation-models/{modelIdentifier}") + opPath, opQuery := httpbinding.SplitURI("/imported-models/{modelIdentifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1261,7 +1660,7 @@ func (m *awsRestjson1_serializeOpGetFoundationModel) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetFoundationModelInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetImportedModelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1272,7 +1671,7 @@ func (m *awsRestjson1_serializeOpGetFoundationModel) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetFoundationModelInput(v *GetFoundationModelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetImportedModelInput(v *GetImportedModelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1289,14 +1688,14 @@ func awsRestjson1_serializeOpHttpBindingsGetFoundationModelInput(v *GetFoundatio return nil } -type awsRestjson1_serializeOpGetGuardrail struct { +type awsRestjson1_serializeOpGetModelCopyJob struct { } -func (*awsRestjson1_serializeOpGetGuardrail) ID() string { +func (*awsRestjson1_serializeOpGetModelCopyJob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetGuardrail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetModelCopyJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1304,13 +1703,13 @@ func (m *awsRestjson1_serializeOpGetGuardrail) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetGuardrailInput) + input, ok := in.Parameters.(*GetModelCopyJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/guardrails/{guardrailIdentifier}") + opPath, opQuery := httpbinding.SplitURI("/model-copy-jobs/{jobArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1326,7 +1725,7 @@ func (m *awsRestjson1_serializeOpGetGuardrail) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetGuardrailInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetModelCopyJobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1337,35 +1736,31 @@ func (m *awsRestjson1_serializeOpGetGuardrail) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetGuardrailInput(v *GetGuardrailInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetModelCopyJobInput(v *GetModelCopyJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GuardrailIdentifier == nil || len(*v.GuardrailIdentifier) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member guardrailIdentifier must not be empty")} + if v.JobArn == nil || len(*v.JobArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member jobArn must not be empty")} } - if v.GuardrailIdentifier != nil { - if err := encoder.SetURI("guardrailIdentifier").String(*v.GuardrailIdentifier); err != nil { + if v.JobArn != nil { + if err := encoder.SetURI("jobArn").String(*v.JobArn); err != nil { return err } } - if v.GuardrailVersion != nil { - encoder.SetQuery("guardrailVersion").String(*v.GuardrailVersion) - } - return nil } -type awsRestjson1_serializeOpGetModelCopyJob struct { +type awsRestjson1_serializeOpGetModelCustomizationJob struct { } -func (*awsRestjson1_serializeOpGetModelCopyJob) ID() string { +func (*awsRestjson1_serializeOpGetModelCustomizationJob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetModelCopyJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetModelCustomizationJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1373,13 +1768,13 @@ func (m *awsRestjson1_serializeOpGetModelCopyJob) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetModelCopyJobInput) + input, ok := in.Parameters.(*GetModelCustomizationJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/model-copy-jobs/{jobArn}") + opPath, opQuery := httpbinding.SplitURI("/model-customization-jobs/{jobIdentifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1395,7 +1790,7 @@ func (m *awsRestjson1_serializeOpGetModelCopyJob) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetModelCopyJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetModelCustomizationJobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1406,16 +1801,16 @@ func (m *awsRestjson1_serializeOpGetModelCopyJob) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetModelCopyJobInput(v *GetModelCopyJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetModelCustomizationJobInput(v *GetModelCustomizationJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.JobArn == nil || len(*v.JobArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member jobArn must not be empty")} + if v.JobIdentifier == nil || len(*v.JobIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member jobIdentifier must not be empty")} } - if v.JobArn != nil { - if err := encoder.SetURI("jobArn").String(*v.JobArn); err != nil { + if v.JobIdentifier != nil { + if err := encoder.SetURI("jobIdentifier").String(*v.JobIdentifier); err != nil { return err } } @@ -1423,14 +1818,14 @@ func awsRestjson1_serializeOpHttpBindingsGetModelCopyJobInput(v *GetModelCopyJob return nil } -type awsRestjson1_serializeOpGetModelCustomizationJob struct { +type awsRestjson1_serializeOpGetModelImportJob struct { } -func (*awsRestjson1_serializeOpGetModelCustomizationJob) ID() string { +func (*awsRestjson1_serializeOpGetModelImportJob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetModelCustomizationJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetModelImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1438,13 +1833,13 @@ func (m *awsRestjson1_serializeOpGetModelCustomizationJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetModelCustomizationJobInput) + input, ok := in.Parameters.(*GetModelImportJobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/model-customization-jobs/{jobIdentifier}") + opPath, opQuery := httpbinding.SplitURI("/model-import-jobs/{jobIdentifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1460,7 +1855,7 @@ func (m *awsRestjson1_serializeOpGetModelCustomizationJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetModelCustomizationJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetModelImportJobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1471,7 +1866,7 @@ func (m *awsRestjson1_serializeOpGetModelCustomizationJob) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetModelCustomizationJobInput(v *GetModelCustomizationJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetModelImportJobInput(v *GetModelImportJobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1994,6 +2389,90 @@ func awsRestjson1_serializeOpHttpBindingsListGuardrailsInput(v *ListGuardrailsIn return nil } +type awsRestjson1_serializeOpListImportedModels struct { +} + +func (*awsRestjson1_serializeOpListImportedModels) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListImportedModels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListImportedModelsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/imported-models") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListImportedModelsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListImportedModelsInput(v *ListImportedModelsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CreationTimeAfter != nil { + encoder.SetQuery("creationTimeAfter").String(smithytime.FormatDateTime(*v.CreationTimeAfter)) + } + + if v.CreationTimeBefore != nil { + encoder.SetQuery("creationTimeBefore").String(smithytime.FormatDateTime(*v.CreationTimeBefore)) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NameContains != nil { + encoder.SetQuery("nameContains").String(*v.NameContains) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + encoder.SetQuery("sortBy").String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + encoder.SetQuery("sortOrder").String(string(v.SortOrder)) + } + + return nil +} + type awsRestjson1_serializeOpListModelCopyJobs struct { } @@ -2178,6 +2657,94 @@ func awsRestjson1_serializeOpHttpBindingsListModelCustomizationJobsInput(v *List return nil } +type awsRestjson1_serializeOpListModelImportJobs struct { +} + +func (*awsRestjson1_serializeOpListModelImportJobs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListModelImportJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListModelImportJobsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/model-import-jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListModelImportJobsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListModelImportJobsInput(v *ListModelImportJobsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CreationTimeAfter != nil { + encoder.SetQuery("creationTimeAfter").String(smithytime.FormatDateTime(*v.CreationTimeAfter)) + } + + if v.CreationTimeBefore != nil { + encoder.SetQuery("creationTimeBefore").String(smithytime.FormatDateTime(*v.CreationTimeBefore)) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NameContains != nil { + encoder.SetQuery("nameContains").String(*v.NameContains) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + encoder.SetQuery("sortBy").String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + encoder.SetQuery("sortOrder").String(string(v.SortOrder)) + } + + if len(v.StatusEquals) > 0 { + encoder.SetQuery("statusEquals").String(string(v.StatusEquals)) + } + + return nil +} + type awsRestjson1_serializeOpListModelInvocationJobs struct { } @@ -3276,6 +3843,17 @@ func awsRestjson1_serializeDocumentEvaluationInferenceConfig(v types.EvaluationI return nil } +func awsRestjson1_serializeDocumentEvaluationJobIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentEvaluationMetricNames(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -3795,6 +4373,24 @@ func awsRestjson1_serializeDocumentModelCustomizationHyperParameters(v map[strin return nil } +func awsRestjson1_serializeDocumentModelDataSource(v types.ModelDataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ModelDataSourceMemberS3DataSource: + av := object.Key("s3DataSource") + if err := awsRestjson1_serializeDocumentS3DataSource(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentModelInvocationJobInputDataConfig(v types.ModelInvocationJobInputDataConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3894,6 +4490,18 @@ func awsRestjson1_serializeDocumentS3Config(v *types.S3Config, value smithyjson. return nil } +func awsRestjson1_serializeDocumentS3DataSource(v *types.S3DataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Uri != nil { + ok := object.Key("s3Uri") + ok.String(*v.S3Uri) + } + + return nil +} + func awsRestjson1_serializeDocumentSecurityGroupIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/bedrock/snapshot/api_op_BatchDeleteEvaluationJob.go.snap b/service/bedrock/snapshot/api_op_BatchDeleteEvaluationJob.go.snap new file mode 100644 index 00000000000..3b778611ece --- /dev/null +++ b/service/bedrock/snapshot/api_op_BatchDeleteEvaluationJob.go.snap @@ -0,0 +1,36 @@ +BatchDeleteEvaluationJob + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_CreateModelImportJob.go.snap b/service/bedrock/snapshot/api_op_CreateModelImportJob.go.snap new file mode 100644 index 00000000000..33555622afa --- /dev/null +++ b/service/bedrock/snapshot/api_op_CreateModelImportJob.go.snap @@ -0,0 +1,36 @@ +CreateModelImportJob + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_DeleteImportedModel.go.snap b/service/bedrock/snapshot/api_op_DeleteImportedModel.go.snap new file mode 100644 index 00000000000..983b033744b --- /dev/null +++ b/service/bedrock/snapshot/api_op_DeleteImportedModel.go.snap @@ -0,0 +1,36 @@ +DeleteImportedModel + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_GetImportedModel.go.snap b/service/bedrock/snapshot/api_op_GetImportedModel.go.snap new file mode 100644 index 00000000000..961a3ce54c3 --- /dev/null +++ b/service/bedrock/snapshot/api_op_GetImportedModel.go.snap @@ -0,0 +1,36 @@ +GetImportedModel + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_GetModelImportJob.go.snap b/service/bedrock/snapshot/api_op_GetModelImportJob.go.snap new file mode 100644 index 00000000000..0b6b46f7f97 --- /dev/null +++ b/service/bedrock/snapshot/api_op_GetModelImportJob.go.snap @@ -0,0 +1,36 @@ +GetModelImportJob + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_ListImportedModels.go.snap b/service/bedrock/snapshot/api_op_ListImportedModels.go.snap new file mode 100644 index 00000000000..b8b883bb34d --- /dev/null +++ b/service/bedrock/snapshot/api_op_ListImportedModels.go.snap @@ -0,0 +1,35 @@ +ListImportedModels + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_ListModelImportJobs.go.snap b/service/bedrock/snapshot/api_op_ListModelImportJobs.go.snap new file mode 100644 index 00000000000..42bfad52b67 --- /dev/null +++ b/service/bedrock/snapshot/api_op_ListModelImportJobs.go.snap @@ -0,0 +1,35 @@ +ListModelImportJobs + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot_test.go b/service/bedrock/snapshot_test.go index 71f0443b008..c49613e4108 100644 --- a/service/bedrock/snapshot_test.go +++ b/service/bedrock/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_BatchDeleteEvaluationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteEvaluationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchDeleteEvaluationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateEvaluationJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateEvaluationJob(context.Background(), nil, func(o *Options) { @@ -122,6 +134,18 @@ func TestCheckSnapshot_CreateModelCustomizationJob(t *testing.T) { } } +func TestCheckSnapshot_CreateModelImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateModelImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateModelImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateModelInvocationJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateModelInvocationJob(context.Background(), nil, func(o *Options) { @@ -170,6 +194,18 @@ func TestCheckSnapshot_DeleteGuardrail(t *testing.T) { } } +func TestCheckSnapshot_DeleteImportedModel(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteImportedModel(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteImportedModel") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteModelInvocationLoggingConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteModelInvocationLoggingConfiguration(context.Background(), nil, func(o *Options) { @@ -242,6 +278,18 @@ func TestCheckSnapshot_GetGuardrail(t *testing.T) { } } +func TestCheckSnapshot_GetImportedModel(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetImportedModel(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetImportedModel") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetModelCopyJob(t *testing.T) { svc := New(Options{}) _, err := svc.GetModelCopyJob(context.Background(), nil, func(o *Options) { @@ -266,6 +314,18 @@ func TestCheckSnapshot_GetModelCustomizationJob(t *testing.T) { } } +func TestCheckSnapshot_GetModelImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetModelImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetModelImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetModelInvocationJob(t *testing.T) { svc := New(Options{}) _, err := svc.GetModelInvocationJob(context.Background(), nil, func(o *Options) { @@ -350,6 +410,18 @@ func TestCheckSnapshot_ListGuardrails(t *testing.T) { } } +func TestCheckSnapshot_ListImportedModels(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListImportedModels(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListImportedModels") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListModelCopyJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListModelCopyJobs(context.Background(), nil, func(o *Options) { @@ -374,6 +446,18 @@ func TestCheckSnapshot_ListModelCustomizationJobs(t *testing.T) { } } +func TestCheckSnapshot_ListModelImportJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListModelImportJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListModelImportJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListModelInvocationJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListModelInvocationJobs(context.Background(), nil, func(o *Options) { @@ -505,6 +589,18 @@ func TestCheckSnapshot_UpdateProvisionedModelThroughput(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_BatchDeleteEvaluationJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteEvaluationJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchDeleteEvaluationJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateEvaluationJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateEvaluationJob(context.Background(), nil, func(o *Options) { @@ -565,6 +661,18 @@ func TestUpdateSnapshot_CreateModelCustomizationJob(t *testing.T) { } } +func TestUpdateSnapshot_CreateModelImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateModelImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateModelImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateModelInvocationJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateModelInvocationJob(context.Background(), nil, func(o *Options) { @@ -613,6 +721,18 @@ func TestUpdateSnapshot_DeleteGuardrail(t *testing.T) { } } +func TestUpdateSnapshot_DeleteImportedModel(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteImportedModel(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteImportedModel") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteModelInvocationLoggingConfiguration(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteModelInvocationLoggingConfiguration(context.Background(), nil, func(o *Options) { @@ -685,6 +805,18 @@ func TestUpdateSnapshot_GetGuardrail(t *testing.T) { } } +func TestUpdateSnapshot_GetImportedModel(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetImportedModel(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetImportedModel") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetModelCopyJob(t *testing.T) { svc := New(Options{}) _, err := svc.GetModelCopyJob(context.Background(), nil, func(o *Options) { @@ -709,6 +841,18 @@ func TestUpdateSnapshot_GetModelCustomizationJob(t *testing.T) { } } +func TestUpdateSnapshot_GetModelImportJob(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetModelImportJob(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetModelImportJob") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetModelInvocationJob(t *testing.T) { svc := New(Options{}) _, err := svc.GetModelInvocationJob(context.Background(), nil, func(o *Options) { @@ -793,6 +937,18 @@ func TestUpdateSnapshot_ListGuardrails(t *testing.T) { } } +func TestUpdateSnapshot_ListImportedModels(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListImportedModels(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListImportedModels") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListModelCopyJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListModelCopyJobs(context.Background(), nil, func(o *Options) { @@ -817,6 +973,18 @@ func TestUpdateSnapshot_ListModelCustomizationJobs(t *testing.T) { } } +func TestUpdateSnapshot_ListModelImportJobs(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListModelImportJobs(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListModelImportJobs") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListModelInvocationJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListModelInvocationJobs(context.Background(), nil, func(o *Options) { diff --git a/service/bedrock/types/enums.go b/service/bedrock/types/enums.go index 527e5c1594f..10b991e919b 100644 --- a/service/bedrock/types/enums.go +++ b/service/bedrock/types/enums.go @@ -49,6 +49,7 @@ const ( EvaluationJobStatusFailed EvaluationJobStatus = "Failed" EvaluationJobStatusStopping EvaluationJobStatus = "Stopping" EvaluationJobStatusStopped EvaluationJobStatus = "Stopped" + EvaluationJobStatusDeleting EvaluationJobStatus = "Deleting" ) // Values returns all known values for EvaluationJobStatus. Note that this can be @@ -62,6 +63,7 @@ func (EvaluationJobStatus) Values() []EvaluationJobStatus { "Failed", "Stopping", "Stopped", + "Deleting", } } @@ -466,6 +468,27 @@ func (ModelCustomizationJobStatus) Values() []ModelCustomizationJobStatus { } } +type ModelImportJobStatus string + +// Enum values for ModelImportJobStatus +const ( + ModelImportJobStatusInProgress ModelImportJobStatus = "InProgress" + ModelImportJobStatusCompleted ModelImportJobStatus = "Completed" + ModelImportJobStatusFailed ModelImportJobStatus = "Failed" +) + +// Values returns all known values for ModelImportJobStatus. 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 (ModelImportJobStatus) Values() []ModelImportJobStatus { + return []ModelImportJobStatus{ + "InProgress", + "Completed", + "Failed", + } +} + type ModelInvocationJobStatus string // Enum values for ModelInvocationJobStatus diff --git a/service/bedrock/types/types.go b/service/bedrock/types/types.go index 667703bcc91..2b854a31222 100644 --- a/service/bedrock/types/types.go +++ b/service/bedrock/types/types.go @@ -20,6 +20,42 @@ type AutomatedEvaluationConfig struct { noSmithyDocumentSerde } +// A JSON array that provides the status of the model evaluation jobs being +// deleted. +type BatchDeleteEvaluationJobError struct { + + // A HTTP status code of the model evaluation job being deleted. + // + // This member is required. + Code *string + + // The ARN of the model evaluation job being deleted. + // + // This member is required. + JobIdentifier *string + + // A status message about the model evaluation job deletion. + Message *string + + noSmithyDocumentSerde +} + +// An array of model evaluation jobs to be deleted, and their associated statuses. +type BatchDeleteEvaluationJobItem struct { + + // The ARN of model evaluation job to be deleted. + // + // This member is required. + JobIdentifier *string + + // The status of the job's deletion. + // + // This member is required. + JobStatus EvaluationJobStatus + + noSmithyDocumentSerde +} + // CloudWatch logging configuration. type CloudWatchConfig struct { @@ -89,7 +125,7 @@ type CustomModelSummary struct { // "temperature":"0.25" key value pair would need to be formatted as // \"temperature\":\"0.25\" to successfully accepted in the request. // -// [Inference parameters for foundation models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-evaluation-prompt-datasets-custom.html +// [Inference parameters for foundation models]: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html type EvaluationBedrockModel struct { // Each Amazon Bedrock support different inference parameters that change how the @@ -143,7 +179,7 @@ type EvaluationDataset struct { // Used to specify supported built-in prompt datasets. Valid values are // Builtin.Bold , Builtin.BoolQ , Builtin.NaturalQuestions , Builtin.Gigaword , - // Builtin.RealToxicityPrompts , Builtin.TriviaQa , Builtin.T-Rex , + // Builtin.RealToxicityPrompts , Builtin.TriviaQA , Builtin.T-Rex , // Builtin.WomensEcommerceClothingReviews and Builtin.Wikitext2 . // // This member is required. @@ -1166,6 +1202,27 @@ type HumanWorkflowConfig struct { noSmithyDocumentSerde } +// Information about tne imported model. +type ImportedModelSummary struct { + + // Creation time of the imported model. + // + // This member is required. + CreationTime *time.Time + + // The Amazon Resource Name (ARN) of the imported model. + // + // This member is required. + ModelArn *string + + // Name of the imported model. + // + // This member is required. + ModelName *string + + noSmithyDocumentSerde +} + // Configuration fields for invocation logging. type LoggingConfig struct { @@ -1295,6 +1352,62 @@ type ModelCustomizationJobSummary struct { noSmithyDocumentSerde } +// Data source for the imported model. +// +// The following types satisfy this interface: +// +// ModelDataSourceMemberS3DataSource +type ModelDataSource interface { + isModelDataSource() +} + +// The Amazon S3 data source of the imported model. +type ModelDataSourceMemberS3DataSource struct { + Value S3DataSource + + noSmithyDocumentSerde +} + +func (*ModelDataSourceMemberS3DataSource) isModelDataSource() {} + +// Information about the import job. +type ModelImportJobSummary struct { + + // The time import job was created. + // + // This member is required. + CreationTime *time.Time + + // The Amazon Resource Name (ARN) of the import job. + // + // This member is required. + JobArn *string + + // The name of the import job. + // + // This member is required. + JobName *string + + // The status of the imported job. + // + // This member is required. + Status ModelImportJobStatus + + // The time when import job ended. + EndTime *time.Time + + // The Amazon resource Name (ARN) of the imported model. + ImportedModelArn *string + + // The name of the imported model. + ImportedModelName *string + + // The time when the import job was last modified. + LastModifiedTime *time.Time + + noSmithyDocumentSerde +} + // Details about the location of the input to the batch inference job. // // The following types satisfy this interface: @@ -1533,6 +1646,17 @@ type S3Config struct { noSmithyDocumentSerde } +// The Amazon S3 data source of the imported job. +type S3DataSource struct { + + // The URI of the Amazon S3 data source. + // + // This member is required. + S3Uri *string + + noSmithyDocumentSerde +} + // Definition of the key/value pair for a tag. type Tag struct { @@ -1631,5 +1755,6 @@ func (*UnknownUnionMember) isEvaluationConfig() {} func (*UnknownUnionMember) isEvaluationDatasetLocation() {} func (*UnknownUnionMember) isEvaluationInferenceConfig() {} func (*UnknownUnionMember) isEvaluationModelConfig() {} +func (*UnknownUnionMember) isModelDataSource() {} func (*UnknownUnionMember) isModelInvocationJobInputDataConfig() {} func (*UnknownUnionMember) isModelInvocationJobOutputDataConfig() {} diff --git a/service/bedrock/types/types_exported_test.go b/service/bedrock/types/types_exported_test.go index b1579cd6f98..56831691dde 100644 --- a/service/bedrock/types/types_exported_test.go +++ b/service/bedrock/types/types_exported_test.go @@ -83,6 +83,24 @@ func ExampleEvaluationModelConfig_outputUsage() { var _ *types.EvaluationBedrockModel +func ExampleModelDataSource_outputUsage() { + var union types.ModelDataSource + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ModelDataSourceMemberS3DataSource: + _ = v.Value // Value is types.S3DataSource + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.S3DataSource + func ExampleModelInvocationJobInputDataConfig_outputUsage() { var union types.ModelInvocationJobInputDataConfig // type switches can be used to check the union value diff --git a/service/bedrock/validators.go b/service/bedrock/validators.go index a9f7592999e..24bc410b041 100644 --- a/service/bedrock/validators.go +++ b/service/bedrock/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpBatchDeleteEvaluationJob struct { +} + +func (*validateOpBatchDeleteEvaluationJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchDeleteEvaluationJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchDeleteEvaluationJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchDeleteEvaluationJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateEvaluationJob struct { } @@ -110,6 +130,26 @@ func (m *validateOpCreateModelCustomizationJob) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpCreateModelImportJob struct { +} + +func (*validateOpCreateModelImportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateModelImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateModelImportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateModelImportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateModelInvocationJob struct { } @@ -190,6 +230,26 @@ func (m *validateOpDeleteGuardrail) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpDeleteImportedModel struct { +} + +func (*validateOpDeleteImportedModel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteImportedModel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteImportedModelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteImportedModelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteProvisionedModelThroughput struct { } @@ -290,6 +350,26 @@ func (m *validateOpGetGuardrail) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpGetImportedModel struct { +} + +func (*validateOpGetImportedModel) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetImportedModel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetImportedModelInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetImportedModelInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetModelCopyJob struct { } @@ -330,6 +410,26 @@ func (m *validateOpGetModelCustomizationJob) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpGetModelImportJob struct { +} + +func (*validateOpGetModelImportJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetModelImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetModelImportJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetModelImportJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetModelInvocationJob struct { } @@ -550,6 +650,10 @@ func (m *validateOpUpdateProvisionedModelThroughput) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +func addOpBatchDeleteEvaluationJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchDeleteEvaluationJob{}, middleware.After) +} + func addOpCreateEvaluationJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateEvaluationJob{}, middleware.After) } @@ -570,6 +674,10 @@ func addOpCreateModelCustomizationJobValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpCreateModelCustomizationJob{}, middleware.After) } +func addOpCreateModelImportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateModelImportJob{}, middleware.After) +} + func addOpCreateModelInvocationJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateModelInvocationJob{}, middleware.After) } @@ -586,6 +694,10 @@ func addOpDeleteGuardrailValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGuardrail{}, middleware.After) } +func addOpDeleteImportedModelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteImportedModel{}, middleware.After) +} + func addOpDeleteProvisionedModelThroughputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteProvisionedModelThroughput{}, middleware.After) } @@ -606,6 +718,10 @@ func addOpGetGuardrailValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetGuardrail{}, middleware.After) } +func addOpGetImportedModelValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetImportedModel{}, middleware.After) +} + func addOpGetModelCopyJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetModelCopyJob{}, middleware.After) } @@ -614,6 +730,10 @@ func addOpGetModelCustomizationJobValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpGetModelCustomizationJob{}, middleware.After) } +func addOpGetModelImportJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetModelImportJob{}, middleware.After) +} + func addOpGetModelInvocationJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetModelInvocationJob{}, middleware.After) } @@ -1319,6 +1439,25 @@ func validateLoggingConfig(v *types.LoggingConfig) error { } } +func validateModelDataSource(v types.ModelDataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModelDataSource"} + switch uv := v.(type) { + case *types.ModelDataSourceMemberS3DataSource: + if err := validateS3DataSource(&uv.Value); err != nil { + invalidParams.AddNested("[s3DataSource]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateModelInvocationJobInputDataConfig(v types.ModelInvocationJobInputDataConfig) error { if v == nil { return nil @@ -1417,6 +1556,21 @@ func validateS3Config(v *types.S3Config) error { } } +func validateS3DataSource(v *types.S3DataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3DataSource"} + if v.S3Uri == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Uri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -1536,6 +1690,21 @@ func validateVpcConfig(v *types.VpcConfig) error { } } +func validateOpBatchDeleteEvaluationJobInput(v *BatchDeleteEvaluationJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteEvaluationJobInput"} + if v.JobIdentifiers == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobIdentifiers")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateEvaluationJobInput(v *CreateEvaluationJobInput) error { if v == nil { return nil @@ -1730,6 +1899,49 @@ func validateOpCreateModelCustomizationJobInput(v *CreateModelCustomizationJobIn } } +func validateOpCreateModelImportJobInput(v *CreateModelImportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateModelImportJobInput"} + if v.JobName == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobName")) + } + if v.ImportedModelName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportedModelName")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if v.ModelDataSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ModelDataSource")) + } else if v.ModelDataSource != nil { + if err := validateModelDataSource(v.ModelDataSource); err != nil { + invalidParams.AddNested("ModelDataSource", err.(smithy.InvalidParamsError)) + } + } + if v.JobTags != nil { + if err := validateTagList(v.JobTags); err != nil { + invalidParams.AddNested("JobTags", err.(smithy.InvalidParamsError)) + } + } + if v.ImportedModelTags != nil { + if err := validateTagList(v.ImportedModelTags); err != nil { + invalidParams.AddNested("ImportedModelTags", err.(smithy.InvalidParamsError)) + } + } + if v.VpcConfig != nil { + if err := validateVpcConfig(v.VpcConfig); err != nil { + invalidParams.AddNested("VpcConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateModelInvocationJobInput(v *CreateModelInvocationJobInput) error { if v == nil { return nil @@ -1826,6 +2038,21 @@ func validateOpDeleteGuardrailInput(v *DeleteGuardrailInput) error { } } +func validateOpDeleteImportedModelInput(v *DeleteImportedModelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteImportedModelInput"} + if v.ModelIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ModelIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteProvisionedModelThroughputInput(v *DeleteProvisionedModelThroughputInput) error { if v == nil { return nil @@ -1901,6 +2128,21 @@ func validateOpGetGuardrailInput(v *GetGuardrailInput) error { } } +func validateOpGetImportedModelInput(v *GetImportedModelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetImportedModelInput"} + if v.ModelIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ModelIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetModelCopyJobInput(v *GetModelCopyJobInput) error { if v == nil { return nil @@ -1931,6 +2173,21 @@ func validateOpGetModelCustomizationJobInput(v *GetModelCustomizationJobInput) e } } +func validateOpGetModelImportJobInput(v *GetModelImportJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetModelImportJobInput"} + if v.JobIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("JobIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetModelInvocationJobInput(v *GetModelInvocationJobInput) error { if v == nil { return nil diff --git a/service/cloudcontrol/internal/endpoints/endpoints.go b/service/cloudcontrol/internal/endpoints/endpoints.go index a9419805c4f..5f2cbecd47f 100644 --- a/service/cloudcontrol/internal/endpoints/endpoints.go +++ b/service/cloudcontrol/internal/endpoints/endpoints.go @@ -238,6 +238,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "cloudcontrolapi.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "cloudcontrolapi.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/cloudformation/internal/endpoints/endpoints.go b/service/cloudformation/internal/endpoints/endpoints.go index 456a37185f4..32e7cc2263e 100644 --- a/service/cloudformation/internal/endpoints/endpoints.go +++ b/service/cloudformation/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/cloudtrail/internal/endpoints/endpoints.go b/service/cloudtrail/internal/endpoints/endpoints.go index b5f380ef167..fc3e5d95672 100644 --- a/service/cloudtrail/internal/endpoints/endpoints.go +++ b/service/cloudtrail/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/cloudwatch/internal/endpoints/endpoints.go b/service/cloudwatch/internal/endpoints/endpoints.go index 20bff1c7d54..2c96c0f9777 100644 --- a/service/cloudwatch/internal/endpoints/endpoints.go +++ b/service/cloudwatch/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/cloudwatchevents/internal/endpoints/endpoints.go b/service/cloudwatchevents/internal/endpoints/endpoints.go index a0880fe5701..fb5b5d93dbe 100644 --- a/service/cloudwatchevents/internal/endpoints/endpoints.go +++ b/service/cloudwatchevents/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/cloudwatchlogs/internal/endpoints/endpoints.go b/service/cloudwatchlogs/internal/endpoints/endpoints.go index dc679c6e114..f966f5dee13 100644 --- a/service/cloudwatchlogs/internal/endpoints/endpoints.go +++ b/service/cloudwatchlogs/internal/endpoints/endpoints.go @@ -238,6 +238,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "logs.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/codedeploy/internal/endpoints/endpoints.go b/service/codedeploy/internal/endpoints/endpoints.go index 048954b8269..9ed483f39a0 100644 --- a/service/codedeploy/internal/endpoints/endpoints.go +++ b/service/codedeploy/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/configservice/internal/endpoints/endpoints.go b/service/configservice/internal/endpoints/endpoints.go index 177a93fbe3f..15bac1be366 100644 --- a/service/configservice/internal/endpoints/endpoints.go +++ b/service/configservice/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/databasemigrationservice/internal/endpoints/endpoints.go b/service/databasemigrationservice/internal/endpoints/endpoints.go index 66d86bb424e..7b4363e71e1 100644 --- a/service/databasemigrationservice/internal/endpoints/endpoints.go +++ b/service/databasemigrationservice/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/datasync/internal/endpoints/endpoints.go b/service/datasync/internal/endpoints/endpoints.go index d723a4cb2bd..89d93a922a4 100644 --- a/service/datasync/internal/endpoints/endpoints.go +++ b/service/datasync/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/datazone/internal/endpoints/endpoints.go b/service/datazone/internal/endpoints/endpoints.go index 2f39e6d32b3..fd1772cd708 100644 --- a/service/datazone/internal/endpoints/endpoints.go +++ b/service/datazone/internal/endpoints/endpoints.go @@ -179,6 +179,11 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Hostname: "datazone.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{ + Hostname: "datazone.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/directconnect/internal/endpoints/endpoints.go b/service/directconnect/internal/endpoints/endpoints.go index 6c9f3d45cf3..0151a78f21c 100644 --- a/service/directconnect/internal/endpoints/endpoints.go +++ b/service/directconnect/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/dlm/internal/endpoints/endpoints.go b/service/dlm/internal/endpoints/endpoints.go index 914f12aba7f..74f852828b2 100644 --- a/service/dlm/internal/endpoints/endpoints.go +++ b/service/dlm/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/docdb/internal/endpoints/endpoints.go b/service/docdb/internal/endpoints/endpoints.go index 5d4818bd380..dde81c45502 100644 --- a/service/docdb/internal/endpoints/endpoints.go +++ b/service/docdb/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/dynamodb/internal/endpoints/endpoints.go b/service/dynamodb/internal/endpoints/endpoints.go index 4500e149217..182d4992507 100644 --- a/service/dynamodb/internal/endpoints/endpoints.go +++ b/service/dynamodb/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/dynamodbstreams/internal/endpoints/endpoints.go b/service/dynamodbstreams/internal/endpoints/endpoints.go index 7adf4c72c88..66e5192d26a 100644 --- a/service/dynamodbstreams/internal/endpoints/endpoints.go +++ b/service/dynamodbstreams/internal/endpoints/endpoints.go @@ -184,6 +184,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/ebs/internal/endpoints/endpoints.go b/service/ebs/internal/endpoints/endpoints.go index 7dcb34dc171..8414e536b62 100644 --- a/service/ebs/internal/endpoints/endpoints.go +++ b/service/ebs/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/ecr/internal/endpoints/endpoints.go b/service/ecr/internal/endpoints/endpoints.go index 48d24a1e80b..44a3545b218 100644 --- a/service/ecr/internal/endpoints/endpoints.go +++ b/service/ecr/internal/endpoints/endpoints.go @@ -227,6 +227,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-southeast-4", }, }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{ + Hostname: "api.ecr.ap-southeast-5.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-5", + }, + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/ecs/internal/endpoints/endpoints.go b/service/ecs/internal/endpoints/endpoints.go index 0a242adc4db..35eb863d511 100644 --- a/service/ecs/internal/endpoints/endpoints.go +++ b/service/ecs/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/eks/internal/endpoints/endpoints.go b/service/eks/internal/endpoints/endpoints.go index ee90455f8a9..05050b132ff 100644 --- a/service/eks/internal/endpoints/endpoints.go +++ b/service/eks/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/eksauth/internal/endpoints/endpoints.go b/service/eksauth/internal/endpoints/endpoints.go index 214a2a4c27b..1c7cc8c0cfd 100644 --- a/service/eksauth/internal/endpoints/endpoints.go +++ b/service/eksauth/internal/endpoints/endpoints.go @@ -194,6 +194,11 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Hostname: "eks-auth.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{ + Hostname: "eks-auth.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/elasticache/internal/endpoints/endpoints.go b/service/elasticache/internal/endpoints/endpoints.go index 42499b5893e..9f1953b8a4c 100644 --- a/service/elasticache/internal/endpoints/endpoints.go +++ b/service/elasticache/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/elasticloadbalancing/internal/endpoints/endpoints.go b/service/elasticloadbalancing/internal/endpoints/endpoints.go index 3af078bbe00..02a7812d6d4 100644 --- a/service/elasticloadbalancing/internal/endpoints/endpoints.go +++ b/service/elasticloadbalancing/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/elasticloadbalancingv2/internal/endpoints/endpoints.go b/service/elasticloadbalancingv2/internal/endpoints/endpoints.go index fb1daf57893..3812d9b3f86 100644 --- a/service/elasticloadbalancingv2/internal/endpoints/endpoints.go +++ b/service/elasticloadbalancingv2/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/elasticsearchservice/internal/endpoints/endpoints.go b/service/elasticsearchservice/internal/endpoints/endpoints.go index 5b06319c7bb..9070ec07ccb 100644 --- a/service/elasticsearchservice/internal/endpoints/endpoints.go +++ b/service/elasticsearchservice/internal/endpoints/endpoints.go @@ -238,6 +238,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "aos.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "aos.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/emr/internal/endpoints/endpoints.go b/service/emr/internal/endpoints/endpoints.go index dfd4a08f134..5eb43ec8cfe 100644 --- a/service/emr/internal/endpoints/endpoints.go +++ b/service/emr/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/emrcontainers/endpoints.go b/service/emrcontainers/endpoints.go index 7595a9cc0fd..7068e9892e4 100644 --- a/service/emrcontainers/endpoints.go +++ b/service/emrcontainers/endpoints.go @@ -385,6 +385,32 @@ func (r *resolver) ResolveEndpoint( } if _UseFIPS == true { if _PartitionResult.SupportsFIPS == true { + if _Region == "us-gov-east-1" { + uriString := "https://emr-containers.us-gov-east-1.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if _Region == "us-gov-west-1" { + uriString := "https://emr-containers.us-gov-west-1.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } uriString := func() string { var out strings.Builder out.WriteString("https://emr-containers-fips.") diff --git a/service/emrcontainers/endpoints_test.go b/service/emrcontainers/endpoints_test.go index a6006f91726..1c5d1cf0086 100644 --- a/service/emrcontainers/endpoints_test.go +++ b/service/emrcontainers/endpoints_test.go @@ -1050,12 +1050,12 @@ func TestEndpointCase27(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1066,7 +1066,7 @@ func TestEndpointCase28(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://emr-containers-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://emr-containers.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1103,7 +1103,7 @@ func TestEndpointCase29(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://emr-containers-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://emr-containers.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1124,12 +1124,12 @@ func TestEndpointCase29(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-gov-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1140,7 +1140,7 @@ func TestEndpointCase30(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://emr-containers.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://emr-containers.us-gov-west-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1161,12 +1161,86 @@ func TestEndpointCase30(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-gov-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://emr-containers.us-gov-west-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://emr-containers-fips.us-gov-east-1.api.aws") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { + t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) + } + + if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { + t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) + } +} + +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1177,7 +1251,7 @@ func TestEndpointCase31(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://emr-containers.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://emr-containers.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1199,7 +1273,7 @@ func TestEndpointCase31(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1219,7 +1293,7 @@ func TestEndpointCase32(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1256,7 +1330,7 @@ func TestEndpointCase33(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1276,7 +1350,7 @@ func TestEndpointCase34(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1313,7 +1387,7 @@ func TestEndpointCase35(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1333,7 +1407,7 @@ func TestEndpointCase36(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1370,7 +1444,7 @@ func TestEndpointCase37(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1390,7 +1464,7 @@ func TestEndpointCase38(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1427,7 +1501,7 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1465,7 +1539,7 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1502,7 +1576,7 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1523,7 +1597,7 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1544,7 +1618,7 @@ func TestEndpointCase43(t *testing.T) { } // Missing region -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/eventbridge/internal/endpoints/endpoints.go b/service/eventbridge/internal/endpoints/endpoints.go index c0c7184d037..2a586e1f18e 100644 --- a/service/eventbridge/internal/endpoints/endpoints.go +++ b/service/eventbridge/internal/endpoints/endpoints.go @@ -174,6 +174,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/firehose/internal/endpoints/endpoints.go b/service/firehose/internal/endpoints/endpoints.go index f38844bc5b3..aaa149d78b8 100644 --- a/service/firehose/internal/endpoints/endpoints.go +++ b/service/firehose/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/inspector2/deserializers.go b/service/inspector2/deserializers.go index 989d32e0fea..3eb9ad33f40 100644 --- a/service/inspector2/deserializers.go +++ b/service/inspector2/deserializers.go @@ -9543,6 +9543,32 @@ func awsRestjson1_deserializeDocumentAccountAggregationResponse(v **types.Accoun sv.AccountId = ptr.String(jtv) } + case "exploitAvailableCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExploitAvailableCount = ptr.Int64(i64) + } + + case "fixAvailableCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FixAvailableCount = ptr.Int64(i64) + } + case "severityCounts": if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { return err @@ -15077,6 +15103,32 @@ func awsRestjson1_deserializeDocumentFindingTypeAggregationResponse(v **types.Fi sv.AccountId = ptr.String(jtv) } + case "exploitAvailableCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExploitAvailableCount = ptr.Int64(i64) + } + + case "fixAvailableCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FixAvailableCount = ptr.Int64(i64) + } + case "severityCounts": if err := awsRestjson1_deserializeDocumentSeverityCounts(&sv.SeverityCounts, value); err != nil { return err diff --git a/service/inspector2/types/enums.go b/service/inspector2/types/enums.go index 63cfcf86dcc..ae27244e908 100644 --- a/service/inspector2/types/enums.go +++ b/service/inspector2/types/enums.go @@ -929,20 +929,22 @@ type ErrorCode string // Enum values for ErrorCode const ( - ErrorCodeAlreadyEnabled ErrorCode = "ALREADY_ENABLED" - ErrorCodeEnableInProgress ErrorCode = "ENABLE_IN_PROGRESS" - ErrorCodeDisableInProgress ErrorCode = "DISABLE_IN_PROGRESS" - ErrorCodeSuspendInProgress ErrorCode = "SUSPEND_IN_PROGRESS" - ErrorCodeResourceNotFound ErrorCode = "RESOURCE_NOT_FOUND" - ErrorCodeAccessDenied ErrorCode = "ACCESS_DENIED" - ErrorCodeInternalError ErrorCode = "INTERNAL_ERROR" - ErrorCodeSsmUnavailable ErrorCode = "SSM_UNAVAILABLE" - ErrorCodeSsmThrottled ErrorCode = "SSM_THROTTLED" - ErrorCodeEventbridgeUnavailable ErrorCode = "EVENTBRIDGE_UNAVAILABLE" - ErrorCodeEventbridgeThrottled ErrorCode = "EVENTBRIDGE_THROTTLED" - ErrorCodeResourceScanNotDisabled ErrorCode = "RESOURCE_SCAN_NOT_DISABLED" - ErrorCodeDisassociateAllMembers ErrorCode = "DISASSOCIATE_ALL_MEMBERS" - ErrorCodeAccountIsIsolated ErrorCode = "ACCOUNT_IS_ISOLATED" + ErrorCodeAlreadyEnabled ErrorCode = "ALREADY_ENABLED" + ErrorCodeEnableInProgress ErrorCode = "ENABLE_IN_PROGRESS" + ErrorCodeDisableInProgress ErrorCode = "DISABLE_IN_PROGRESS" + ErrorCodeSuspendInProgress ErrorCode = "SUSPEND_IN_PROGRESS" + ErrorCodeResourceNotFound ErrorCode = "RESOURCE_NOT_FOUND" + ErrorCodeAccessDenied ErrorCode = "ACCESS_DENIED" + ErrorCodeInternalError ErrorCode = "INTERNAL_ERROR" + ErrorCodeSsmUnavailable ErrorCode = "SSM_UNAVAILABLE" + ErrorCodeSsmThrottled ErrorCode = "SSM_THROTTLED" + ErrorCodeEventbridgeUnavailable ErrorCode = "EVENTBRIDGE_UNAVAILABLE" + ErrorCodeEventbridgeThrottled ErrorCode = "EVENTBRIDGE_THROTTLED" + ErrorCodeResourceScanNotDisabled ErrorCode = "RESOURCE_SCAN_NOT_DISABLED" + ErrorCodeDisassociateAllMembers ErrorCode = "DISASSOCIATE_ALL_MEMBERS" + ErrorCodeAccountIsIsolated ErrorCode = "ACCOUNT_IS_ISOLATED" + ErrorCodeEc2SsmResourceDataSyncLimitExceeded ErrorCode = "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED" + ErrorCodeEc2SsmAssociationVersionLimitExceeded ErrorCode = "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED" ) // Values returns all known values for ErrorCode. Note that this can be expanded @@ -965,6 +967,8 @@ func (ErrorCode) Values() []ErrorCode { "RESOURCE_SCAN_NOT_DISABLED", "DISASSOCIATE_ALL_MEMBERS", "ACCOUNT_IS_ISOLATED", + "EC2_SSM_RESOURCE_DATA_SYNC_LIMIT_EXCEEDED", + "EC2_SSM_ASSOCIATION_VERSION_LIMIT_EXCEEDED", } } @@ -1795,6 +1799,8 @@ const ( ScanStatusReasonDeepInspectionDailySsmInventoryLimitExceeded ScanStatusReason = "DEEP_INSPECTION_DAILY_SSM_INVENTORY_LIMIT_EXCEEDED" ScanStatusReasonDeepInspectionCollectionTimeLimitExceeded ScanStatusReason = "DEEP_INSPECTION_COLLECTION_TIME_LIMIT_EXCEEDED" ScanStatusReasonDeepInspectionNoInventory ScanStatusReason = "DEEP_INSPECTION_NO_INVENTORY" + ScanStatusReasonAgentlessInstanceStorageLimitExceeded ScanStatusReason = "AGENTLESS_INSTANCE_STORAGE_LIMIT_EXCEEDED" + ScanStatusReasonAgentlessInstanceCollectionTimeLimitExceeded ScanStatusReason = "AGENTLESS_INSTANCE_COLLECTION_TIME_LIMIT_EXCEEDED" ) // Values returns all known values for ScanStatusReason. Note that this can be @@ -1827,6 +1833,8 @@ func (ScanStatusReason) Values() []ScanStatusReason { "DEEP_INSPECTION_DAILY_SSM_INVENTORY_LIMIT_EXCEEDED", "DEEP_INSPECTION_COLLECTION_TIME_LIMIT_EXCEEDED", "DEEP_INSPECTION_NO_INVENTORY", + "AGENTLESS_INSTANCE_STORAGE_LIMIT_EXCEEDED", + "AGENTLESS_INSTANCE_COLLECTION_TIME_LIMIT_EXCEEDED", } } diff --git a/service/inspector2/types/errors.go b/service/inspector2/types/errors.go index 9efd636e01c..05520deab84 100644 --- a/service/inspector2/types/errors.go +++ b/service/inspector2/types/errors.go @@ -8,6 +8,9 @@ import ( ) // You do not have sufficient access to perform this action. +// +// For Enable , you receive this error if you attempt to use a feature in an +// unsupported Amazon Web Services Region. type AccessDeniedException struct { Message *string diff --git a/service/inspector2/types/types.go b/service/inspector2/types/types.go index 8d7167a5123..8d2fc96123d 100644 --- a/service/inspector2/types/types.go +++ b/service/inspector2/types/types.go @@ -54,6 +54,12 @@ type AccountAggregationResponse struct { // The Amazon Web Services account ID. AccountId *string + // The number of findings that have an exploit available. + ExploitAvailableCount *int64 + + // Details about the number of fixes. + FixAvailableCount *int64 + // The number of findings by severity. SeverityCounts *SeverityCounts @@ -2215,6 +2221,12 @@ type FindingTypeAggregationResponse struct { // The ID of the Amazon Web Services account associated with the findings. AccountId *string + // The number of findings that have an exploit available. + ExploitAvailableCount *int64 + + // Details about the number of fixes. + FixAvailableCount *int64 + // The value to sort results by. SeverityCounts *SeverityCounts diff --git a/service/internetmonitor/internal/endpoints/endpoints.go b/service/internetmonitor/internal/endpoints/endpoints.go index 3db6620c5e4..5bebe80c0bb 100644 --- a/service/internetmonitor/internal/endpoints/endpoints.go +++ b/service/internetmonitor/internal/endpoints/endpoints.go @@ -194,6 +194,11 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Hostname: "internetmonitor.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{ + Hostname: "internetmonitor.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/kendraranking/internal/endpoints/endpoints.go b/service/kendraranking/internal/endpoints/endpoints.go index 23c8fb150fc..75499bcfaad 100644 --- a/service/kendraranking/internal/endpoints/endpoints.go +++ b/service/kendraranking/internal/endpoints/endpoints.go @@ -194,6 +194,11 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Hostname: "kendra-ranking.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{ + Hostname: "kendra-ranking.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/kinesis/internal/endpoints/endpoints.go b/service/kinesis/internal/endpoints/endpoints.go index b1afbfb3d32..3241606b615 100644 --- a/service/kinesis/internal/endpoints/endpoints.go +++ b/service/kinesis/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/kms/internal/endpoints/endpoints.go b/service/kms/internal/endpoints/endpoints.go index bcd411119d5..66d1ad216de 100644 --- a/service/kms/internal/endpoints/endpoints.go +++ b/service/kms/internal/endpoints/endpoints.go @@ -346,6 +346,24 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "kms-fips.ap-southeast-5.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-5-fips", + }: endpoints.Endpoint{ + Hostname: "kms-fips.ap-southeast-5.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-5", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/lambda/internal/endpoints/endpoints.go b/service/lambda/internal/endpoints/endpoints.go index ca4c328047f..e9f9be9a6f2 100644 --- a/service/lambda/internal/endpoints/endpoints.go +++ b/service/lambda/internal/endpoints/endpoints.go @@ -238,6 +238,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "lambda.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/neptune/internal/endpoints/endpoints.go b/service/neptune/internal/endpoints/endpoints.go index 9771aab57a0..ed496e01e8d 100644 --- a/service/neptune/internal/endpoints/endpoints.go +++ b/service/neptune/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/oam/internal/endpoints/endpoints.go b/service/oam/internal/endpoints/endpoints.go index 4325005d727..fdf35876cce 100644 --- a/service/oam/internal/endpoints/endpoints.go +++ b/service/oam/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/opensearch/internal/endpoints/endpoints.go b/service/opensearch/internal/endpoints/endpoints.go index fc31c661fa3..6a413acd8c3 100644 --- a/service/opensearch/internal/endpoints/endpoints.go +++ b/service/opensearch/internal/endpoints/endpoints.go @@ -238,6 +238,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "aos.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "aos.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/opensearchserverless/internal/endpoints/endpoints.go b/service/opensearchserverless/internal/endpoints/endpoints.go index 443f6fe89ef..c9e229e00ce 100644 --- a/service/opensearchserverless/internal/endpoints/endpoints.go +++ b/service/opensearchserverless/internal/endpoints/endpoints.go @@ -333,5 +333,10 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + }, }, } diff --git a/service/pi/internal/endpoints/endpoints.go b/service/pi/internal/endpoints/endpoints.go index dec0b93ad9e..55d240ba382 100644 --- a/service/pi/internal/endpoints/endpoints.go +++ b/service/pi/internal/endpoints/endpoints.go @@ -271,6 +271,18 @@ var defaultPartitions = endpoints.Partitions{ Hostname: "pi.ap-southeast-4.api.aws", Protocols: []string{"https"}, }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{ + Protocols: []string{"https"}, + }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "pi.ap-southeast-5.api.aws", + Protocols: []string{"https"}, + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/qbusiness/internal/endpoints/endpoints.go b/service/qbusiness/internal/endpoints/endpoints.go index 4d46418180d..660dcb52d8e 100644 --- a/service/qbusiness/internal/endpoints/endpoints.go +++ b/service/qbusiness/internal/endpoints/endpoints.go @@ -194,6 +194,11 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Hostname: "qbusiness.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{ + Hostname: "qbusiness.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index 05dc02338b8..8e7dcbbe012 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -37239,6 +37239,11 @@ func awsRestjson1_deserializeDocumentAnalysisDefinition(v **types.AnalysisDefini return err } + case "QueryExecutionOptions": + if err := awsRestjson1_deserializeDocumentQueryExecutionOptions(&sv.QueryExecutionOptions, value); err != nil { + return err + } + case "Sheets": if err := awsRestjson1_deserializeDocumentSheetDefinitionList(&sv.Sheets, value); err != nil { return err @@ -72166,6 +72171,46 @@ func awsRestjson1_deserializeDocumentProjectOperation(v **types.ProjectOperation return nil } +func awsRestjson1_deserializeDocumentQueryExecutionOptions(v **types.QueryExecutionOptions, 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.QueryExecutionOptions + if *v == nil { + sv = &types.QueryExecutionOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "QueryExecutionMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryExecutionMode to be of type string, got %T instead", value) + } + sv.QueryExecutionMode = types.QueryExecutionMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentQueueInfo(v **types.QueueInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -82325,6 +82370,11 @@ func awsRestjson1_deserializeDocumentTemplateVersionDefinition(v **types.Templat return err } + case "QueryExecutionOptions": + if err := awsRestjson1_deserializeDocumentQueryExecutionOptions(&sv.QueryExecutionOptions, value); err != nil { + return err + } + case "Sheets": if err := awsRestjson1_deserializeDocumentSheetDefinitionList(&sv.Sheets, value); err != nil { return err diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index 7e9f5d64de3..a1ca413b292 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -16683,6 +16683,13 @@ func awsRestjson1_serializeDocumentAnalysisDefinition(v *types.AnalysisDefinitio } } + if v.QueryExecutionOptions != nil { + ok := object.Key("QueryExecutionOptions") + if err := awsRestjson1_serializeDocumentQueryExecutionOptions(v.QueryExecutionOptions, ok); err != nil { + return err + } + } + if v.Sheets != nil { ok := object.Key("Sheets") if err := awsRestjson1_serializeDocumentSheetDefinitionList(v.Sheets, ok); err != nil { @@ -16804,6 +16811,27 @@ func awsRestjson1_serializeDocumentAnonymousUserDashboardEmbeddingConfiguration( object := value.Object() defer object.Close() + if v.DisabledFeatures != nil { + ok := object.Key("DisabledFeatures") + if err := awsRestjson1_serializeDocumentAnonymousUserDashboardEmbeddingConfigurationDisabledFeatures(v.DisabledFeatures, ok); err != nil { + return err + } + } + + if v.EnabledFeatures != nil { + ok := object.Key("EnabledFeatures") + if err := awsRestjson1_serializeDocumentAnonymousUserDashboardEmbeddingConfigurationEnabledFeatures(v.EnabledFeatures, ok); err != nil { + return err + } + } + + if v.FeatureConfigurations != nil { + ok := object.Key("FeatureConfigurations") + if err := awsRestjson1_serializeDocumentAnonymousUserDashboardFeatureConfigurations(v.FeatureConfigurations, ok); err != nil { + return err + } + } + if v.InitialDashboardId != nil { ok := object.Key("InitialDashboardId") ok.String(*v.InitialDashboardId) @@ -16812,6 +16840,42 @@ func awsRestjson1_serializeDocumentAnonymousUserDashboardEmbeddingConfiguration( return nil } +func awsRestjson1_serializeDocumentAnonymousUserDashboardEmbeddingConfigurationDisabledFeatures(v []types.AnonymousUserDashboardEmbeddingConfigurationDisabledFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentAnonymousUserDashboardEmbeddingConfigurationEnabledFeatures(v []types.AnonymousUserDashboardEmbeddingConfigurationEnabledFeature, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsRestjson1_serializeDocumentAnonymousUserDashboardFeatureConfigurations(v *types.AnonymousUserDashboardFeatureConfigurations, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SharedView != nil { + ok := object.Key("SharedView") + if err := awsRestjson1_serializeDocumentSharedViewConfigurations(v.SharedView, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAnonymousUserDashboardVisualEmbeddingConfiguration(v *types.AnonymousUserDashboardVisualEmbeddingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -31931,6 +31995,18 @@ func awsRestjson1_serializeDocumentProjectOperation(v *types.ProjectOperation, v return nil } +func awsRestjson1_serializeDocumentQueryExecutionOptions(v *types.QueryExecutionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.QueryExecutionMode) > 0 { + ok := object.Key("QueryExecutionMode") + ok.String(string(v.QueryExecutionMode)) + } + + return nil +} + func awsRestjson1_serializeDocumentRadarChartAggregatedFieldWells(v *types.RadarChartAggregatedFieldWells, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -32675,6 +32751,13 @@ func awsRestjson1_serializeDocumentRegisteredUserConsoleFeatureConfigurations(v object := value.Object() defer object.Close() + if v.SharedView != nil { + ok := object.Key("SharedView") + if err := awsRestjson1_serializeDocumentSharedViewConfigurations(v.SharedView, ok); err != nil { + return err + } + } + if v.StatePersistence != nil { ok := object.Key("StatePersistence") if err := awsRestjson1_serializeDocumentStatePersistenceConfigurations(v.StatePersistence, ok); err != nil { @@ -32715,6 +32798,13 @@ func awsRestjson1_serializeDocumentRegisteredUserDashboardFeatureConfigurations( } } + if v.SharedView != nil { + ok := object.Key("SharedView") + if err := awsRestjson1_serializeDocumentSharedViewConfigurations(v.SharedView, ok); err != nil { + return err + } + } + if v.StatePersistence != nil { ok := object.Key("StatePersistence") if err := awsRestjson1_serializeDocumentStatePersistenceConfigurations(v.StatePersistence, ok); err != nil { @@ -34141,6 +34231,18 @@ func awsRestjson1_serializeDocumentShapeConditionalFormat(v *types.ShapeConditio return nil } +func awsRestjson1_serializeDocumentSharedViewConfigurations(v *types.SharedViewConfigurations, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("Enabled") + ok.Boolean(v.Enabled) + } + + return nil +} + func awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v *types.SheetControlInfoIconLabelOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -36126,6 +36228,13 @@ func awsRestjson1_serializeDocumentTemplateVersionDefinition(v *types.TemplateVe } } + if v.QueryExecutionOptions != nil { + ok := object.Key("QueryExecutionOptions") + if err := awsRestjson1_serializeDocumentQueryExecutionOptions(v.QueryExecutionOptions, ok); err != nil { + return err + } + } + if v.Sheets != nil { ok := object.Key("Sheets") if err := awsRestjson1_serializeDocumentSheetDefinitionList(v.Sheets, ok); err != nil { diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index f5bcb2e86fd..e60af2aefff 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -155,6 +155,42 @@ func (AnchorType) Values() []AnchorType { } } +type AnonymousUserDashboardEmbeddingConfigurationDisabledFeature string + +// Enum values for AnonymousUserDashboardEmbeddingConfigurationDisabledFeature +const ( + AnonymousUserDashboardEmbeddingConfigurationDisabledFeatureSharedView AnonymousUserDashboardEmbeddingConfigurationDisabledFeature = "SHARED_VIEW" +) + +// Values returns all known values for +// AnonymousUserDashboardEmbeddingConfigurationDisabledFeature. 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 (AnonymousUserDashboardEmbeddingConfigurationDisabledFeature) Values() []AnonymousUserDashboardEmbeddingConfigurationDisabledFeature { + return []AnonymousUserDashboardEmbeddingConfigurationDisabledFeature{ + "SHARED_VIEW", + } +} + +type AnonymousUserDashboardEmbeddingConfigurationEnabledFeature string + +// Enum values for AnonymousUserDashboardEmbeddingConfigurationEnabledFeature +const ( + AnonymousUserDashboardEmbeddingConfigurationEnabledFeatureSharedView AnonymousUserDashboardEmbeddingConfigurationEnabledFeature = "SHARED_VIEW" +) + +// Values returns all known values for +// AnonymousUserDashboardEmbeddingConfigurationEnabledFeature. 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 (AnonymousUserDashboardEmbeddingConfigurationEnabledFeature) Values() []AnonymousUserDashboardEmbeddingConfigurationEnabledFeature { + return []AnonymousUserDashboardEmbeddingConfigurationEnabledFeature{ + "SHARED_VIEW", + } +} + type ArcThickness string // Enum values for ArcThickness @@ -3363,6 +3399,25 @@ func (PurchaseMode) Values() []PurchaseMode { } } +type QueryExecutionMode string + +// Enum values for QueryExecutionMode +const ( + QueryExecutionModeAuto QueryExecutionMode = "AUTO" + QueryExecutionModeManual QueryExecutionMode = "MANUAL" +) + +// Values returns all known values for QueryExecutionMode. 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 (QueryExecutionMode) Values() []QueryExecutionMode { + return []QueryExecutionMode{ + "AUTO", + "MANUAL", + } +} + type RadarChartAxesRangeScale string // Enum values for RadarChartAxesRangeScale diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index 4d796b55486..6b468b463c0 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -320,6 +320,9 @@ type AnalysisDefinition struct { // [Parameters in Amazon QuickSight]: https://docs.aws.amazon.com/quicksight/latest/user/parameters-in-quicksight.html ParameterDeclarations []ParameterDeclaration + // A structure that describes the query execution options. + QueryExecutionOptions *QueryExecutionOptions + // An array of sheet definitions for an analysis. Each SheetDefinition provides // detailed information about a sheet within this analysis. Sheets []SheetDefinition @@ -491,6 +494,24 @@ type AnonymousUserDashboardEmbeddingConfiguration struct { // This member is required. InitialDashboardId *string + // A list of all disabled features of a specified anonymous dashboard. + DisabledFeatures []AnonymousUserDashboardEmbeddingConfigurationDisabledFeature + + // A list of all enabled features of a specified anonymous dashboard. + EnabledFeatures []AnonymousUserDashboardEmbeddingConfigurationEnabledFeature + + // The feature configuration for an embedded dashboard. + FeatureConfigurations *AnonymousUserDashboardFeatureConfigurations + + noSmithyDocumentSerde +} + +// The feature configuration for an embedded dashboard. +type AnonymousUserDashboardFeatureConfigurations struct { + + // The shared view settings of an embedded dashboard. + SharedView *SharedViewConfigurations + noSmithyDocumentSerde } @@ -10795,6 +10816,15 @@ type ProjectOperation struct { noSmithyDocumentSerde } +// A structure that describes the query execution options. +type QueryExecutionOptions struct { + + // A structure that describes the query execution mode. + QueryExecutionMode QueryExecutionMode + + noSmithyDocumentSerde +} + // Information about a queued dataset SPICE ingestion. type QueueInfo struct { @@ -11339,6 +11369,9 @@ type RegisteredCustomerManagedKey struct { // The feature configurations of an embedded Amazon QuickSight console. type RegisteredUserConsoleFeatureConfigurations struct { + // The shared view settings of an embedded dashboard. + SharedView *SharedViewConfigurations + // The state persistence configurations of an embedded Amazon QuickSight console. StatePersistence *StatePersistenceConfigurations @@ -11370,6 +11403,9 @@ type RegisteredUserDashboardFeatureConfigurations struct { // The bookmarks configuration for an embedded dashboard in Amazon QuickSight. Bookmarks *BookmarksConfigurations + // The shared view settings of an embedded dashboard. + SharedView *SharedViewConfigurations + // The state persistence settings of an embedded dashboard. StatePersistence *StatePersistenceConfigurations @@ -12397,6 +12433,17 @@ type ShapeConditionalFormat struct { noSmithyDocumentSerde } +// The shared view settings of an embedded dashboard. +type SharedViewConfigurations struct { + + // The shared view settings of an embedded dashboard. + // + // This member is required. + Enabled bool + + noSmithyDocumentSerde +} + // A sheet, which is an object that contains a set of visuals that are viewed // together on one page in Amazon QuickSight. Every analysis and dashboard contains // at least one sheet. Each sheet contains at least one visualization widget, for @@ -13930,6 +13977,9 @@ type TemplateVersionDefinition struct { // [Parameters in Amazon QuickSight]: https://docs.aws.amazon.com/quicksight/latest/user/parameters-in-quicksight.html ParameterDeclarations []ParameterDeclaration + // A structure that describes the query execution options. + QueryExecutionOptions *QueryExecutionOptions + // An array of sheet definitions for a template. Sheets []SheetDefinition diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index ff6f760b95d..9ae4caad009 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -4442,6 +4442,28 @@ func validateAnonymousUserDashboardEmbeddingConfiguration(v *types.AnonymousUser if v.InitialDashboardId == nil { invalidParams.Add(smithy.NewErrParamRequired("InitialDashboardId")) } + if v.FeatureConfigurations != nil { + if err := validateAnonymousUserDashboardFeatureConfigurations(v.FeatureConfigurations); err != nil { + invalidParams.AddNested("FeatureConfigurations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAnonymousUserDashboardFeatureConfigurations(v *types.AnonymousUserDashboardFeatureConfigurations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AnonymousUserDashboardFeatureConfigurations"} + if v.SharedView != nil { + if err := validateSharedViewConfigurations(v.SharedView); err != nil { + invalidParams.AddNested("SharedView", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -14434,6 +14456,11 @@ func validateRegisteredUserConsoleFeatureConfigurations(v *types.RegisteredUserC invalidParams.AddNested("StatePersistence", err.(smithy.InvalidParamsError)) } } + if v.SharedView != nil { + if err := validateSharedViewConfigurations(v.SharedView); err != nil { + invalidParams.AddNested("SharedView", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -14471,6 +14498,11 @@ func validateRegisteredUserDashboardFeatureConfigurations(v *types.RegisteredUse invalidParams.AddNested("StatePersistence", err.(smithy.InvalidParamsError)) } } + if v.SharedView != nil { + if err := validateSharedViewConfigurations(v.SharedView); err != nil { + invalidParams.AddNested("SharedView", err.(smithy.InvalidParamsError)) + } + } if v.Bookmarks != nil { if err := validateBookmarksConfigurations(v.Bookmarks); err != nil { invalidParams.AddNested("Bookmarks", err.(smithy.InvalidParamsError)) @@ -15324,6 +15356,18 @@ func validateShapeConditionalFormat(v *types.ShapeConditionalFormat) error { } } +func validateSharedViewConfigurations(v *types.SharedViewConfigurations) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SharedViewConfigurations"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSheetControlLayout(v *types.SheetControlLayout) error { if v == nil { return nil diff --git a/service/ram/internal/endpoints/endpoints.go b/service/ram/internal/endpoints/endpoints.go index 97d433f3a8d..8616ebd9b07 100644 --- a/service/ram/internal/endpoints/endpoints.go +++ b/service/ram/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/rbin/internal/endpoints/endpoints.go b/service/rbin/internal/endpoints/endpoints.go index 44f02271c48..67ef650e85e 100644 --- a/service/rbin/internal/endpoints/endpoints.go +++ b/service/rbin/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/rds/internal/endpoints/endpoints.go b/service/rds/internal/endpoints/endpoints.go index e3cc623761d..e818014e48e 100644 --- a/service/rds/internal/endpoints/endpoints.go +++ b/service/rds/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/redshift/internal/endpoints/endpoints.go b/service/redshift/internal/endpoints/endpoints.go index dd5c1bb8979..4518df31be3 100644 --- a/service/redshift/internal/endpoints/endpoints.go +++ b/service/redshift/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/resourcegroups/internal/endpoints/endpoints.go b/service/resourcegroups/internal/endpoints/endpoints.go index 621256725bb..8756ff1610e 100644 --- a/service/resourcegroups/internal/endpoints/endpoints.go +++ b/service/resourcegroups/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go b/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go index 3553fe73d17..5a2ed53d921 100644 --- a/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go +++ b/service/resourcegroupstaggingapi/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/route53/types/enums.go b/service/route53/types/enums.go index f9cfdebbc41..32f54d6226c 100644 --- a/service/route53/types/enums.go +++ b/service/route53/types/enums.go @@ -126,6 +126,7 @@ const ( CloudWatchRegionApSoutheast4 CloudWatchRegion = "ap-southeast-4" CloudWatchRegionIlCentral1 CloudWatchRegion = "il-central-1" CloudWatchRegionCaWest1 CloudWatchRegion = "ca-west-1" + CloudWatchRegionApSoutheast5 CloudWatchRegion = "ap-southeast-5" ) // Values returns all known values for CloudWatchRegion. Note that this can be @@ -170,6 +171,7 @@ func (CloudWatchRegion) Values() []CloudWatchRegion { "ap-southeast-4", "il-central-1", "ca-west-1", + "ap-southeast-5", } } @@ -393,6 +395,7 @@ const ( ResourceRecordSetRegionApSoutheast4 ResourceRecordSetRegion = "ap-southeast-4" ResourceRecordSetRegionIlCentral1 ResourceRecordSetRegion = "il-central-1" ResourceRecordSetRegionCaWest1 ResourceRecordSetRegion = "ca-west-1" + ResourceRecordSetRegionApSoutheast5 ResourceRecordSetRegion = "ap-southeast-5" ) // Values returns all known values for ResourceRecordSetRegion. Note that this can @@ -432,6 +435,7 @@ func (ResourceRecordSetRegion) Values() []ResourceRecordSetRegion { "ap-southeast-4", "il-central-1", "ca-west-1", + "ap-southeast-5", } } @@ -577,6 +581,7 @@ const ( VPCRegionApSoutheast4 VPCRegion = "ap-southeast-4" VPCRegionIlCentral1 VPCRegion = "il-central-1" VPCRegionCaWest1 VPCRegion = "ca-west-1" + VPCRegionApSoutheast5 VPCRegion = "ap-southeast-5" ) // Values returns all known values for VPCRegion. Note that this can be expanded @@ -620,5 +625,6 @@ func (VPCRegion) Values() []VPCRegion { "ap-southeast-4", "il-central-1", "ca-west-1", + "ap-southeast-5", } } diff --git a/service/route53resolver/internal/endpoints/endpoints.go b/service/route53resolver/internal/endpoints/endpoints.go index 6bf228043ba..12e71a87e34 100644 --- a/service/route53resolver/internal/endpoints/endpoints.go +++ b/service/route53resolver/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/s3/internal/endpoints/endpoints.go b/service/s3/internal/endpoints/endpoints.go index f3e6b0751d8..329826ccab1 100644 --- a/service/s3/internal/endpoints/endpoints.go +++ b/service/s3/internal/endpoints/endpoints.go @@ -252,6 +252,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.ap-southeast-4.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.ap-southeast-5.amazonaws.com", + }, endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ diff --git a/service/s3control/internal/endpoints/s3/endpoints.go b/service/s3control/internal/endpoints/s3/endpoints.go index 7f1c6226482..a405b71c0ab 100644 --- a/service/s3control/internal/endpoints/s3/endpoints.go +++ b/service/s3control/internal/endpoints/s3/endpoints.go @@ -250,6 +250,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "s3.dualstack.ap-southeast-4.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "s3.dualstack.ap-southeast-5.amazonaws.com", + }, endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ diff --git a/service/secretsmanager/internal/endpoints/endpoints.go b/service/secretsmanager/internal/endpoints/endpoints.go index 4181a93f8b8..e9375c7f144 100644 --- a/service/secretsmanager/internal/endpoints/endpoints.go +++ b/service/secretsmanager/internal/endpoints/endpoints.go @@ -216,6 +216,13 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-southeast-4", Variant: endpoints.DualStackVariant, }: {}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: {}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/servicediscovery/internal/endpoints/endpoints.go b/service/servicediscovery/internal/endpoints/endpoints.go index 4d0424c1645..0ab0b3ca778 100644 --- a/service/servicediscovery/internal/endpoints/endpoints.go +++ b/service/servicediscovery/internal/endpoints/endpoints.go @@ -238,6 +238,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "servicediscovery.ap-southeast-4.api.aws", }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "servicediscovery.ap-southeast-5.api.aws", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/servicequotas/internal/endpoints/endpoints.go b/service/servicequotas/internal/endpoints/endpoints.go index 681639157d8..4559cdffbe4 100644 --- a/service/servicequotas/internal/endpoints/endpoints.go +++ b/service/servicequotas/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/sfn/internal/endpoints/endpoints.go b/service/sfn/internal/endpoints/endpoints.go index d9c88bc5f70..75495d9a20f 100644 --- a/service/sfn/internal/endpoints/endpoints.go +++ b/service/sfn/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/sns/internal/endpoints/endpoints.go b/service/sns/internal/endpoints/endpoints.go index 1e72adc9064..12d7256dcf2 100644 --- a/service/sns/internal/endpoints/endpoints.go +++ b/service/sns/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/sqs/internal/endpoints/endpoints.go b/service/sqs/internal/endpoints/endpoints.go index fa0e231c4e9..91790a23094 100644 --- a/service/sqs/internal/endpoints/endpoints.go +++ b/service/sqs/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/ssm/internal/endpoints/endpoints.go b/service/ssm/internal/endpoints/endpoints.go index 88f63256b4e..b5fbd1e6911 100644 --- a/service/ssm/internal/endpoints/endpoints.go +++ b/service/ssm/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/sts/internal/endpoints/endpoints.go b/service/sts/internal/endpoints/endpoints.go index 3dbd993b54b..b4fd1174ce1 100644 --- a/service/sts/internal/endpoints/endpoints.go +++ b/service/sts/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ diff --git a/service/swf/internal/endpoints/endpoints.go b/service/swf/internal/endpoints/endpoints.go index 4901f68e136..bdbd5c71e80 100644 --- a/service/swf/internal/endpoints/endpoints.go +++ b/service/swf/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/synthetics/internal/endpoints/endpoints.go b/service/synthetics/internal/endpoints/endpoints.go index 360df59883b..2647a1a83c7 100644 --- a/service/synthetics/internal/endpoints/endpoints.go +++ b/service/synthetics/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/xray/internal/endpoints/endpoints.go b/service/xray/internal/endpoints/endpoints.go index 83dbc2b1c6b..ecdd02190b8 100644 --- a/service/xray/internal/endpoints/endpoints.go +++ b/service/xray/internal/endpoints/endpoints.go @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{},