diff --git a/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json b/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json new file mode 100644 index 00000000000..6e03044a9bf --- /dev/null +++ b/.changelog/19f55fd9f72d4fbeb8871e730edf88fe.json @@ -0,0 +1,8 @@ +{ + "id": "19f55fd9-f72d-4fbe-b887-1e730edf88fe", + "type": "feature", + "description": "Adding `notebook-al2-v3` as allowed value to SageMaker NotebookInstance PlatformIdentifier attribute", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json b/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json new file mode 100644 index 00000000000..669050700cd --- /dev/null +++ b/.changelog/34e7e629c6b64b4bb5c06abde33a7537.json @@ -0,0 +1,8 @@ +{ + "id": "34e7e629-c6b6-4b4b-b5c0-6abde33a7537", + "type": "feature", + "description": "Updated BatchCreateVehicle and BatchUpdateVehicle APIs: LimitExceededException has been added and the maximum number of vehicles in a batch has been set to 10 explicitly", + "modules": [ + "service/iotfleetwise" + ] +} \ No newline at end of file diff --git a/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json b/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json new file mode 100644 index 00000000000..489d0ba21fa --- /dev/null +++ b/.changelog/390ae55c65584a0ca1c5aab76acf2f51.json @@ -0,0 +1,8 @@ +{ + "id": "390ae55c-6558-4a0c-a1c5-aab76acf2f51", + "type": "feature", + "description": "Update Application Inference Profile", + "modules": [ + "service/bedrockruntime" + ] +} \ No newline at end of file diff --git a/.changelog/9e300e8375914fdca3f0281e75e765de.json b/.changelog/9e300e8375914fdca3f0281e75e765de.json new file mode 100644 index 00000000000..f7f6a682e6d --- /dev/null +++ b/.changelog/9e300e8375914fdca3f0281e75e765de.json @@ -0,0 +1,8 @@ +{ + "id": "9e300e83-7591-4fdc-a3f0-281e75e765de", + "type": "feature", + "description": "Added support for new optional baseline parameter in the UpdateAnomaly API. For UpdateAnomaly requests with baseline set to True, The anomaly behavior is then treated as baseline behavior. However, more severe occurrences of this behavior will still be reported as anomalies.", + "modules": [ + "service/cloudwatchlogs" + ] +} \ No newline at end of file diff --git a/.changelog/bc32758c5c424079963e1357287e9c89.json b/.changelog/bc32758c5c424079963e1357287e9c89.json new file mode 100644 index 00000000000..a28c5e83d35 --- /dev/null +++ b/.changelog/bc32758c5c424079963e1357287e9c89.json @@ -0,0 +1,8 @@ +{ + "id": "bc32758c-5c42-4079-963e-1357287e9c89", + "type": "feature", + "description": "Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls.", + "modules": [ + "service/redshiftdata" + ] +} \ No newline at end of file diff --git a/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json b/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json new file mode 100644 index 00000000000..9ad78263111 --- /dev/null +++ b/.changelog/e36a67b15cc8407fa7d67c05c29f0320.json @@ -0,0 +1,8 @@ +{ + "id": "e36a67b1-5cc8-407f-a7d6-7c05c29f0320", + "type": "feature", + "description": "This release adds the option for customers to configure analytics engine when creating a collaboration, and introduces the new SPARK analytics engine type in addition to maintaining the legacy CLEAN_ROOMS_SQL engine type.", + "modules": [ + "service/cleanrooms" + ] +} \ No newline at end of file diff --git a/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json b/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json new file mode 100644 index 00000000000..33f5393d381 --- /dev/null +++ b/.changelog/e4a01c5cafd64f3c8e82640add5968e8.json @@ -0,0 +1,8 @@ +{ + "id": "e4a01c5c-afd6-4f3c-8e82-640add5968e8", + "type": "feature", + "description": "Update Application Inference Profile", + "modules": [ + "service/bedrock" + ] +} \ 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 937c45b1679..04358c081d7 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.14.44" +const goModuleVersion = "1.15.13" diff --git a/service/bedrock/api_op_CreateInferenceProfile.go b/service/bedrock/api_op_CreateInferenceProfile.go new file mode 100644 index 00000000000..609d393f199 --- /dev/null +++ b/service/bedrock/api_op_CreateInferenceProfile.go @@ -0,0 +1,230 @@ +// 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 an application inference profile to track metrics and costs when +// invoking a model. To create an application inference profile for a foundation +// model in one region, specify the ARN of the model in that region. To create an +// application inference profile for a foundation model across multiple regions, +// specify the ARN of the system-defined inference profile that contains the +// regions that you want to route requests to. For more information, see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the +// Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html +func (c *Client) CreateInferenceProfile(ctx context.Context, params *CreateInferenceProfileInput, optFns ...func(*Options)) (*CreateInferenceProfileOutput, error) { + if params == nil { + params = &CreateInferenceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateInferenceProfile", params, optFns, c.addOperationCreateInferenceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateInferenceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateInferenceProfileInput struct { + + // A name for the inference profile. + // + // This member is required. + InferenceProfileName *string + + // The foundation model or system-defined inference profile that the inference + // profile will track metrics and costs for. + // + // This member is required. + ModelSource types.InferenceProfileModelSource + + // 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 + + // A description for the inference profile. + Description *string + + // An array of objects, each of which contains a tag and its value. For more + // information, see [Tagging resources]in the [Amazon Bedrock User Guide]. + // + // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html + // [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateInferenceProfileOutput struct { + + // The ARN of the inference profile that you created. + // + // This member is required. + InferenceProfileArn *string + + // The status of the inference profile. ACTIVE means that the inference profile is + // ready to be used. + Status types.InferenceProfileStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateInferenceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateInferenceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateInferenceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInferenceProfile"); 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 = addSpanRetryLoop(stack, options); 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 = addIdempotencyToken_opCreateInferenceProfileMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateInferenceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInferenceProfile(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateInferenceProfile struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateInferenceProfile) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateInferenceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateInferenceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateInferenceProfileInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateInferenceProfileMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateInferenceProfile{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateInferenceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateInferenceProfile", + } +} diff --git a/service/bedrock/api_op_DeleteInferenceProfile.go b/service/bedrock/api_op_DeleteInferenceProfile.go new file mode 100644 index 00000000000..cb88965e329 --- /dev/null +++ b/service/bedrock/api_op_DeleteInferenceProfile.go @@ -0,0 +1,156 @@ +// 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 an application inference profile. For more information, see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the +// Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html +func (c *Client) DeleteInferenceProfile(ctx context.Context, params *DeleteInferenceProfileInput, optFns ...func(*Options)) (*DeleteInferenceProfileOutput, error) { + if params == nil { + params = &DeleteInferenceProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteInferenceProfile", params, optFns, c.addOperationDeleteInferenceProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteInferenceProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteInferenceProfileInput struct { + + // The Amazon Resource Name (ARN) or ID of the application inference profile to + // delete. + // + // This member is required. + InferenceProfileIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteInferenceProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteInferenceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteInferenceProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteInferenceProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInferenceProfile"); 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 = addSpanRetryLoop(stack, options); 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 = addOpDeleteInferenceProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInferenceProfile(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteInferenceProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteInferenceProfile", + } +} diff --git a/service/bedrock/api_op_GetInferenceProfile.go b/service/bedrock/api_op_GetInferenceProfile.go index 20409f788ff..7af098ff924 100644 --- a/service/bedrock/api_op_GetInferenceProfile.go +++ b/service/bedrock/api_op_GetInferenceProfile.go @@ -12,8 +12,10 @@ import ( "time" ) -// Gets information about an inference profile. For more information, see the +// Gets information about an inference profile. For more information, see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the // Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html func (c *Client) GetInferenceProfile(ctx context.Context, params *GetInferenceProfileInput, optFns ...func(*Options)) (*GetInferenceProfileOutput, error) { if params == nil { params = &GetInferenceProfileInput{} @@ -31,7 +33,7 @@ func (c *Client) GetInferenceProfile(ctx context.Context, params *GetInferencePr type GetInferenceProfileInput struct { - // The unique identifier of the inference profile. + // The ID or Amazon Resource Name (ARN) of the inference profile. // // This member is required. InferenceProfileIdentifier *string @@ -62,13 +64,19 @@ type GetInferenceProfileOutput struct { Models []types.InferenceProfileModel // The status of the inference profile. ACTIVE means that the inference profile is - // available to use. + // ready to be used. // // This member is required. Status types.InferenceProfileStatus - // The type of the inference profile. SYSTEM_DEFINED means that the inference - // profile is defined by Amazon Bedrock. + // The type of the inference profile. The following types are possible: + // + // - SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can + // route inference requests across regions with these inference profiles. + // + // - APPLICATION – The inference profile was created by a user. This type of + // inference profile can track metrics and costs when invoking the model in it. The + // inference profile may route requests to one or multiple regions. // // This member is required. Type types.InferenceProfileType diff --git a/service/bedrock/api_op_ListInferenceProfiles.go b/service/bedrock/api_op_ListInferenceProfiles.go index 47864951b93..5feedc00fa6 100644 --- a/service/bedrock/api_op_ListInferenceProfiles.go +++ b/service/bedrock/api_op_ListInferenceProfiles.go @@ -11,7 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of inference profiles that you can use. +// Returns a list of inference profiles that you can use. For more information, +// see [Increase throughput and resilience with cross-region inference in Amazon Bedrock]. in the Amazon Bedrock User Guide. +// +// [Increase throughput and resilience with cross-region inference in Amazon Bedrock]: https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html func (c *Client) ListInferenceProfiles(ctx context.Context, params *ListInferenceProfilesInput, optFns ...func(*Options)) (*ListInferenceProfilesOutput, error) { if params == nil { params = &ListInferenceProfilesInput{} @@ -40,6 +43,16 @@ type ListInferenceProfilesInput struct { // this field to return the next batch of results. NextToken *string + // Filters for inference profiles that match the type you specify. + // + // - SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can + // route inference requests across regions with these inference profiles. + // + // - APPLICATION – The inference profile was created by a user. This type of + // inference profile can track metrics and costs when invoking the model in it. The + // inference profile may route requests to one or multiple regions. + TypeEquals types.InferenceProfileType + noSmithyDocumentSerde } diff --git a/service/bedrock/api_op_ListTagsForResource.go b/service/bedrock/api_op_ListTagsForResource.go index bed56a7f333..f54e62ce980 100644 --- a/service/bedrock/api_op_ListTagsForResource.go +++ b/service/bedrock/api_op_ListTagsForResource.go @@ -16,7 +16,7 @@ import ( // For more information, see [Tagging resources] in the [Amazon Bedrock User Guide]. // // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html -// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html +// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} diff --git a/service/bedrock/api_op_TagResource.go b/service/bedrock/api_op_TagResource.go index e364fadb8bd..2c08d5c7350 100644 --- a/service/bedrock/api_op_TagResource.go +++ b/service/bedrock/api_op_TagResource.go @@ -14,7 +14,7 @@ import ( // Associate tags with a resource. For more information, see [Tagging resources] in the [Amazon Bedrock User Guide]. // // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html -// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html +// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} diff --git a/service/bedrock/api_op_UntagResource.go b/service/bedrock/api_op_UntagResource.go index 7318b26acb9..ff6580fdba4 100644 --- a/service/bedrock/api_op_UntagResource.go +++ b/service/bedrock/api_op_UntagResource.go @@ -13,7 +13,7 @@ import ( // Remove one or more tags from a resource. For more information, see [Tagging resources] in the [Amazon Bedrock User Guide]. // // [Amazon Bedrock User Guide]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html -// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html +// [Tagging resources]: https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} diff --git a/service/bedrock/deserializers.go b/service/bedrock/deserializers.go index b787dcdf58b..68388449ade 100644 --- a/service/bedrock/deserializers.go +++ b/service/bedrock/deserializers.go @@ -767,6 +767,192 @@ func awsRestjson1_deserializeOpDocumentCreateGuardrailVersionOutput(v **CreateGu return nil } +type awsRestjson1_deserializeOpCreateInferenceProfile struct { +} + +func (*awsRestjson1_deserializeOpCreateInferenceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateInferenceProfile) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorCreateInferenceProfile(response, &metadata) + } + output := &CreateInferenceProfileOutput{} + 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_deserializeOpDocumentCreateInferenceProfileOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateInferenceProfile(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("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) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateInferenceProfileOutput(v **CreateInferenceProfileOutput, 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 *CreateInferenceProfileOutput + if *v == nil { + sv = &CreateInferenceProfileOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inferenceProfileArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InferenceProfileArn to be of type string, got %T instead", value) + } + sv.InferenceProfileArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InferenceProfileStatus to be of type string, got %T instead", value) + } + sv.Status = types.InferenceProfileStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateModelCopyJob struct { } @@ -1943,6 +2129,109 @@ func awsRestjson1_deserializeOpErrorDeleteImportedModel(response *smithyhttp.Res } } +type awsRestjson1_deserializeOpDeleteInferenceProfile struct { +} + +func (*awsRestjson1_deserializeOpDeleteInferenceProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteInferenceProfile) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDeleteInferenceProfile(response, &metadata) + } + output := &DeleteInferenceProfileOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteInferenceProfile(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 { } diff --git a/service/bedrock/generated.json b/service/bedrock/generated.json index b65748c1ee0..fde255b2f44 100644 --- a/service/bedrock/generated.json +++ b/service/bedrock/generated.json @@ -12,6 +12,7 @@ "api_op_CreateEvaluationJob.go", "api_op_CreateGuardrail.go", "api_op_CreateGuardrailVersion.go", + "api_op_CreateInferenceProfile.go", "api_op_CreateModelCopyJob.go", "api_op_CreateModelCustomizationJob.go", "api_op_CreateModelImportJob.go", @@ -20,6 +21,7 @@ "api_op_DeleteCustomModel.go", "api_op_DeleteGuardrail.go", "api_op_DeleteImportedModel.go", + "api_op_DeleteInferenceProfile.go", "api_op_DeleteModelInvocationLoggingConfiguration.go", "api_op_DeleteProvisionedModelThroughput.go", "api_op_GetCustomModel.go", diff --git a/service/bedrock/serializers.go b/service/bedrock/serializers.go index f53658e8e21..59d35eae754 100644 --- a/service/bedrock/serializers.go +++ b/service/bedrock/serializers.go @@ -476,6 +476,111 @@ func awsRestjson1_serializeOpDocumentCreateGuardrailVersionInput(v *CreateGuardr return nil } +type awsRestjson1_serializeOpCreateInferenceProfile struct { +} + +func (*awsRestjson1_serializeOpCreateInferenceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateInferenceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateInferenceProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/inference-profiles") + 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_serializeOpDocumentCreateInferenceProfileInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateInferenceProfileInput(v *CreateInferenceProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateInferenceProfileInput(v *CreateInferenceProfileInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("clientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.InferenceProfileName != nil { + ok := object.Key("inferenceProfileName") + ok.String(*v.InferenceProfileName) + } + + if v.ModelSource != nil { + ok := object.Key("modelSource") + if err := awsRestjson1_serializeDocumentInferenceProfileModelSource(v.ModelSource, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateModelCopyJob struct { } @@ -1322,6 +1427,77 @@ func awsRestjson1_serializeOpHttpBindingsDeleteImportedModelInput(v *DeleteImpor return nil } +type awsRestjson1_serializeOpDeleteInferenceProfile struct { +} + +func (*awsRestjson1_serializeOpDeleteInferenceProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteInferenceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteInferenceProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/inference-profiles/{inferenceProfileIdentifier}") + 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_serializeOpHttpBindingsDeleteInferenceProfileInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteInferenceProfileInput(v *DeleteInferenceProfileInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InferenceProfileIdentifier == nil || len(*v.InferenceProfileIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member inferenceProfileIdentifier must not be empty")} + } + if v.InferenceProfileIdentifier != nil { + if err := encoder.SetURI("inferenceProfileIdentifier").String(*v.InferenceProfileIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteModelInvocationLoggingConfiguration struct { } @@ -2799,6 +2975,10 @@ func awsRestjson1_serializeOpHttpBindingsListInferenceProfilesInput(v *ListInfer encoder.SetQuery("nextToken").String(*v.NextToken) } + if len(v.TypeEquals) > 0 { + encoder.SetQuery("type").String(string(v.TypeEquals)) + } + return nil } @@ -4739,6 +4919,22 @@ func awsRestjson1_serializeDocumentHumanWorkflowConfig(v *types.HumanWorkflowCon return nil } +func awsRestjson1_serializeDocumentInferenceProfileModelSource(v types.InferenceProfileModelSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.InferenceProfileModelSourceMemberCopyFrom: + av := object.Key("copyFrom") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentLoggingConfig(v *types.LoggingConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/bedrock/snapshot/api_op_CreateInferenceProfile.go.snap b/service/bedrock/snapshot/api_op_CreateInferenceProfile.go.snap new file mode 100644 index 00000000000..8958f057619 --- /dev/null +++ b/service/bedrock/snapshot/api_op_CreateInferenceProfile.go.snap @@ -0,0 +1,42 @@ +CreateInferenceProfile + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/bedrock/snapshot/api_op_DeleteInferenceProfile.go.snap b/service/bedrock/snapshot/api_op_DeleteInferenceProfile.go.snap new file mode 100644 index 00000000000..26c83e70cd7 --- /dev/null +++ b/service/bedrock/snapshot/api_op_DeleteInferenceProfile.go.snap @@ -0,0 +1,41 @@ +DeleteInferenceProfile + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + 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 911bbd5547c..0df32470f73 100644 --- a/service/bedrock/snapshot_test.go +++ b/service/bedrock/snapshot_test.go @@ -110,6 +110,18 @@ func TestCheckSnapshot_CreateGuardrailVersion(t *testing.T) { } } +func TestCheckSnapshot_CreateInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateInferenceProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateModelCopyJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateModelCopyJob(context.Background(), nil, func(o *Options) { @@ -206,6 +218,18 @@ func TestCheckSnapshot_DeleteImportedModel(t *testing.T) { } } +func TestCheckSnapshot_DeleteInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteInferenceProfile") + }) + }) + 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) { @@ -661,6 +685,18 @@ func TestUpdateSnapshot_CreateGuardrailVersion(t *testing.T) { } } +func TestUpdateSnapshot_CreateInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateInferenceProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateModelCopyJob(t *testing.T) { svc := New(Options{}) _, err := svc.CreateModelCopyJob(context.Background(), nil, func(o *Options) { @@ -757,6 +793,18 @@ func TestUpdateSnapshot_DeleteImportedModel(t *testing.T) { } } +func TestUpdateSnapshot_DeleteInferenceProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteInferenceProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteInferenceProfile") + }) + }) + 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) { diff --git a/service/bedrock/types/enums.go b/service/bedrock/types/enums.go index 307b0ab3d96..5da43f7cdc1 100644 --- a/service/bedrock/types/enums.go +++ b/service/bedrock/types/enums.go @@ -406,6 +406,7 @@ type InferenceProfileType string // Enum values for InferenceProfileType const ( InferenceProfileTypeSystemDefined InferenceProfileType = "SYSTEM_DEFINED" + InferenceProfileTypeApplication InferenceProfileType = "APPLICATION" ) // Values returns all known values for InferenceProfileType. Note that this can be @@ -415,6 +416,7 @@ const ( func (InferenceProfileType) Values() []InferenceProfileType { return []InferenceProfileType{ "SYSTEM_DEFINED", + "APPLICATION", } } diff --git a/service/bedrock/types/types.go b/service/bedrock/types/types.go index d07ef631d64..0a56b7aebc9 100644 --- a/service/bedrock/types/types.go +++ b/service/bedrock/types/types.go @@ -1240,6 +1240,26 @@ type InferenceProfileModel struct { noSmithyDocumentSerde } +// Contains information about the model or system-defined inference profile that +// is the source for an inference profile.. +// +// The following types satisfy this interface: +// +// InferenceProfileModelSourceMemberCopyFrom +type InferenceProfileModelSource interface { + isInferenceProfileModelSource() +} + +// The ARN of the model or system-defined inference profile that is the source for +// the inference profile. +type InferenceProfileModelSourceMemberCopyFrom struct { + Value string + + noSmithyDocumentSerde +} + +func (*InferenceProfileModelSourceMemberCopyFrom) isInferenceProfileModelSource() {} + // Contains information about an inference profile. type InferenceProfileSummary struct { @@ -1264,13 +1284,19 @@ type InferenceProfileSummary struct { Models []InferenceProfileModel // The status of the inference profile. ACTIVE means that the inference profile is - // available to use. + // ready to be used. // // This member is required. Status InferenceProfileStatus - // The type of the inference profile. SYSTEM_DEFINED means that the inference - // profile is defined by Amazon Bedrock. + // The type of the inference profile. The following types are possible: + // + // - SYSTEM_DEFINED – The inference profile is defined by Amazon Bedrock. You can + // route inference requests across regions with these inference profiles. + // + // - APPLICATION – The inference profile was created by a user. This type of + // inference profile can track metrics and costs when invoking the model in it. The + // inference profile may route requests to one or multiple regions. // // This member is required. Type InferenceProfileType @@ -1835,6 +1861,7 @@ func (*UnknownUnionMember) isEvaluationConfig() {} func (*UnknownUnionMember) isEvaluationDatasetLocation() {} func (*UnknownUnionMember) isEvaluationInferenceConfig() {} func (*UnknownUnionMember) isEvaluationModelConfig() {} +func (*UnknownUnionMember) isInferenceProfileModelSource() {} 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 56831691dde..0dc189398fc 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 ExampleInferenceProfileModelSource_outputUsage() { + var union types.InferenceProfileModelSource + // type switches can be used to check the union value + switch v := union.(type) { + case *types.InferenceProfileModelSourceMemberCopyFrom: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string + func ExampleModelDataSource_outputUsage() { var union types.ModelDataSource // type switches can be used to check the union value diff --git a/service/bedrock/validators.go b/service/bedrock/validators.go index d507a74bc96..44bd93e201f 100644 --- a/service/bedrock/validators.go +++ b/service/bedrock/validators.go @@ -90,6 +90,26 @@ func (m *validateOpCreateGuardrailVersion) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateInferenceProfile struct { +} + +func (*validateOpCreateInferenceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateInferenceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateInferenceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateInferenceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateModelCopyJob struct { } @@ -250,6 +270,26 @@ func (m *validateOpDeleteImportedModel) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteInferenceProfile struct { +} + +func (*validateOpDeleteInferenceProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteInferenceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteInferenceProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteInferenceProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteProvisionedModelThroughput struct { } @@ -686,6 +726,10 @@ func addOpCreateGuardrailVersionValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpCreateGuardrailVersion{}, middleware.After) } +func addOpCreateInferenceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateInferenceProfile{}, middleware.After) +} + func addOpCreateModelCopyJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateModelCopyJob{}, middleware.After) } @@ -718,6 +762,10 @@ func addOpDeleteImportedModelValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteImportedModel{}, middleware.After) } +func addOpDeleteInferenceProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteInferenceProfile{}, middleware.After) +} + func addOpDeleteProvisionedModelThroughputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteProvisionedModelThroughput{}, middleware.After) } @@ -1839,6 +1887,29 @@ func validateOpCreateGuardrailVersionInput(v *CreateGuardrailVersionInput) error } } +func validateOpCreateInferenceProfileInput(v *CreateInferenceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateInferenceProfileInput"} + if v.InferenceProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("InferenceProfileName")) + } + if v.ModelSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ModelSource")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateModelCopyJobInput(v *CreateModelCopyJobInput) error { if v == nil { return nil @@ -2082,6 +2153,21 @@ func validateOpDeleteImportedModelInput(v *DeleteImportedModelInput) error { } } +func validateOpDeleteInferenceProfileInput(v *DeleteInferenceProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteInferenceProfileInput"} + if v.InferenceProfileIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("InferenceProfileIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteProvisionedModelThroughputInput(v *DeleteProvisionedModelThroughputInput) error { if v == nil { return nil diff --git a/service/cleanrooms/api_op_CreateCollaboration.go b/service/cleanrooms/api_op_CreateCollaboration.go index 367a17e036c..b1edd42ce7e 100644 --- a/service/cleanrooms/api_op_CreateCollaboration.go +++ b/service/cleanrooms/api_op_CreateCollaboration.go @@ -60,6 +60,9 @@ type CreateCollaborationInput struct { // This member is required. QueryLogStatus types.CollaborationQueryLogStatus + // The analytics engine. + AnalyticsEngine types.AnalyticsEngine + // The collaboration creator's payment responsibilities set by the collaboration // creator. // diff --git a/service/cleanrooms/api_op_ListAnalysisTemplates.go b/service/cleanrooms/api_op_ListAnalysisTemplates.go index 56ae9b83ed7..1735b65a80e 100644 --- a/service/cleanrooms/api_op_ListAnalysisTemplates.go +++ b/service/cleanrooms/api_op_ListAnalysisTemplates.go @@ -34,11 +34,12 @@ type ListAnalysisTemplatesInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -51,8 +52,7 @@ type ListAnalysisTemplatesOutput struct { // This member is required. AnalysisTemplateSummaries []types.AnalysisTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -164,7 +164,9 @@ func (c *Client) addOperationListAnalysisTemplatesMiddlewares(stack *middleware. // ListAnalysisTemplatesPaginatorOptions is the paginator options for // ListAnalysisTemplates type ListAnalysisTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go b/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go index 597debee008..6c7b451fe8b 100644 --- a/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go +++ b/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go @@ -35,11 +35,12 @@ type ListCollaborationAnalysisTemplatesInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -52,8 +53,7 @@ type ListCollaborationAnalysisTemplatesOutput struct { // This member is required. CollaborationAnalysisTemplateSummaries []types.CollaborationAnalysisTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -165,7 +165,9 @@ func (c *Client) addOperationListCollaborationAnalysisTemplatesMiddlewares(stack // ListCollaborationAnalysisTemplatesPaginatorOptions is the paginator options for // ListCollaborationAnalysisTemplates type ListCollaborationAnalysisTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go b/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go index 24b6c8e075c..b12f4dc43ec 100644 --- a/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go +++ b/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go @@ -35,11 +35,12 @@ type ListCollaborationConfiguredAudienceModelAssociationsInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -53,8 +54,7 @@ type ListCollaborationConfiguredAudienceModelAssociationsOutput struct { // This member is required. CollaborationConfiguredAudienceModelAssociationSummaries []types.CollaborationConfiguredAudienceModelAssociationSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -166,7 +166,9 @@ func (c *Client) addOperationListCollaborationConfiguredAudienceModelAssociation // ListCollaborationConfiguredAudienceModelAssociationsPaginatorOptions is the // paginator options for ListCollaborationConfiguredAudienceModelAssociations type ListCollaborationConfiguredAudienceModelAssociationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go index 99b3b10abc4..5624b680676 100644 --- a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go +++ b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go @@ -35,13 +35,12 @@ type ListCollaborationPrivacyBudgetTemplatesInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -56,8 +55,7 @@ type ListCollaborationPrivacyBudgetTemplatesOutput struct { // This member is required. CollaborationPrivacyBudgetTemplateSummaries []types.CollaborationPrivacyBudgetTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -169,9 +167,9 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetTemplatesMiddlewares( // ListCollaborationPrivacyBudgetTemplatesPaginatorOptions is the paginator // options for ListCollaborationPrivacyBudgetTemplates type ListCollaborationPrivacyBudgetTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go index 9d666d74150..3d49a483357 100644 --- a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go +++ b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go @@ -41,13 +41,12 @@ type ListCollaborationPrivacyBudgetsInput struct { // This member is required. PrivacyBudgetType types.PrivacyBudgetType - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -60,8 +59,7 @@ type ListCollaborationPrivacyBudgetsOutput struct { // This member is required. CollaborationPrivacyBudgetSummaries []types.CollaborationPrivacyBudgetSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -173,9 +171,9 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetsMiddlewares(stack *m // ListCollaborationPrivacyBudgetsPaginatorOptions is the paginator options for // ListCollaborationPrivacyBudgets type ListCollaborationPrivacyBudgetsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListCollaborations.go b/service/cleanrooms/api_op_ListCollaborations.go index 712d1ca6cbd..4fdedc6deb4 100644 --- a/service/cleanrooms/api_op_ListCollaborations.go +++ b/service/cleanrooms/api_op_ListCollaborations.go @@ -29,16 +29,15 @@ func (c *Client) ListCollaborations(ctx context.Context, params *ListCollaborati type ListCollaborationsInput struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 // The caller's status in a collaboration. MemberStatus types.FilterableMemberStatus - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -51,8 +50,7 @@ type ListCollaborationsOutput struct { // This member is required. CollaborationList []types.CollaborationSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -161,9 +159,9 @@ func (c *Client) addOperationListCollaborationsMiddlewares(stack *middleware.Sta // ListCollaborationsPaginatorOptions is the paginator options for // ListCollaborations type ListCollaborationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go b/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go index d1503ac5a6e..d73b0e5f34b 100644 --- a/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go +++ b/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go @@ -35,13 +35,12 @@ type ListConfiguredAudienceModelAssociationsInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -166,9 +165,9 @@ func (c *Client) addOperationListConfiguredAudienceModelAssociationsMiddlewares( // ListConfiguredAudienceModelAssociationsPaginatorOptions is the paginator // options for ListConfiguredAudienceModelAssociations type ListConfiguredAudienceModelAssociationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListConfiguredTableAssociations.go b/service/cleanrooms/api_op_ListConfiguredTableAssociations.go index e239753084c..718ff9c112a 100644 --- a/service/cleanrooms/api_op_ListConfiguredTableAssociations.go +++ b/service/cleanrooms/api_op_ListConfiguredTableAssociations.go @@ -35,11 +35,12 @@ type ListConfiguredTableAssociationsInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -52,8 +53,7 @@ type ListConfiguredTableAssociationsOutput struct { // This member is required. ConfiguredTableAssociationSummaries []types.ConfiguredTableAssociationSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -165,7 +165,9 @@ func (c *Client) addOperationListConfiguredTableAssociationsMiddlewares(stack *m // ListConfiguredTableAssociationsPaginatorOptions is the paginator options for // ListConfiguredTableAssociations type ListConfiguredTableAssociationsPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListConfiguredTables.go b/service/cleanrooms/api_op_ListConfiguredTables.go index 456c3bbcb30..889b2fc8279 100644 --- a/service/cleanrooms/api_op_ListConfiguredTables.go +++ b/service/cleanrooms/api_op_ListConfiguredTables.go @@ -29,11 +29,12 @@ func (c *Client) ListConfiguredTables(ctx context.Context, params *ListConfigure type ListConfiguredTablesInput struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -46,8 +47,7 @@ type ListConfiguredTablesOutput struct { // This member is required. ConfiguredTableSummaries []types.ConfiguredTableSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -156,7 +156,9 @@ func (c *Client) addOperationListConfiguredTablesMiddlewares(stack *middleware.S // ListConfiguredTablesPaginatorOptions is the paginator options for // ListConfiguredTables type ListConfiguredTablesPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListMembers.go b/service/cleanrooms/api_op_ListMembers.go index 310508db201..a7389c28b8e 100644 --- a/service/cleanrooms/api_op_ListMembers.go +++ b/service/cleanrooms/api_op_ListMembers.go @@ -34,11 +34,12 @@ type ListMembersInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -51,8 +52,7 @@ type ListMembersOutput struct { // This member is required. MemberSummaries []types.MemberSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -163,7 +163,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListMemberships.go b/service/cleanrooms/api_op_ListMemberships.go index ede62d70995..39a3982c1dd 100644 --- a/service/cleanrooms/api_op_ListMemberships.go +++ b/service/cleanrooms/api_op_ListMemberships.go @@ -29,11 +29,12 @@ func (c *Client) ListMemberships(ctx context.Context, params *ListMembershipsInp type ListMembershipsInput struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // A filter which will return only memberships in the specified status. @@ -49,8 +50,7 @@ type ListMembershipsOutput struct { // This member is required. MembershipSummaries []types.MembershipSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -158,7 +158,9 @@ func (c *Client) addOperationListMembershipsMiddlewares(stack *middleware.Stack, // ListMembershipsPaginatorOptions is the paginator options for ListMemberships type ListMembershipsPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go b/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go index 218dd989a96..51ef347e316 100644 --- a/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go +++ b/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go @@ -37,13 +37,12 @@ type ListPrivacyBudgetTemplatesInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -57,8 +56,7 @@ type ListPrivacyBudgetTemplatesOutput struct { // This member is required. PrivacyBudgetTemplateSummaries []types.PrivacyBudgetTemplateSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -170,9 +168,9 @@ func (c *Client) addOperationListPrivacyBudgetTemplatesMiddlewares(stack *middle // ListPrivacyBudgetTemplatesPaginatorOptions is the paginator options for // ListPrivacyBudgetTemplates type ListPrivacyBudgetTemplatesPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListPrivacyBudgets.go b/service/cleanrooms/api_op_ListPrivacyBudgets.go index 0bbd76b33e9..efd47879f7e 100644 --- a/service/cleanrooms/api_op_ListPrivacyBudgets.go +++ b/service/cleanrooms/api_op_ListPrivacyBudgets.go @@ -42,13 +42,12 @@ type ListPrivacyBudgetsInput struct { // This member is required. PrivacyBudgetType types.PrivacyBudgetType - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string noSmithyDocumentSerde @@ -63,8 +62,7 @@ type ListPrivacyBudgetsOutput struct { // This member is required. PrivacyBudgetSummaries []types.PrivacyBudgetSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -176,9 +174,9 @@ func (c *Client) addOperationListPrivacyBudgetsMiddlewares(stack *middleware.Sta // ListPrivacyBudgetsPaginatorOptions is the paginator options for // ListPrivacyBudgets type ListPrivacyBudgetsPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service may return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListProtectedQueries.go b/service/cleanrooms/api_op_ListProtectedQueries.go index 9c0ef3df277..7565d5fe88a 100644 --- a/service/cleanrooms/api_op_ListProtectedQueries.go +++ b/service/cleanrooms/api_op_ListProtectedQueries.go @@ -34,13 +34,12 @@ type ListProtectedQueriesInput struct { // This member is required. MembershipIdentifier *string - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service can return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // A filter on the status of the protected query. @@ -56,8 +55,7 @@ type ListProtectedQueriesOutput struct { // This member is required. ProtectedQueries []types.ProtectedQuerySummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -169,9 +167,9 @@ func (c *Client) addOperationListProtectedQueriesMiddlewares(stack *middleware.S // ListProtectedQueriesPaginatorOptions is the paginator options for // ListProtectedQueries type ListProtectedQueriesPaginatorOptions struct { - // The maximum size of the results that is returned per call. Service chooses a - // default if it has not been set. Service can return a nextToken even if the - // maximum results has not been met. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_ListSchemas.go b/service/cleanrooms/api_op_ListSchemas.go index 132630a7cce..b4136963ec3 100644 --- a/service/cleanrooms/api_op_ListSchemas.go +++ b/service/cleanrooms/api_op_ListSchemas.go @@ -35,15 +35,15 @@ type ListSchemasInput struct { // This member is required. CollaborationIdentifier *string - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. MaxResults *int32 - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string - // If present, filter schemas by schema type. The only valid schema type is - // currently `TABLE`. + // If present, filter schemas by schema type. SchemaType types.SchemaType noSmithyDocumentSerde @@ -56,8 +56,7 @@ type ListSchemasOutput struct { // This member is required. SchemaSummaries []types.SchemaSummary - // The token value retrieved from a previous call to access the next page of - // results. + // The pagination token that's used to fetch the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -168,7 +167,9 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt // ListSchemasPaginatorOptions is the paginator options for ListSchemas type ListSchemasPaginatorOptions struct { - // The maximum size of the results that is returned per call. + // The maximum number of results that are returned for an API request call. The + // service chooses a default number if you don't set one. The service might return + // a `nextToken` even if the `maxResults` value has not been met. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cleanrooms/api_op_StartProtectedQuery.go b/service/cleanrooms/api_op_StartProtectedQuery.go index fc342fbd029..79e775e8587 100644 --- a/service/cleanrooms/api_op_StartProtectedQuery.go +++ b/service/cleanrooms/api_op_StartProtectedQuery.go @@ -45,6 +45,9 @@ type StartProtectedQueryInput struct { // This member is required. Type types.ProtectedQueryType + // The compute configuration for the protected query. + ComputeConfiguration types.ComputeConfiguration + // The details needed to write the query results. ResultConfiguration *types.ProtectedQueryResultConfiguration diff --git a/service/cleanrooms/deserializers.go b/service/cleanrooms/deserializers.go index 085479a2da4..d85f920bb7d 100644 --- a/service/cleanrooms/deserializers.go +++ b/service/cleanrooms/deserializers.go @@ -9933,6 +9933,9 @@ func awsRestjson1_deserializeOpErrorPopulateIdMappingTable(response *smithyhttp. 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) @@ -14645,6 +14648,71 @@ func awsRestjson1_deserializeDocumentBatchGetSchemaErrorList(v *[]types.BatchGet return nil } +func awsRestjson1_deserializeDocumentBilledResourceUtilization(v **types.BilledResourceUtilization, 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.BilledResourceUtilization + if *v == nil { + sv = &types.BilledResourceUtilization{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "units": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Units = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.Units = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCollaboration(v **types.Collaboration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14667,6 +14735,15 @@ func awsRestjson1_deserializeDocumentCollaboration(v **types.Collaboration, valu for key, value := range shape { switch key { + case "analyticsEngine": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnalyticsEngine to be of type string, got %T instead", value) + } + sv.AnalyticsEngine = types.AnalyticsEngine(jtv) + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -16227,6 +16304,15 @@ func awsRestjson1_deserializeDocumentCollaborationSummary(v **types.Collaboratio for key, value := range shape { switch key { + case "analyticsEngine": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnalyticsEngine to be of type string, got %T instead", value) + } + sv.AnalyticsEngine = types.AnalyticsEngine(jtv) + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -16457,6 +16543,46 @@ func awsRestjson1_deserializeDocumentColumnList(v *[]types.Column, value interfa return nil } +func awsRestjson1_deserializeDocumentComputeConfiguration(v *types.ComputeConfiguration, 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.ComputeConfiguration +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "worker": + var mv types.WorkerComputeConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentWorkerComputeConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ComputeConfigurationMemberWorker{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentConfigurationDetails(v *types.ConfigurationDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21355,6 +21481,11 @@ func awsRestjson1_deserializeDocumentProtectedQuery(v **types.ProtectedQuery, va for key, value := range shape { switch key { + case "computeConfiguration": + if err := awsRestjson1_deserializeDocumentComputeConfiguration(&sv.ComputeConfiguration, value); err != nil { + return err + } + case "createTime": if value != nil { switch jtv := value.(type) { @@ -21828,6 +21959,15 @@ func awsRestjson1_deserializeDocumentProtectedQueryS3OutputConfiguration(v **typ sv.ResultFormat = types.ResultFormat(jtv) } + case "singleFileOutput": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.SingleFileOutput = ptr.Bool(jtv) + } + default: _, _ = key, value @@ -21953,6 +22093,11 @@ func awsRestjson1_deserializeDocumentProtectedQueryStatistics(v **types.Protecte for key, value := range shape { switch key { + case "billedResourceUtilization": + if err := awsRestjson1_deserializeDocumentBilledResourceUtilization(&sv.BilledResourceUtilization, value); err != nil { + return err + } + case "totalDurationInMillis": if value != nil { jtv, ok := value.(json.Number) @@ -23462,6 +23607,59 @@ func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.Val return nil } +func awsRestjson1_deserializeDocumentWorkerComputeConfiguration(v **types.WorkerComputeConfiguration, 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.WorkerComputeConfiguration + if *v == nil { + sv = &types.WorkerComputeConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "number": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Number = ptr.Int32(int32(i64)) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkerComputeType to be of type string, got %T instead", value) + } + sv.Type = types.WorkerComputeType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDocument(v *document.Interface, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cleanrooms/serializers.go b/service/cleanrooms/serializers.go index 1edb6f48ba2..cfc0df05191 100644 --- a/service/cleanrooms/serializers.go +++ b/service/cleanrooms/serializers.go @@ -501,6 +501,11 @@ func awsRestjson1_serializeOpDocumentCreateCollaborationInput(v *CreateCollabora object := value.Object() defer object.Close() + if len(v.AnalyticsEngine) > 0 { + ok := object.Key("analyticsEngine") + ok.String(string(v.AnalyticsEngine)) + } + if v.CreatorDisplayName != nil { ok := object.Key("creatorDisplayName") ok.String(*v.CreatorDisplayName) @@ -5697,6 +5702,13 @@ func awsRestjson1_serializeOpDocumentStartProtectedQueryInput(v *StartProtectedQ object := value.Object() defer object.Close() + if v.ComputeConfiguration != nil { + ok := object.Key("computeConfiguration") + if err := awsRestjson1_serializeDocumentComputeConfiguration(v.ComputeConfiguration, ok); err != nil { + return err + } + } + if v.ResultConfiguration != nil { ok := object.Key("resultConfiguration") if err := awsRestjson1_serializeDocumentProtectedQueryResultConfiguration(v.ResultConfiguration, ok); err != nil { @@ -7503,6 +7515,24 @@ func awsRestjson1_serializeDocumentAnalysisTemplateArnList(v []string, value smi return nil } +func awsRestjson1_serializeDocumentComputeConfiguration(v types.ComputeConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ComputeConfigurationMemberWorker: + av := object.Key("worker") + if err := awsRestjson1_serializeDocumentWorkerComputeConfiguration(&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_serializeDocumentConfiguredTableAnalysisRulePolicy(v types.ConfiguredTableAnalysisRulePolicy, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8119,6 +8149,11 @@ func awsRestjson1_serializeDocumentProtectedQueryS3OutputConfiguration(v *types. ok.String(string(v.ResultFormat)) } + if v.SingleFileOutput != nil { + ok := object.Key("singleFileOutput") + ok.Boolean(*v.SingleFileOutput) + } + return nil } @@ -8238,3 +8273,20 @@ func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson. } return nil } + +func awsRestjson1_serializeDocumentWorkerComputeConfiguration(v *types.WorkerComputeConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Number != nil { + ok := object.Key("number") + ok.Integer(*v.Number) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} diff --git a/service/cleanrooms/types/enums.go b/service/cleanrooms/types/enums.go index 3004b8cdc96..52585d33f8a 100644 --- a/service/cleanrooms/types/enums.go +++ b/service/cleanrooms/types/enums.go @@ -198,6 +198,25 @@ func (AnalysisType) Values() []AnalysisType { } } +type AnalyticsEngine string + +// Enum values for AnalyticsEngine +const ( + AnalyticsEngineSpark AnalyticsEngine = "SPARK" + AnalyticsEngineCleanRoomsSql AnalyticsEngine = "CLEAN_ROOMS_SQL" +) + +// Values returns all known values for AnalyticsEngine. 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 (AnalyticsEngine) Values() []AnalyticsEngine { + return []AnalyticsEngine{ + "SPARK", + "CLEAN_ROOMS_SQL", + } +} + type CollaborationQueryLogStatus string // Enum values for CollaborationQueryLogStatus @@ -483,6 +502,19 @@ const ( ParameterTypeTime ParameterType = "TIME" ParameterTypeTimetz ParameterType = "TIMETZ" ParameterTypeVarbyte ParameterType = "VARBYTE" + ParameterTypeBinary ParameterType = "BINARY" + ParameterTypeByte ParameterType = "BYTE" + ParameterTypeCharacter ParameterType = "CHARACTER" + ParameterTypeDouble ParameterType = "DOUBLE" + ParameterTypeFloat ParameterType = "FLOAT" + ParameterTypeInt ParameterType = "INT" + ParameterTypeLong ParameterType = "LONG" + ParameterTypeNumeric ParameterType = "NUMERIC" + ParameterTypeShort ParameterType = "SHORT" + ParameterTypeString ParameterType = "STRING" + ParameterTypeTimestampLtz ParameterType = "TIMESTAMP_LTZ" + ParameterTypeTimestampNtz ParameterType = "TIMESTAMP_NTZ" + ParameterTypeTinyint ParameterType = "TINYINT" ) // Values returns all known values for ParameterType. Note that this can be @@ -506,6 +538,19 @@ func (ParameterType) Values() []ParameterType { "TIME", "TIMETZ", "VARBYTE", + "BINARY", + "BYTE", + "CHARACTER", + "DOUBLE", + "FLOAT", + "INT", + "LONG", + "NUMERIC", + "SHORT", + "STRING", + "TIMESTAMP_LTZ", + "TIMESTAMP_NTZ", + "TINYINT", } } @@ -828,3 +873,22 @@ func (ValidationExceptionReason) Values() []ValidationExceptionReason { "IAM_SYNCHRONIZATION_DELAY", } } + +type WorkerComputeType string + +// Enum values for WorkerComputeType +const ( + WorkerComputeTypeCr1x WorkerComputeType = "CR.1X" + WorkerComputeTypeCr4x WorkerComputeType = "CR.4X" +) + +// Values returns all known values for WorkerComputeType. 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 (WorkerComputeType) Values() []WorkerComputeType { + return []WorkerComputeType{ + "CR.1X", + "CR.4X", + } +} diff --git a/service/cleanrooms/types/types.go b/service/cleanrooms/types/types.go index abc6ffd8e8c..fcd3c5242f2 100644 --- a/service/cleanrooms/types/types.go +++ b/service/cleanrooms/types/types.go @@ -560,6 +560,19 @@ type BatchGetSchemaError struct { noSmithyDocumentSerde } +// Information related to the utilization of resources that have been billed or +// +// charged for in a given context, such as a protected query. +type BilledResourceUtilization struct { + + // The number of Clean Rooms Processing Unit (CRPU) hours that have been billed. + // + // This member is required. + Units *float64 + + noSmithyDocumentSerde +} + // The multi-party data share environment. The collaboration contains metadata // about its purpose and participants. type Collaboration struct { @@ -612,6 +625,9 @@ type Collaboration struct { // This member is required. UpdateTime *time.Time + // The analytics engine for the collaboration. + AnalyticsEngine AnalyticsEngine + // The settings for client-side encryption for cryptographic computing. DataEncryptionMetadata *DataEncryptionMetadata @@ -782,7 +798,7 @@ type CollaborationConfiguredAudienceModelAssociation struct { CreateTime *time.Time // The identifier used to reference members of the collaboration. Only supports - // AWS account ID. + // Amazon Web Services account ID. // // This member is required. CreatorAccountId *string @@ -834,7 +850,7 @@ type CollaborationConfiguredAudienceModelAssociationSummary struct { CreateTime *time.Time // The identifier used to reference members of the collaboration. Only supports - // AWS account ID. + // Amazon Web Services account ID. // // This member is required. CreatorAccountId *string @@ -1216,6 +1232,9 @@ type CollaborationSummary struct { // This member is required. UpdateTime *time.Time + // The analytics engine. + AnalyticsEngine AnalyticsEngine + // The ARN of a member in a collaboration. MembershipArn *string @@ -1241,6 +1260,26 @@ type Column struct { noSmithyDocumentSerde } +// The configuration of the compute resources for an analysis with the Spark +// +// analytics engine. +// +// The following types satisfy this interface: +// +// ComputeConfigurationMemberWorker +type ComputeConfiguration interface { + isComputeConfiguration() +} + +// The worker configuration for the compute environment. +type ComputeConfigurationMemberWorker struct { + Value WorkerComputeConfiguration + + noSmithyDocumentSerde +} + +func (*ComputeConfigurationMemberWorker) isComputeConfiguration() {} + // The configuration details. // // The following types satisfy this interface: @@ -3171,6 +3210,9 @@ type ProtectedQuery struct { // This member is required. Status ProtectedQueryStatus + // The compute configuration for the protected query. + ComputeConfiguration ComputeConfiguration + // The sensitivity parameters of the differential privacy results of the protected // query. DifferentialPrivacy *DifferentialPrivacyParameters @@ -3326,6 +3368,11 @@ type ProtectedQueryS3OutputConfiguration struct { // The S3 prefix to unload the protected query results. KeyPrefix *string + // Indicates whether files should be output as a single file ( TRUE ) or output as + // multiple files ( FALSE ). This parameter is only supported for analyses with the + // Spark analytics engine. + SingleFileOutput *bool + noSmithyDocumentSerde } @@ -3360,6 +3407,9 @@ type ProtectedQuerySQLParameters struct { // Contains statistics about the execution of the protected query. type ProtectedQueryStatistics struct { + // The billed resource utilization. + BilledResourceUtilization *BilledResourceUtilization + // The duration of the protected query, from creation until query completion. TotalDurationInMillis *int64 @@ -3394,8 +3444,7 @@ type ProtectedQuerySummary struct { // This member is required. ReceiverConfigurations []ReceiverConfiguration - // The status of the protected query. Value values are `SUBMITTED`, `STARTED`, - // `CANCELLED`, `CANCELLING`, `FAILED`, `SUCCESS`, `TIMED_OUT`. + // The status of the protected query. // // This member is required. Status ProtectedQueryStatus @@ -3473,13 +3522,14 @@ type ReceiverConfiguration struct { // A schema is a relation within a collaboration. type Schema struct { - // The analysis rule types associated with the schema. Currently, only one entry - // is present. + // The analysis rule types that are associated with the schema. Currently, only + // one entry is present. // // This member is required. AnalysisRuleTypes []AnalysisRuleType - // The unique ARN for the collaboration that the schema belongs to. + // The unique Amazon Resource Name (ARN) for the collaboration that the schema + // belongs to. // // This member is required. CollaborationArn *string @@ -3489,12 +3539,12 @@ type Schema struct { // This member is required. CollaborationId *string - // The columns for the relation this schema represents. + // The columns for the relation that this schema represents. // // This member is required. Columns []Column - // The time the schema was created. + // The time at which the schema was created. // // This member is required. CreateTime *time.Time @@ -3525,18 +3575,18 @@ type Schema struct { // This member is required. SchemaStatusDetails []SchemaStatusDetail - // The type of schema. The only valid value is currently `TABLE`. + // The type of schema. // // This member is required. Type SchemaType - // The time the schema was last updated. + // The most recent time at which the schema was updated. // // This member is required. UpdateTime *time.Time // The analysis method for the schema. The only valid value is currently - // DIRECT_QUERY. + // DIRECT_QUERY . AnalysisMethod AnalysisMethod // The schema type properties. @@ -3643,7 +3693,7 @@ type SchemaSummary struct { // This member is required. Name *string - // The type of schema object. The only valid schema type is currently `TABLE`. + // The type of schema object. // // This member is required. Type SchemaType @@ -3713,6 +3763,20 @@ type ValidationExceptionField struct { noSmithyDocumentSerde } +// The configuration of the compute resources for workers running an analysis +// +// with the Clean Rooms SQL analytics engine. +type WorkerComputeConfiguration struct { + + // The number of workers. + Number *int32 + + // The worker compute configuration type. + Type WorkerComputeType + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde // UnknownUnionMember is returned when a union member is returned over the wire, @@ -3727,6 +3791,7 @@ type UnknownUnionMember struct { func (*UnknownUnionMember) isAnalysisRulePolicy() {} func (*UnknownUnionMember) isAnalysisRulePolicyV1() {} func (*UnknownUnionMember) isAnalysisSource() {} +func (*UnknownUnionMember) isComputeConfiguration() {} func (*UnknownUnionMember) isConfigurationDetails() {} func (*UnknownUnionMember) isConfiguredTableAnalysisRulePolicy() {} func (*UnknownUnionMember) isConfiguredTableAnalysisRulePolicyV1() {} diff --git a/service/cleanrooms/types/types_exported_test.go b/service/cleanrooms/types/types_exported_test.go index e0d447161d5..dfc2a19e162 100644 --- a/service/cleanrooms/types/types_exported_test.go +++ b/service/cleanrooms/types/types_exported_test.go @@ -73,6 +73,24 @@ func ExampleAnalysisSource_outputUsage() { var _ *string +func ExampleComputeConfiguration_outputUsage() { + var union types.ComputeConfiguration + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ComputeConfigurationMemberWorker: + _ = v.Value // Value is types.WorkerComputeConfiguration + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.WorkerComputeConfiguration + func ExampleConfigurationDetails_outputUsage() { var union types.ConfigurationDetails // type switches can be used to check the union value diff --git a/service/cloudwatchlogs/api_op_UpdateAnomaly.go b/service/cloudwatchlogs/api_op_UpdateAnomaly.go index 32674926935..0856bc957ab 100644 --- a/service/cloudwatchlogs/api_op_UpdateAnomaly.go +++ b/service/cloudwatchlogs/api_op_UpdateAnomaly.go @@ -53,6 +53,14 @@ type UpdateAnomalyInput struct { // [ListAnomalies]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListAnomalies.html AnomalyId *string + // Set this to true to prevent CloudWatch Logs from displaying this behavior as an + // anomaly in the future. The behavior is then treated as baseline behavior. + // However, if similar but more severe occurrences of this behavior occur in the + // future, those will still be reported as anomalies. + // + // The default is false + Baseline *bool + // If you are suppressing or unsuppressing an pattern, specify its unique ID here. // You can find pattern IDs by using the [ListAnomalies]operation. // diff --git a/service/cloudwatchlogs/serializers.go b/service/cloudwatchlogs/serializers.go index ff67197b26d..1e56ba05f5e 100644 --- a/service/cloudwatchlogs/serializers.go +++ b/service/cloudwatchlogs/serializers.go @@ -6671,6 +6671,11 @@ func awsAwsjson11_serializeOpDocumentUpdateAnomalyInput(v *UpdateAnomalyInput, v ok.String(*v.AnomalyId) } + if v.Baseline != nil { + ok := object.Key("baseline") + ok.Boolean(*v.Baseline) + } + if v.PatternId != nil { ok := object.Key("patternId") ok.String(*v.PatternId) diff --git a/service/iotfleetwise/deserializers.go b/service/iotfleetwise/deserializers.go index d51774c88be..7264ad76419 100644 --- a/service/iotfleetwise/deserializers.go +++ b/service/iotfleetwise/deserializers.go @@ -383,6 +383,9 @@ func awsAwsjson10_deserializeOpErrorBatchUpdateVehicle(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) @@ -6494,6 +6497,9 @@ func awsAwsjson10_deserializeOpErrorUpdateVehicle(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) diff --git a/service/redshiftdata/api_op_BatchExecuteStatement.go b/service/redshiftdata/api_op_BatchExecuteStatement.go index 859bce7c9e4..63dc34729fc 100644 --- a/service/redshiftdata/api_op_BatchExecuteStatement.go +++ b/service/redshiftdata/api_op_BatchExecuteStatement.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/redshiftdata/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" @@ -89,6 +90,10 @@ type BatchExecuteStatementInput struct { // as a database user and authenticating using temporary credentials. DbUser *string + // The data format of the result of the SQL statement. If no format is specified, + // the default is JSON. + ResultFormat types.ResultFormatString + // The name or ARN of the secret that enables access to the database. This // parameter is required when authenticating using Secrets Manager. SecretArn *string diff --git a/service/redshiftdata/api_op_DescribeStatement.go b/service/redshiftdata/api_op_DescribeStatement.go index 91e4e6659aa..714f81678a5 100644 --- a/service/redshiftdata/api_op_DescribeStatement.go +++ b/service/redshiftdata/api_op_DescribeStatement.go @@ -96,6 +96,9 @@ type DescribeStatementOutput struct { // also available in the query column of the STL_QUERY system view. RedshiftQueryId int64 + // The data format of the result of the SQL statement. + ResultFormat types.ResultFormatString + // Either the number of rows returned from the SQL statement or the number of rows // affected. If result size is greater than zero, the result rows can be the number // of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and diff --git a/service/redshiftdata/api_op_ExecuteStatement.go b/service/redshiftdata/api_op_ExecuteStatement.go index 31f881ca88c..4357ad87531 100644 --- a/service/redshiftdata/api_op_ExecuteStatement.go +++ b/service/redshiftdata/api_op_ExecuteStatement.go @@ -89,6 +89,10 @@ type ExecuteStatementInput struct { // The parameters for the SQL statement. Parameters []types.SqlParameter + // The data format of the result of the SQL statement. If no format is specified, + // the default is JSON. + ResultFormat types.ResultFormatString + // The name or ARN of the secret that enables access to the database. This // parameter is required when authenticating using Secrets Manager. SecretArn *string diff --git a/service/redshiftdata/api_op_GetStatementResult.go b/service/redshiftdata/api_op_GetStatementResult.go index 7582133956d..afbdd72d15a 100644 --- a/service/redshiftdata/api_op_GetStatementResult.go +++ b/service/redshiftdata/api_op_GetStatementResult.go @@ -11,8 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Fetches the temporarily cached result of an SQL statement. A token is returned -// to page through the statement results. +// Fetches the temporarily cached result of an SQL statement in JSON format. The +// ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement +// must have specified ResultFormat as JSON , or let the format default to JSON. A +// token is returned to page through the statement results. // // For more information about the Amazon Redshift Data API and CLI usage examples, // see [Using the Amazon Redshift Data API]in the Amazon Redshift Management Guide. @@ -57,7 +59,7 @@ type GetStatementResultInput struct { type GetStatementResultOutput struct { - // The results of the SQL statement. + // The results of the SQL statement in JSON format. // // This member is required. Records [][]types.Field diff --git a/service/redshiftdata/api_op_GetStatementResultV2.go b/service/redshiftdata/api_op_GetStatementResultV2.go new file mode 100644 index 00000000000..d4f5f841f04 --- /dev/null +++ b/service/redshiftdata/api_op_GetStatementResultV2.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshiftdata + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/redshiftdata/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Fetches the temporarily cached result of an SQL statement in CSV format. The +// ExecuteStatement or BatchExecuteStatement operation that ran the SQL statement +// must have specified ResultFormat as CSV . A token is returned to page through +// the statement results. +// +// For more information about the Amazon Redshift Data API and CLI usage examples, +// see [Using the Amazon Redshift Data API]in the Amazon Redshift Management Guide. +// +// [Using the Amazon Redshift Data API]: https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html +func (c *Client) GetStatementResultV2(ctx context.Context, params *GetStatementResultV2Input, optFns ...func(*Options)) (*GetStatementResultV2Output, error) { + if params == nil { + params = &GetStatementResultV2Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetStatementResultV2", params, optFns, c.addOperationGetStatementResultV2Middlewares) + if err != nil { + return nil, err + } + + out := result.(*GetStatementResultV2Output) + out.ResultMetadata = metadata + return out, nil +} + +type GetStatementResultV2Input struct { + + // The identifier of the SQL statement whose results are to be fetched. This value + // is a universally unique identifier (UUID) generated by Amazon Redshift Data API. + // A suffix indicates then number of the SQL statement. For example, + // d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the + // second SQL statement of a batch query. This identifier is returned by + // BatchExecuteStatment , ExecuteStatment , and ListStatements . + // + // This member is required. + Id *string + + // A value that indicates the starting point for the next set of response records + // in a subsequent request. If a value is returned in a response, you can retrieve + // the next set of records by providing this returned NextToken value in the next + // NextToken parameter and retrying the command. If the NextToken field is empty, + // all response records have been retrieved for the request. + NextToken *string + + noSmithyDocumentSerde +} + +type GetStatementResultV2Output struct { + + // The results of the SQL statement in CSV format. + // + // This member is required. + Records []types.QueryRecords + + // The properties (metadata) of a column. + ColumnMetadata []types.ColumnMetadata + + // A value that indicates the starting point for the next set of response records + // in a subsequent request. If a value is returned in a response, you can retrieve + // the next set of records by providing this returned NextToken value in the next + // NextToken parameter and retrying the command. If the NextToken field is empty, + // all response records have been retrieved for the request. + NextToken *string + + // The data format of the result of the SQL statement. + ResultFormat types.ResultFormatString + + // The total number of rows in the result set returned from a query. You can use + // this number to estimate the number of calls to the GetStatementResultV2 + // operation needed to page through the results. + TotalNumRows int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetStatementResultV2Middlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetStatementResultV2{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetStatementResultV2{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetStatementResultV2"); 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 = addSpanRetryLoop(stack, options); 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 = addOpGetStatementResultV2ValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStatementResultV2(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 + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// GetStatementResultV2PaginatorOptions is the paginator options for +// GetStatementResultV2 +type GetStatementResultV2PaginatorOptions struct { + // 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 +} + +// GetStatementResultV2Paginator is a paginator for GetStatementResultV2 +type GetStatementResultV2Paginator struct { + options GetStatementResultV2PaginatorOptions + client GetStatementResultV2APIClient + params *GetStatementResultV2Input + nextToken *string + firstPage bool +} + +// NewGetStatementResultV2Paginator returns a new GetStatementResultV2Paginator +func NewGetStatementResultV2Paginator(client GetStatementResultV2APIClient, params *GetStatementResultV2Input, optFns ...func(*GetStatementResultV2PaginatorOptions)) *GetStatementResultV2Paginator { + if params == nil { + params = &GetStatementResultV2Input{} + } + + options := GetStatementResultV2PaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &GetStatementResultV2Paginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetStatementResultV2Paginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetStatementResultV2 page. +func (p *GetStatementResultV2Paginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetStatementResultV2Output, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetStatementResultV2(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 +} + +// GetStatementResultV2APIClient is a client that implements the +// GetStatementResultV2 operation. +type GetStatementResultV2APIClient interface { + GetStatementResultV2(context.Context, *GetStatementResultV2Input, ...func(*Options)) (*GetStatementResultV2Output, error) +} + +var _ GetStatementResultV2APIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetStatementResultV2(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetStatementResultV2", + } +} diff --git a/service/redshiftdata/deserializers.go b/service/redshiftdata/deserializers.go index b6a23314009..f7f4f0543db 100644 --- a/service/redshiftdata/deserializers.go +++ b/service/redshiftdata/deserializers.go @@ -751,6 +751,123 @@ func awsAwsjson11_deserializeOpErrorGetStatementResult(response *smithyhttp.Resp } } +type awsAwsjson11_deserializeOpGetStatementResultV2 struct { +} + +func (*awsAwsjson11_deserializeOpGetStatementResultV2) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetStatementResultV2) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson11_deserializeOpErrorGetStatementResultV2(response, &metadata) + } + output := &GetStatementResultV2Output{} + 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 = awsAwsjson11_deserializeOpDocumentGetStatementResultV2Output(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetStatementResultV2(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") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListDatabases struct { } @@ -2229,6 +2346,38 @@ func awsAwsjson11_deserializeDocumentFieldList(v *[]types.Field, value interface return nil } +func awsAwsjson11_deserializeDocumentFormattedSqlRecords(v *[]types.QueryRecords, 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.QueryRecords + if *v == nil { + cv = []types.QueryRecords{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.QueryRecords + if err := awsAwsjson11_deserializeDocumentQueryRecords(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2269,6 +2418,48 @@ func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsAwsjson11_deserializeDocumentQueryRecords(v *types.QueryRecords, 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.QueryRecords +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "CSVRecords": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.QueryRecordsMemberCSVRecords{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsAwsjson11_deserializeDocumentQueryTimeoutException(v **types.QueryTimeoutException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2584,6 +2775,15 @@ func awsAwsjson11_deserializeDocumentStatementData(v **types.StatementData, valu return err } + case "ResultFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResultFormatString to be of type string, got %T instead", value) + } + sv.ResultFormat = types.ResultFormatString(jtv) + } + case "SecretArn": if value != nil { jtv, ok := value.(string) @@ -3341,6 +3541,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeStatementOutput(v **DescribeState sv.RedshiftQueryId = i64 } + case "ResultFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResultFormatString to be of type string, got %T instead", value) + } + sv.ResultFormat = types.ResultFormatString(jtv) + } + case "ResultRows": if value != nil { jtv, ok := value.(json.Number) @@ -3665,6 +3874,78 @@ func awsAwsjson11_deserializeOpDocumentGetStatementResultOutput(v **GetStatement return nil } +func awsAwsjson11_deserializeOpDocumentGetStatementResultV2Output(v **GetStatementResultV2Output, 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 *GetStatementResultV2Output + if *v == nil { + sv = &GetStatementResultV2Output{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ColumnMetadata": + if err := awsAwsjson11_deserializeDocumentColumnMetadataList(&sv.ColumnMetadata, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Records": + if err := awsAwsjson11_deserializeDocumentFormattedSqlRecords(&sv.Records, value); err != nil { + return err + } + + case "ResultFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResultFormatString to be of type string, got %T instead", value) + } + sv.ResultFormat = types.ResultFormatString(jtv) + } + + case "TotalNumRows": + 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.TotalNumRows = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListDatabasesOutput(v **ListDatabasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/redshiftdata/generated.json b/service/redshiftdata/generated.json index 1a406a12ed9..25883a53124 100644 --- a/service/redshiftdata/generated.json +++ b/service/redshiftdata/generated.json @@ -14,6 +14,7 @@ "api_op_DescribeTable.go", "api_op_ExecuteStatement.go", "api_op_GetStatementResult.go", + "api_op_GetStatementResultV2.go", "api_op_ListDatabases.go", "api_op_ListSchemas.go", "api_op_ListStatements.go", diff --git a/service/redshiftdata/serializers.go b/service/redshiftdata/serializers.go index 313b01973b6..55862870d50 100644 --- a/service/redshiftdata/serializers.go +++ b/service/redshiftdata/serializers.go @@ -382,6 +382,67 @@ func (m *awsAwsjson11_serializeOpGetStatementResult) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetStatementResultV2 struct { +} + +func (*awsAwsjson11_serializeOpGetStatementResultV2) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetStatementResultV2) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*GetStatementResultV2Input) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("RedshiftData.GetStatementResultV2") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetStatementResultV2Input(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 = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListDatabases struct { } @@ -690,6 +751,11 @@ func awsAwsjson11_serializeOpDocumentBatchExecuteStatementInput(v *BatchExecuteS ok.String(*v.DbUser) } + if len(v.ResultFormat) > 0 { + ok := object.Key("ResultFormat") + ok.String(string(v.ResultFormat)) + } + if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) @@ -842,6 +908,11 @@ func awsAwsjson11_serializeOpDocumentExecuteStatementInput(v *ExecuteStatementIn } } + if len(v.ResultFormat) > 0 { + ok := object.Key("ResultFormat") + ok.String(string(v.ResultFormat)) + } + if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) @@ -897,6 +968,23 @@ func awsAwsjson11_serializeOpDocumentGetStatementResultInput(v *GetStatementResu return nil } +func awsAwsjson11_serializeOpDocumentGetStatementResultV2Input(v *GetStatementResultV2Input, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListDatabasesInput(v *ListDatabasesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/redshiftdata/snapshot/api_op_GetStatementResultV2.go.snap b/service/redshiftdata/snapshot/api_op_GetStatementResultV2.go.snap new file mode 100644 index 00000000000..917b8d90c22 --- /dev/null +++ b/service/redshiftdata/snapshot/api_op_GetStatementResultV2.go.snap @@ -0,0 +1,41 @@ +GetStatementResultV2 + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/redshiftdata/snapshot_test.go b/service/redshiftdata/snapshot_test.go index d5e64157592..04cd52aa912 100644 --- a/service/redshiftdata/snapshot_test.go +++ b/service/redshiftdata/snapshot_test.go @@ -134,6 +134,18 @@ func TestCheckSnapshot_GetStatementResult(t *testing.T) { } } +func TestCheckSnapshot_GetStatementResultV2(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStatementResultV2(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetStatementResultV2") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListDatabases(t *testing.T) { svc := New(Options{}) _, err := svc.ListDatabases(context.Background(), nil, func(o *Options) { @@ -253,6 +265,18 @@ func TestUpdateSnapshot_GetStatementResult(t *testing.T) { } } +func TestUpdateSnapshot_GetStatementResultV2(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetStatementResultV2(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetStatementResultV2") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListDatabases(t *testing.T) { svc := New(Options{}) _, err := svc.ListDatabases(context.Background(), nil, func(o *Options) { diff --git a/service/redshiftdata/types/enums.go b/service/redshiftdata/types/enums.go index dce58f5a3d5..b9baf7cebda 100644 --- a/service/redshiftdata/types/enums.go +++ b/service/redshiftdata/types/enums.go @@ -2,6 +2,25 @@ package types +type ResultFormatString string + +// Enum values for ResultFormatString +const ( + ResultFormatStringJson ResultFormatString = "JSON" + ResultFormatStringCsv ResultFormatString = "CSV" +) + +// Values returns all known values for ResultFormatString. 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 (ResultFormatString) Values() []ResultFormatString { + return []ResultFormatString{ + "JSON", + "CSV", + } +} + type StatementStatusString string // Enum values for StatementStatusString diff --git a/service/redshiftdata/types/types.go b/service/redshiftdata/types/types.go index dc2c977ab9f..4ebf7167877 100644 --- a/service/redshiftdata/types/types.go +++ b/service/redshiftdata/types/types.go @@ -120,6 +120,24 @@ type FieldMemberStringValue struct { func (*FieldMemberStringValue) isField() {} +// The results of the SQL statement. +// +// The following types satisfy this interface: +// +// QueryRecordsMemberCSVRecords +type QueryRecords interface { + isQueryRecords() +} + +// The results of the SQL statement in CSV format. +type QueryRecordsMemberCSVRecords struct { + Value string + + noSmithyDocumentSerde +} + +func (*QueryRecordsMemberCSVRecords) isQueryRecords() {} + // A parameter used in a SQL statement. type SqlParameter struct { @@ -165,6 +183,9 @@ type StatementData struct { // of the queries in a batch query request. QueryStrings []string + // The data format of the result of the SQL statement. + ResultFormat ResultFormatString + // The name or Amazon Resource Name (ARN) of the secret that enables access to the // database. SecretArn *string @@ -263,4 +284,5 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isField() {} +func (*UnknownUnionMember) isField() {} +func (*UnknownUnionMember) isQueryRecords() {} diff --git a/service/redshiftdata/types/types_exported_test.go b/service/redshiftdata/types/types_exported_test.go index 17bad46c893..2c957ad6ef6 100644 --- a/service/redshiftdata/types/types_exported_test.go +++ b/service/redshiftdata/types/types_exported_test.go @@ -43,3 +43,21 @@ var _ *bool var _ *int64 var _ *float64 var _ []byte + +func ExampleQueryRecords_outputUsage() { + var union types.QueryRecords + // type switches can be used to check the union value + switch v := union.(type) { + case *types.QueryRecordsMemberCSVRecords: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string diff --git a/service/redshiftdata/validators.go b/service/redshiftdata/validators.go index ead72ce8591..304596f1ab7 100644 --- a/service/redshiftdata/validators.go +++ b/service/redshiftdata/validators.go @@ -130,6 +130,26 @@ func (m *validateOpGetStatementResult) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetStatementResultV2 struct { +} + +func (*validateOpGetStatementResultV2) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetStatementResultV2) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetStatementResultV2Input) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetStatementResultV2Input(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListDatabases struct { } @@ -214,6 +234,10 @@ func addOpGetStatementResultValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetStatementResult{}, middleware.After) } +func addOpGetStatementResultV2ValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetStatementResultV2{}, middleware.After) +} + func addOpListDatabasesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListDatabases{}, middleware.After) } @@ -356,6 +380,21 @@ func validateOpGetStatementResultInput(v *GetStatementResultInput) error { } } +func validateOpGetStatementResultV2Input(v *GetStatementResultV2Input) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetStatementResultV2Input"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListDatabasesInput(v *ListDatabasesInput) error { if v == nil { return nil diff --git a/service/sagemaker/api_op_CreateDomain.go b/service/sagemaker/api_op_CreateDomain.go index c0f7b47811c..fcd7f0a8bb0 100644 --- a/service/sagemaker/api_op_CreateDomain.go +++ b/service/sagemaker/api_op_CreateDomain.go @@ -120,7 +120,7 @@ type CreateDomainInput struct { // to Service . AppSecurityGroupManagement types.AppSecurityGroupManagement - // The default settings used to create a space. + // The default settings for shared spaces that users create in the domain. DefaultSpaceSettings *types.DefaultSpaceSettings // A collection of Domain settings. diff --git a/service/sagemaker/api_op_CreateNotebookInstance.go b/service/sagemaker/api_op_CreateNotebookInstance.go index 4d82f13f7fd..fd2d063b633 100644 --- a/service/sagemaker/api_op_CreateNotebookInstance.go +++ b/service/sagemaker/api_op_CreateNotebookInstance.go @@ -92,11 +92,11 @@ type CreateNotebookInstanceInput struct { // This member is required. RoleArn *string - // A list of Elastic Inference (EI) instance types to associate with this notebook - // instance. Currently, only one instance type can be associated with a notebook - // instance. For more information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify a list of EI instance types to associate + // with this notebook instance. AcceleratorTypes []types.NotebookInstanceAcceleratorType // An array of up to three Git repositories to associate with the notebook diff --git a/service/sagemaker/api_op_DescribeDomain.go b/service/sagemaker/api_op_DescribeDomain.go index 93d4c217d5a..bcf5d553556 100644 --- a/service/sagemaker/api_op_DescribeDomain.go +++ b/service/sagemaker/api_op_DescribeDomain.go @@ -61,7 +61,7 @@ type DescribeDomainOutput struct { // The creation time. CreationTime *time.Time - // The default settings used to create a space. + // The default settings for shared spaces that users create in the domain. DefaultSpaceSettings *types.DefaultSpaceSettings // Settings which are applied to UserProfiles in this domain if settings are not diff --git a/service/sagemaker/api_op_DescribeNotebookInstance.go b/service/sagemaker/api_op_DescribeNotebookInstance.go index 7a744ff2b78..292f9468898 100644 --- a/service/sagemaker/api_op_DescribeNotebookInstance.go +++ b/service/sagemaker/api_op_DescribeNotebookInstance.go @@ -45,11 +45,11 @@ type DescribeNotebookInstanceInput struct { type DescribeNotebookInstanceOutput struct { - // A list of the Elastic Inference (EI) instance types associated with this - // notebook instance. Currently only one EI instance type can be associated with a - // notebook instance. For more information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify a list of the EI instance types associated + // with this notebook instance. AcceleratorTypes []types.NotebookInstanceAcceleratorType // An array of up to three Git repositories associated with the notebook instance. diff --git a/service/sagemaker/api_op_UpdateDomain.go b/service/sagemaker/api_op_UpdateDomain.go index bb787c99aa8..bc15cdbec9c 100644 --- a/service/sagemaker/api_op_UpdateDomain.go +++ b/service/sagemaker/api_op_UpdateDomain.go @@ -56,7 +56,7 @@ type UpdateDomainInput struct { // to Service . AppSecurityGroupManagement types.AppSecurityGroupManagement - // The default settings used to create a space within the domain. + // The default settings for shared spaces that users create in the domain. DefaultSpaceSettings *types.DefaultSpaceSettings // A collection of settings. diff --git a/service/sagemaker/api_op_UpdateNotebookInstance.go b/service/sagemaker/api_op_UpdateNotebookInstance.go index 1e7a237ffd3..c3bff5feddc 100644 --- a/service/sagemaker/api_op_UpdateNotebookInstance.go +++ b/service/sagemaker/api_op_UpdateNotebookInstance.go @@ -36,11 +36,11 @@ type UpdateNotebookInstanceInput struct { // This member is required. NotebookInstanceName *string - // A list of the Elastic Inference (EI) instance types to associate with this - // notebook instance. Currently only one EI instance type can be associated with a - // notebook instance. For more information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify a list of the EI instance types to associate + // with this notebook instance. AcceleratorTypes []types.NotebookInstanceAcceleratorType // An array of up to three Git repositories to associate with the notebook @@ -63,10 +63,11 @@ type UpdateNotebookInstanceInput struct { // [Associating Git Repositories with SageMaker Notebook Instances]: https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html DefaultCodeRepository *string - // A list of the Elastic Inference (EI) instance types to remove from this - // notebook instance. This operation is idempotent. If you specify an accelerator - // type that is not associated with the notebook instance when you call this - // method, it does not throw an error. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. + // + // This parameter was used to specify a list of the EI instance types to remove + // from this notebook instance. DisassociateAcceleratorTypes *bool // A list of names or URLs of the default Git repositories to remove from this diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 9cfcd14c4c5..017e5089287 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -7355,6 +7355,8 @@ const ( TrainingInstanceTypeMlP4d24xlarge TrainingInstanceType = "ml.p4d.24xlarge" TrainingInstanceTypeMlP4de24xlarge TrainingInstanceType = "ml.p4de.24xlarge" TrainingInstanceTypeMlP548xlarge TrainingInstanceType = "ml.p5.48xlarge" + TrainingInstanceTypeMlP5e48xlarge TrainingInstanceType = "ml.p5e.48xlarge" + TrainingInstanceTypeMlP5en48xlarge TrainingInstanceType = "ml.p5en.48xlarge" TrainingInstanceTypeMlC5Xlarge TrainingInstanceType = "ml.c5.xlarge" TrainingInstanceTypeMlC52xlarge TrainingInstanceType = "ml.c5.2xlarge" TrainingInstanceTypeMlC54xlarge TrainingInstanceType = "ml.c5.4xlarge" @@ -7376,6 +7378,7 @@ const ( TrainingInstanceTypeMlTrn12xlarge TrainingInstanceType = "ml.trn1.2xlarge" TrainingInstanceTypeMlTrn132xlarge TrainingInstanceType = "ml.trn1.32xlarge" TrainingInstanceTypeMlTrn1n32xlarge TrainingInstanceType = "ml.trn1n.32xlarge" + TrainingInstanceTypeMlTrn248xlarge TrainingInstanceType = "ml.trn2.48xlarge" TrainingInstanceTypeMlM6iLarge TrainingInstanceType = "ml.m6i.large" TrainingInstanceTypeMlM6iXlarge TrainingInstanceType = "ml.m6i.xlarge" TrainingInstanceTypeMlM6i2xlarge TrainingInstanceType = "ml.m6i.2xlarge" @@ -7452,6 +7455,8 @@ func (TrainingInstanceType) Values() []TrainingInstanceType { "ml.p4d.24xlarge", "ml.p4de.24xlarge", "ml.p5.48xlarge", + "ml.p5e.48xlarge", + "ml.p5en.48xlarge", "ml.c5.xlarge", "ml.c5.2xlarge", "ml.c5.4xlarge", @@ -7473,6 +7478,7 @@ func (TrainingInstanceType) Values() []TrainingInstanceType { "ml.trn1.2xlarge", "ml.trn1.32xlarge", "ml.trn1n.32xlarge", + "ml.trn2.48xlarge", "ml.m6i.large", "ml.m6i.xlarge", "ml.m6i.2xlarge", diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index e9a84675c6d..46191b926a5 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -408,9 +408,8 @@ type AnnotationConsolidationConfig struct { // The Amazon Resource Name (ARN) of a Lambda function implements the logic for [annotation consolidation] // and to process output data. // - // This parameter is required for all labeling jobs. For [built-in task types], use one of the - // following Amazon SageMaker Ground Truth Lambda function ARNs for - // AnnotationConsolidationLambdaArn . For custom labeling workflows, see [Post-annotation Lambda]. + // For [built-in task types], use one of the following Amazon SageMaker Ground Truth Lambda function + // ARNs for AnnotationConsolidationLambdaArn . For custom labeling workflows, see [Post-annotation Lambda]. // // Bounding box - Finds the most similar boxes from different workers based on the // Jaccard index of the boxes. @@ -4434,7 +4433,10 @@ type DefaultEbsStorageSettings struct { noSmithyDocumentSerde } -// A collection of settings that apply to spaces created in the domain. +// The default settings for shared spaces that users create in the domain. +// +// SageMaker applies these settings only to shared spaces. It doesn't apply them +// to private spaces. type DefaultSpaceSettings struct { // The settings for assigning a custom file system to a domain. Permitted users @@ -13003,21 +13005,6 @@ type OutputConfig struct { // tar.gz file. For example, {"class_labels": "imagenet_labels_1000.txt"} . // Labels inside the txt file should be separated by newlines. // - // - EIA : Compilation for the Elastic Inference Accelerator supports the - // following compiler options: - // - // - precision_mode : Specifies the precision of compiled artifacts. Supported - // values are "FP16" and "FP32" . Default is "FP32" . - // - // - signature_def_key : Specifies the signature to use for models in SavedModel - // format. Defaults is TensorFlow's default signature def key. - // - // - output_names : Specifies a list of output tensor names for models in - // FrozenGraph format. Set at most one API field, either: signature_def_key or - // output_names . - // - // For example: {"precision_mode": "FP32", "output_names": ["output:0"]} - // // [OutputConfig]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OutputConfig.html // [Neuron Compiler CLI Reference Guide]: https://awsdocs-neuron.readthedocs-hosted.com/en/latest/compiler/neuronx-cc/api-reference-guide/neuron-compiler-cli-reference-guide.html CompilerOptions *string @@ -13342,11 +13329,11 @@ type PendingProductionVariantSummary struct { // This member is required. VariantName *string - // The size of the Elastic Inference (EI) instance to use for the production - // variant. EI instances provide on-demand GPU computing for inference. For more - // information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify the size of the EI instance to use for the + // production variant. AcceleratorType ProductionVariantAcceleratorType // The number of instances associated with the variant. @@ -14147,11 +14134,11 @@ type ProductionVariant struct { // This member is required. VariantName *string - // The size of the Elastic Inference (EI) instance to use for the production - // variant. EI instances provide on-demand GPU computing for inference. For more - // information, see [Using Elastic Inference in Amazon SageMaker]. + // This parameter is no longer supported. Elastic Inference (EI) is no longer + // available. // - // [Using Elastic Inference in Amazon SageMaker]: https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html + // This parameter was used to specify the size of the EI instance to use for the + // production variant. AcceleratorType ProductionVariantAcceleratorType // The timeout value, in seconds, for your inference container to pass health @@ -19135,19 +19122,34 @@ type UserSettings struct { // Indicates whether auto-mounting of an EFS volume is supported for the user // profile. The DefaultAsDomain value is only supported for user profiles. Do not // use the DefaultAsDomain value when setting this parameter for a domain. + // + // SageMaker applies this setting only to private spaces that the user creates in + // the domain. SageMaker doesn't apply this setting to shared spaces. AutoMountHomeEFS AutoMountHomeEFS // The Canvas app settings. + // + // SageMaker applies these settings only to private spaces that SageMaker creates + // for the Canvas app. CanvasAppSettings *CanvasAppSettings // The Code Editor application settings. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. CodeEditorAppSettings *CodeEditorAppSettings // The settings for assigning a custom file system to a user profile. Permitted // users can access this file system in Amazon SageMaker Studio. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. CustomFileSystemConfigs []CustomFileSystemConfig // Details about the POSIX identity that is used for file system operations. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. CustomPosixUserConfig *CustomPosixUserConfig // The default experience that the user is directed to when accessing the domain. @@ -19160,9 +19162,15 @@ type UserSettings struct { DefaultLandingUri *string // The execution role for the user. + // + // SageMaker applies this setting only to private spaces that the user creates in + // the domain. SageMaker doesn't apply this setting to shared spaces. ExecutionRole *string // The settings for the JupyterLab application. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. JupyterLabAppSettings *JupyterLabAppSettings // The Jupyter server's app settings. @@ -19190,12 +19198,18 @@ type UserSettings struct { // Amazon SageMaker adds a security group to allow NFS traffic from Amazon // SageMaker Studio. Therefore, the number of security groups that you can specify // is one less than the maximum number shown. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. SecurityGroups []string // Specifies options for sharing Amazon SageMaker Studio notebooks. SharingSettings *SharingSettings // The storage settings for a space. + // + // SageMaker applies these settings only to private spaces that the user creates + // in the domain. SageMaker doesn't apply these settings to shared spaces. SpaceStorageSettings *DefaultSpaceStorageSettings // Whether the user can access Studio. If this value is set to DISABLED , the user diff --git a/service/textract/internal/endpoints/endpoints.go b/service/textract/internal/endpoints/endpoints.go index 885165e11a8..fbeaaec9620 100644 --- a/service/textract/internal/endpoints/endpoints.go +++ b/service/textract/internal/endpoints/endpoints.go @@ -205,6 +205,9 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "textract.eu-central-1.api.aws", }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{},