diff --git a/.changelog/092df2c634dc417d803b4e19bd9825bc.json b/.changelog/092df2c634dc417d803b4e19bd9825bc.json new file mode 100644 index 00000000000..954f24adc84 --- /dev/null +++ b/.changelog/092df2c634dc417d803b4e19bd9825bc.json @@ -0,0 +1,8 @@ +{ + "id": "092df2c6-34dc-417d-803b-4e19bd9825bc", + "type": "feature", + "description": "Amazon Sagemaker Autopilot now supports Text Generation jobs.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/20a0f30d100c4e948e275c906d6ee057.json b/.changelog/20a0f30d100c4e948e275c906d6ee057.json new file mode 100644 index 00000000000..5f44187f1d8 --- /dev/null +++ b/.changelog/20a0f30d100c4e948e275c906d6ee057.json @@ -0,0 +1,8 @@ +{ + "id": "20a0f30d-100c-4e94-8e27-5c906d6ee057", + "type": "feature", + "description": "Add Redshift APIs GetResourcePolicy, DeleteResourcePolicy, PutResourcePolicy and DescribeInboundIntegrations for the new Amazon Redshift Zero-ETL integration feature, which can be used to control data ingress into Redshift namespace, and view inbound integrations.", + "modules": [ + "service/redshift" + ] +} \ No newline at end of file diff --git a/.changelog/3947260a30a04fb086f03076aa69ba11.json b/.changelog/3947260a30a04fb086f03076aa69ba11.json new file mode 100644 index 00000000000..24607f21d14 --- /dev/null +++ b/.changelog/3947260a30a04fb086f03076aa69ba11.json @@ -0,0 +1,8 @@ +{ + "id": "3947260a-30a0-4fb0-86f0-3076aa69ba11", + "type": "feature", + "description": "You can specify ipv4 or dualstack IPAddressType for cluster endpoints. If you specify IPAddressType as dualstack, the new endpoint will be visible under the 'EndpointV2' parameter and will support IPv4 and IPv6 requests. Whereas, the 'Endpoint' will continue to serve IPv4 requests.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/5061e35f165c418fafcc34cb349d93bb.json b/.changelog/5061e35f165c418fafcc34cb349d93bb.json new file mode 100644 index 00000000000..17761083eca --- /dev/null +++ b/.changelog/5061e35f165c418fafcc34cb349d93bb.json @@ -0,0 +1,8 @@ +{ + "id": "5061e35f-165c-418f-afcc-34cb349d93bb", + "type": "feature", + "description": "This release introduces multi-session fleets, allowing customers to provision more than one user session on a single fleet instance.", + "modules": [ + "service/appstream" + ] +} \ No newline at end of file diff --git a/.changelog/7b26854efc034abb95c3d7c294f56a8d.json b/.changelog/7b26854efc034abb95c3d7c294f56a8d.json new file mode 100644 index 00000000000..fa65d88f2c8 --- /dev/null +++ b/.changelog/7b26854efc034abb95c3d7c294f56a8d.json @@ -0,0 +1,8 @@ +{ + "id": "7b26854e-fc03-4abb-95c3-d7c294f56a8d", + "type": "feature", + "description": "No API changes from previous release. This release migrated the model to Smithy keeping all features unchanged.", + "modules": [ + "service/transfer" + ] +} \ No newline at end of file diff --git a/.changelog/96485e083bcb4029a674fb74322c2033.json b/.changelog/96485e083bcb4029a674fb74322c2033.json new file mode 100644 index 00000000000..1d7a3b882da --- /dev/null +++ b/.changelog/96485e083bcb4029a674fb74322c2033.json @@ -0,0 +1,8 @@ +{ + "id": "96485e08-3bcb-4029-a674-fb74322c2033", + "type": "feature", + "description": "Launching GetSecurityGroupsForVpc API. This API gets security groups that can be associated by the AWS account making the request with network interfaces in the specified VPC.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/d40b6227b2f74ad189aaa4b3be8f4e0c.json b/.changelog/d40b6227b2f74ad189aaa4b3be8f4e0c.json new file mode 100644 index 00000000000..05fe75f38ef --- /dev/null +++ b/.changelog/d40b6227b2f74ad189aaa4b3be8f4e0c.json @@ -0,0 +1,8 @@ +{ + "id": "d40b6227-b2f7-4ad1-89aa-a4b3be8f4e0c", + "type": "feature", + "description": "Message Archiving and Replay is now supported in Amazon SNS for FIFO topics.", + "modules": [ + "service/sns" + ] +} \ No newline at end of file diff --git a/.changelog/d6a71608d5db43c395dea12f7a052a2e.json b/.changelog/d6a71608d5db43c395dea12f7a052a2e.json new file mode 100644 index 00000000000..237f1a4dca7 --- /dev/null +++ b/.changelog/d6a71608d5db43c395dea12f7a052a2e.json @@ -0,0 +1,8 @@ +{ + "id": "d6a71608-d5db-43c3-95de-a12f7a052a2e", + "type": "feature", + "description": "Network Firewall now supports inspection of outbound SSL/TLS traffic.", + "modules": [ + "service/networkfirewall" + ] +} \ No newline at end of file diff --git a/.changelog/efbaefbb49684a84be731e877a0dd37d.json b/.changelog/efbaefbb49684a84be731e877a0dd37d.json new file mode 100644 index 00000000000..1a71b961a31 --- /dev/null +++ b/.changelog/efbaefbb49684a84be731e877a0dd37d.json @@ -0,0 +1,8 @@ +{ + "id": "efbaefbb-4968-4a84-be73-1e877a0dd37d", + "type": "feature", + "description": "AWS Systems Manager for SAP added support for registration and discovery of SAP ABAP applications", + "modules": [ + "service/ssmsap" + ] +} \ No newline at end of file diff --git a/service/appstream/api_op_CreateFleet.go b/service/appstream/api_op_CreateFleet.go index f61c411fdc6..91945e7ceed 100644 --- a/service/appstream/api_op_CreateFleet.go +++ b/service/appstream/api_op_CreateFleet.go @@ -160,11 +160,15 @@ type CreateFleetInput struct { // Elastic fleets, and not allowed for other fleet types. MaxConcurrentSessions *int32 + // The maximum number of user sessions on an instance. This only applies to + // multi-session fleets. + MaxSessionsPerInstance *int32 + // The maximum amount of time that a streaming session can remain active, in // seconds. If users are still connected to a streaming instance five minutes // before this limit is reached, they are prompted to save any open documents // before being disconnected. After this time elapses, the instance is terminated - // and replaced by a new instance. Specify a value between 600 and 360000. + // and replaced by a new instance. Specify a value between 600 and 432000. MaxUserDurationInSeconds *int32 // The fleet platform. WINDOWS_SERVER_2019 and AMAZON_LINUX2 are supported for diff --git a/service/appstream/api_op_DescribeSessions.go b/service/appstream/api_op_DescribeSessions.go index 4c27562d3b9..0f95f32e603 100644 --- a/service/appstream/api_op_DescribeSessions.go +++ b/service/appstream/api_op_DescribeSessions.go @@ -52,6 +52,9 @@ type DescribeSessionsInput struct { // users using a streaming URL. AuthenticationType types.AuthenticationType + // The identifier for the instance hosting the session. + InstanceId *string + // The size of each page of results. The default value is 20 and the maximum value // is 50. Limit *int32 diff --git a/service/appstream/api_op_UpdateFleet.go b/service/appstream/api_op_UpdateFleet.go index 8aba58bfbe5..7bac7794ef5 100644 --- a/service/appstream/api_op_UpdateFleet.go +++ b/service/appstream/api_op_UpdateFleet.go @@ -161,6 +161,10 @@ type UpdateFleetInput struct { // The maximum number of concurrent sessions for a fleet. MaxConcurrentSessions *int32 + // The maximum number of user sessions on an instance. This only applies to + // multi-session fleets. + MaxSessionsPerInstance *int32 + // The maximum amount of time that a streaming session can remain active, in // seconds. If users are still connected to a streaming instance five minutes // before this limit is reached, they are prompted to save any open documents diff --git a/service/appstream/deserializers.go b/service/appstream/deserializers.go index 7acab87af48..648f4807657 100644 --- a/service/appstream/deserializers.go +++ b/service/appstream/deserializers.go @@ -10383,6 +10383,32 @@ func awsAwsjson11_deserializeDocumentComputeCapacityStatus(v **types.ComputeCapa for key, value := range shape { switch key { + case "ActiveUserSessions": + 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.ActiveUserSessions = ptr.Int32(int32(i64)) + } + + case "ActualUserSessions": + 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.ActualUserSessions = ptr.Int32(int32(i64)) + } + case "Available": if value != nil { jtv, ok := value.(json.Number) @@ -10396,6 +10422,19 @@ func awsAwsjson11_deserializeDocumentComputeCapacityStatus(v **types.ComputeCapa sv.Available = ptr.Int32(int32(i64)) } + case "AvailableUserSessions": + 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.AvailableUserSessions = ptr.Int32(int32(i64)) + } + case "Desired": if value != nil { jtv, ok := value.(json.Number) @@ -10409,6 +10448,19 @@ func awsAwsjson11_deserializeDocumentComputeCapacityStatus(v **types.ComputeCapa sv.Desired = ptr.Int32(int32(i64)) } + case "DesiredUserSessions": + 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.DesiredUserSessions = ptr.Int32(int32(i64)) + } + case "InUse": if value != nil { jtv, ok := value.(json.Number) @@ -11341,6 +11393,19 @@ func awsAwsjson11_deserializeDocumentFleet(v **types.Fleet, value interface{}) e sv.MaxConcurrentSessions = ptr.Int32(int32(i64)) } + case "MaxSessionsPerInstance": + 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.MaxSessionsPerInstance = ptr.Int32(int32(i64)) + } + case "MaxUserDurationInSeconds": if value != nil { jtv, ok := value.(json.Number) @@ -13142,6 +13207,15 @@ func awsAwsjson11_deserializeDocumentSession(v **types.Session, value interface{ sv.Id = ptr.String(jtv) } + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + case "MaxExpirationTime": if value != nil { switch jtv := value.(type) { diff --git a/service/appstream/serializers.go b/service/appstream/serializers.go index cfdc6a9e9e0..0fe2b6911cd 100644 --- a/service/appstream/serializers.go +++ b/service/appstream/serializers.go @@ -4256,6 +4256,11 @@ func awsAwsjson11_serializeDocumentComputeCapacity(v *types.ComputeCapacity, val ok.Integer(*v.DesiredInstances) } + if v.DesiredSessions != nil { + ok := object.Key("DesiredSessions") + ok.Integer(*v.DesiredSessions) + } + return nil } @@ -5142,6 +5147,11 @@ func awsAwsjson11_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value ok.Integer(*v.MaxConcurrentSessions) } + if v.MaxSessionsPerInstance != nil { + ok := object.Key("MaxSessionsPerInstance") + ok.Integer(*v.MaxSessionsPerInstance) + } + if v.MaxUserDurationInSeconds != nil { ok := object.Key("MaxUserDurationInSeconds") ok.Integer(*v.MaxUserDurationInSeconds) @@ -5939,6 +5949,11 @@ func awsAwsjson11_serializeOpDocumentDescribeSessionsInput(v *DescribeSessionsIn ok.String(*v.FleetName) } + if v.InstanceId != nil { + ok := object.Key("InstanceId") + ok.String(*v.InstanceId) + } + if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) @@ -6625,6 +6640,11 @@ func awsAwsjson11_serializeOpDocumentUpdateFleetInput(v *UpdateFleetInput, value ok.Integer(*v.MaxConcurrentSessions) } + if v.MaxSessionsPerInstance != nil { + ok := object.Key("MaxSessionsPerInstance") + ok.Integer(*v.MaxSessionsPerInstance) + } + if v.MaxUserDurationInSeconds != nil { ok := object.Key("MaxUserDurationInSeconds") ok.Integer(*v.MaxUserDurationInSeconds) diff --git a/service/appstream/types/enums.go b/service/appstream/types/enums.go index f2b0585fd2c..d3f82721bc7 100644 --- a/service/appstream/types/enums.go +++ b/service/appstream/types/enums.go @@ -227,6 +227,7 @@ const ( FleetAttributeIamRoleArn FleetAttribute = "IAM_ROLE_ARN" FleetAttributeUsbDeviceFilterStrings FleetAttribute = "USB_DEVICE_FILTER_STRINGS" FleetAttributeSessionScriptS3Location FleetAttribute = "SESSION_SCRIPT_S3_LOCATION" + FleetAttributeMaxSessionsPerInstance FleetAttribute = "MAX_SESSIONS_PER_INSTANCE" ) // Values returns all known values for FleetAttribute. Note that this can be @@ -240,6 +241,7 @@ func (FleetAttribute) Values() []FleetAttribute { "IAM_ROLE_ARN", "USB_DEVICE_FILTER_STRINGS", "SESSION_SCRIPT_S3_LOCATION", + "MAX_SESSIONS_PER_INSTANCE", } } diff --git a/service/appstream/types/types.go b/service/appstream/types/types.go index 0f6d21d8c9a..681a9fba9d5 100644 --- a/service/appstream/types/types.go +++ b/service/appstream/types/types.go @@ -298,10 +298,14 @@ type CertificateBasedAuthProperties struct { type ComputeCapacity struct { // The desired number of streaming instances. - // - // This member is required. DesiredInstances *int32 + // The desired number of user sessions for a multi-session fleet. This is not + // allowed for single-session fleets. When you create a fleet, you must set either + // the DesiredSessions or DesiredInstances attribute, based on the type of fleet + // you create. You can’t define both attributes or leave both attributes blank. + DesiredSessions *int32 + noSmithyDocumentSerde } @@ -313,9 +317,30 @@ type ComputeCapacityStatus struct { // This member is required. Desired *int32 + // The number of user sessions currently being used for streaming sessions. This + // only applies to multi-session fleets. + ActiveUserSessions *int32 + + // The total number of session slots that are available for streaming or are + // currently streaming. ActualUserSessionCapacity = AvailableUserSessionCapacity + + // ActiveUserSessions This only applies to multi-session fleets. + ActualUserSessions *int32 + // The number of currently available instances that can be used to stream sessions. Available *int32 + // The number of idle session slots currently available for user sessions. + // AvailableUserSessionCapacity = ActualUserSessionCapacity - ActiveUserSessions + // This only applies to multi-session fleets. + AvailableUserSessions *int32 + + // The total number of sessions slots that are either running or pending. This + // represents the total number of concurrent streaming sessions your fleet can + // support in a steady state. DesiredUserSessionCapacity = + // ActualUserSessionCapacity + PendingUserSessionCapacity This only applies to + // multi-session fleets. + DesiredUserSessions *int32 + // The number of instances in use for streaming. InUse *int32 @@ -599,6 +624,10 @@ type Fleet struct { // The maximum number of concurrent sessions for the fleet. MaxConcurrentSessions *int32 + // The maximum number of user sessions on an instance. This only applies to + // multi-session fleets. + MaxSessionsPerInstance *int32 + // The maximum amount of time that a streaming session can remain active, in // seconds. If users are still connected to a streaming instance five minutes // before this limit is reached, they are prompted to save any open documents @@ -992,6 +1021,9 @@ type Session struct { // Specifies whether a user is connected to the streaming session. ConnectionState SessionConnectionState + // The identifier for the instance hosting the session. + InstanceId *string + // The time when the streaming session is set to expire. This time is based on the // MaxUserDurationinSeconds value, which determines the maximum length of time that // a streaming session can run. A streaming session might end earlier than the time diff --git a/service/appstream/validators.go b/service/appstream/validators.go index 48d4f36119d..5e872d556cb 100644 --- a/service/appstream/validators.go +++ b/service/appstream/validators.go @@ -1521,21 +1521,6 @@ func validateApplicationSettings(v *types.ApplicationSettings) error { } } -func validateComputeCapacity(v *types.ComputeCapacity) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ComputeCapacity"} - if v.DesiredInstances == nil { - invalidParams.Add(smithy.NewErrParamRequired("DesiredInstances")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateEntitlementAttribute(v *types.EntitlementAttribute) error { if v == nil { return nil @@ -2040,11 +2025,6 @@ func validateOpCreateFleetInput(v *CreateFleetInput) error { if v.InstanceType == nil { invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) } - if v.ComputeCapacity != nil { - if err := validateComputeCapacity(v.ComputeCapacity); err != nil { - invalidParams.AddNested("ComputeCapacity", err.(smithy.InvalidParamsError)) - } - } if v.SessionScriptS3Location != nil { if err := validateS3Location(v.SessionScriptS3Location); err != nil { invalidParams.AddNested("SessionScriptS3Location", err.(smithy.InvalidParamsError)) @@ -2827,11 +2807,6 @@ func validateOpUpdateFleetInput(v *UpdateFleetInput) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateFleetInput"} - if v.ComputeCapacity != nil { - if err := validateComputeCapacity(v.ComputeCapacity); err != nil { - invalidParams.AddNested("ComputeCapacity", err.(smithy.InvalidParamsError)) - } - } if v.SessionScriptS3Location != nil { if err := validateS3Location(v.SessionScriptS3Location); err != nil { invalidParams.AddNested("SessionScriptS3Location", err.(smithy.InvalidParamsError)) diff --git a/service/ec2/api_op_GetSecurityGroupsForVpc.go b/service/ec2/api_op_GetSecurityGroupsForVpc.go new file mode 100644 index 00000000000..8b05668d706 --- /dev/null +++ b/service/ec2/api_op_GetSecurityGroupsForVpc.go @@ -0,0 +1,386 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets security groups that can be associated by the Amazon Web Services account +// making the request with network interfaces in the specified VPC. +func (c *Client) GetSecurityGroupsForVpc(ctx context.Context, params *GetSecurityGroupsForVpcInput, optFns ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) { + if params == nil { + params = &GetSecurityGroupsForVpcInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSecurityGroupsForVpc", params, optFns, c.addOperationGetSecurityGroupsForVpcMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSecurityGroupsForVpcOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSecurityGroupsForVpcInput struct { + + // The VPC ID where the security group can be used. + // + // This member is required. + VpcId *string + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have the + // required permissions, the error response is DryRunOperation . Otherwise, it is + // UnauthorizedOperation . + DryRun *bool + + // The filters. If using multiple filters, the results include security groups + // which match all filters. + // - group-id : The security group ID. + // - description : The security group's description. + // - group-name : The security group name. + // - owner-id : The security group owner ID. + // - primary-vpc-id : The VPC ID in which the security group was created. + Filters []types.Filter + + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) + // . + MaxResults *int32 + + // The token returned from a previous paginated request. Pagination continues from + // the end of the items returned by the previous request. + NextToken *string + + noSmithyDocumentSerde +} + +type GetSecurityGroupsForVpcOutput struct { + + // The token to include in another request to get the next page of items. This + // value is null when there are no more items to return. + NextToken *string + + // The security group that can be used by interfaces in the VPC. + SecurityGroupForVpcs []types.SecurityGroupForVpc + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSecurityGroupsForVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpGetSecurityGroupsForVpc{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSecurityGroupsForVpc{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetSecurityGroupsForVpcResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetSecurityGroupsForVpcValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSecurityGroupsForVpc(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// GetSecurityGroupsForVpcAPIClient is a client that implements the +// GetSecurityGroupsForVpc operation. +type GetSecurityGroupsForVpcAPIClient interface { + GetSecurityGroupsForVpc(context.Context, *GetSecurityGroupsForVpcInput, ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) +} + +var _ GetSecurityGroupsForVpcAPIClient = (*Client)(nil) + +// GetSecurityGroupsForVpcPaginatorOptions is the paginator options for +// GetSecurityGroupsForVpc +type GetSecurityGroupsForVpcPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) + // . + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetSecurityGroupsForVpcPaginator is a paginator for GetSecurityGroupsForVpc +type GetSecurityGroupsForVpcPaginator struct { + options GetSecurityGroupsForVpcPaginatorOptions + client GetSecurityGroupsForVpcAPIClient + params *GetSecurityGroupsForVpcInput + nextToken *string + firstPage bool +} + +// NewGetSecurityGroupsForVpcPaginator returns a new +// GetSecurityGroupsForVpcPaginator +func NewGetSecurityGroupsForVpcPaginator(client GetSecurityGroupsForVpcAPIClient, params *GetSecurityGroupsForVpcInput, optFns ...func(*GetSecurityGroupsForVpcPaginatorOptions)) *GetSecurityGroupsForVpcPaginator { + if params == nil { + params = &GetSecurityGroupsForVpcInput{} + } + + options := GetSecurityGroupsForVpcPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetSecurityGroupsForVpcPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetSecurityGroupsForVpcPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetSecurityGroupsForVpc page. +func (p *GetSecurityGroupsForVpcPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.GetSecurityGroupsForVpc(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 +} + +func newServiceMetadataMiddleware_opGetSecurityGroupsForVpc(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ec2", + OperationName: "GetSecurityGroupsForVpc", + } +} + +type opGetSecurityGroupsForVpcResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetSecurityGroupsForVpcResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetSecurityGroupsForVpcResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "ec2" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "ec2" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("ec2") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetSecurityGroupsForVpcResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetSecurityGroupsForVpcResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index 5eb6781bbd2..e0adc37ec8a 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -39714,6 +39714,97 @@ func awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response *s } } +type awsEc2query_deserializeOpGetSecurityGroupsForVpc struct { +} + +func (*awsEc2query_deserializeOpGetSecurityGroupsForVpc) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpGetSecurityGroupsForVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(response, &metadata) + } + output := &GetSecurityGroupsForVpcOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentGetSecurityGroupsForVpcOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(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 + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpGetSerialConsoleAccessStatus struct { } @@ -110534,6 +110625,181 @@ func awsEc2query_deserializeDocumentSecurityGroup(v **types.SecurityGroup, decod return nil } +func awsEc2query_deserializeDocumentSecurityGroupForVpc(v **types.SecurityGroupForVpc, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.SecurityGroupForVpc + if *v == nil { + sv = &types.SecurityGroupForVpc{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("description", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Description = ptr.String(xtv) + } + + case strings.EqualFold("groupId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupId = ptr.String(xtv) + } + + case strings.EqualFold("groupName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.GroupName = ptr.String(xtv) + } + + case strings.EqualFold("ownerId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.OwnerId = ptr.String(xtv) + } + + case strings.EqualFold("primaryVpcId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PrimaryVpcId = ptr.String(xtv) + } + + case strings.EqualFold("tagSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSecurityGroupForVpcList(v *[]types.SecurityGroupForVpc, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.SecurityGroupForVpc + if *v == nil { + sv = make([]types.SecurityGroupForVpc, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.SecurityGroupForVpc + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentSecurityGroupForVpc(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentSecurityGroupForVpcListUnwrapped(v *[]types.SecurityGroupForVpc, decoder smithyxml.NodeDecoder) error { + var sv []types.SecurityGroupForVpc + if *v == nil { + sv = make([]types.SecurityGroupForVpc, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.SecurityGroupForVpc + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentSecurityGroupForVpc(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentSecurityGroupIdentifier(v **types.SecurityGroupIdentifier, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -156158,6 +156424,61 @@ func awsEc2query_deserializeOpDocumentGetReservedInstancesExchangeQuoteOutput(v return nil } +func awsEc2query_deserializeOpDocumentGetSecurityGroupsForVpcOutput(v **GetSecurityGroupsForVpcOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetSecurityGroupsForVpcOutput + if *v == nil { + sv = &GetSecurityGroupsForVpcOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("nextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("securityGroupForVpcSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentSecurityGroupForVpcList(&sv.SecurityGroupForVpcs, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentGetSerialConsoleAccessStatusOutput(v **GetSerialConsoleAccessStatusOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ec2/generated.json b/service/ec2/generated.json index 2b8971d4634..6299715bce7 100644 --- a/service/ec2/generated.json +++ b/service/ec2/generated.json @@ -457,6 +457,7 @@ "api_op_GetNetworkInsightsAccessScopeContent.go", "api_op_GetPasswordData.go", "api_op_GetReservedInstancesExchangeQuote.go", + "api_op_GetSecurityGroupsForVpc.go", "api_op_GetSerialConsoleAccessStatus.go", "api_op_GetSpotPlacementScores.go", "api_op_GetSubnetCidrReservations.go", diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index 367c059d35d..c0fa4ea2abb 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -28497,6 +28497,70 @@ func (m *awsEc2query_serializeOpGetReservedInstancesExchangeQuote) HandleSeriali return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpGetSecurityGroupsForVpc struct { +} + +func (*awsEc2query_serializeOpGetSecurityGroupsForVpc) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpGetSecurityGroupsForVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetSecurityGroupsForVpcInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("GetSecurityGroupsForVpc") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentGetSecurityGroupsForVpcInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpGetSerialConsoleAccessStatus struct { } @@ -60964,6 +61028,40 @@ func awsEc2query_serializeOpDocumentGetReservedInstancesExchangeQuoteInput(v *Ge return nil } +func awsEc2query_serializeOpDocumentGetSecurityGroupsForVpcInput(v *GetSecurityGroupsForVpcInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.Filters != nil { + objectKey := object.FlatKey("Filter") + if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { + return err + } + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + if v.VpcId != nil { + objectKey := object.Key("VpcId") + objectKey.String(*v.VpcId) + } + + return nil +} + func awsEc2query_serializeOpDocumentGetSerialConsoleAccessStatusInput(v *GetSerialConsoleAccessStatusInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index dfaf841d160..c1179e40cd9 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -13047,6 +13047,30 @@ type SecurityGroup struct { noSmithyDocumentSerde } +// A security group that can be used by interfaces in the VPC. +type SecurityGroupForVpc struct { + + // The security group's description. + Description *string + + // The security group ID. + GroupId *string + + // The security group name. + GroupName *string + + // The security group owner ID. + OwnerId *string + + // The VPC ID in which the security group was created. + PrimaryVpcId *string + + // The security group tags. + Tags []Tag + + noSmithyDocumentSerde +} + // Describes a security group. type SecurityGroupIdentifier struct { diff --git a/service/ec2/validators.go b/service/ec2/validators.go index e243948a768..0599a18a0c7 100644 --- a/service/ec2/validators.go +++ b/service/ec2/validators.go @@ -5650,6 +5650,26 @@ func (m *validateOpGetReservedInstancesExchangeQuote) HandleInitialize(ctx conte return next.HandleInitialize(ctx, in) } +type validateOpGetSecurityGroupsForVpc struct { +} + +func (*validateOpGetSecurityGroupsForVpc) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSecurityGroupsForVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSecurityGroupsForVpcInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSecurityGroupsForVpcInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSpotPlacementScores struct { } @@ -9598,6 +9618,10 @@ func addOpGetReservedInstancesExchangeQuoteValidationMiddleware(stack *middlewar return stack.Initialize.Add(&validateOpGetReservedInstancesExchangeQuote{}, middleware.After) } +func addOpGetSecurityGroupsForVpcValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSecurityGroupsForVpc{}, middleware.After) +} + func addOpGetSpotPlacementScoresValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSpotPlacementScores{}, middleware.After) } @@ -15758,6 +15782,21 @@ func validateOpGetReservedInstancesExchangeQuoteInput(v *GetReservedInstancesExc } } +func validateOpGetSecurityGroupsForVpcInput(v *GetSecurityGroupsForVpcInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSecurityGroupsForVpcInput"} + if v.VpcId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSpotPlacementScoresInput(v *GetSpotPlacementScoresInput) error { if v == nil { return nil diff --git a/service/mediapackage/internal/endpoints/endpoints.go b/service/mediapackage/internal/endpoints/endpoints.go index 3f664c3e224..5f638d32b73 100644 --- a/service/mediapackage/internal/endpoints/endpoints.go +++ b/service/mediapackage/internal/endpoints/endpoints.go @@ -145,6 +145,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, diff --git a/service/mediapackagev2/internal/endpoints/endpoints.go b/service/mediapackagev2/internal/endpoints/endpoints.go index 7a7985024ed..f0d7ac60ea6 100644 --- a/service/mediapackagev2/internal/endpoints/endpoints.go +++ b/service/mediapackagev2/internal/endpoints/endpoints.go @@ -145,6 +145,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, diff --git a/service/mediapackagevod/internal/endpoints/endpoints.go b/service/mediapackagevod/internal/endpoints/endpoints.go index 3c76ac9c6e0..83a1beaf7c2 100644 --- a/service/mediapackagevod/internal/endpoints/endpoints.go +++ b/service/mediapackagevod/internal/endpoints/endpoints.go @@ -145,6 +145,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, diff --git a/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go b/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go index 1380bb229bc..862ee72a819 100644 --- a/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go +++ b/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go @@ -17,17 +17,17 @@ import ( ) // Creates an Network Firewall TLS inspection configuration. A TLS inspection -// configuration contains the Certificate Manager certificate references that -// Network Firewall uses to decrypt and re-encrypt inbound traffic. After you -// create a TLS inspection configuration, you associate it with a new firewall -// policy. To update the settings for a TLS inspection configuration, use -// UpdateTLSInspectionConfiguration . To manage a TLS inspection configuration's -// tags, use the standard Amazon Web Services resource tagging operations, -// ListTagsForResource , TagResource , and UntagResource . To retrieve information -// about TLS inspection configurations, use ListTLSInspectionConfigurations and -// DescribeTLSInspectionConfiguration . For more information about TLS inspection -// configurations, see Decrypting SSL/TLS traffic with TLS inspection -// configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) +// configuration contains the Certificate Manager certificate associations that +// Network Firewall uses to decrypt and re-encrypt traffic traveling through your +// firewall. After you create a TLS inspection configuration, you can associate it +// with a new firewall policy. To update the settings for a TLS inspection +// configuration, use UpdateTLSInspectionConfiguration . To manage a TLS inspection +// configuration's tags, use the standard Amazon Web Services resource tagging +// operations, ListTagsForResource , TagResource , and UntagResource . To retrieve +// information about TLS inspection configurations, use +// ListTLSInspectionConfigurations and DescribeTLSInspectionConfiguration . For +// more information about TLS inspection configurations, see Inspecting SSL/TLS +// traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. func (c *Client) CreateTLSInspectionConfiguration(ctx context.Context, params *CreateTLSInspectionConfigurationInput, optFns ...func(*Options)) (*CreateTLSInspectionConfigurationOutput, error) { if params == nil { @@ -54,10 +54,11 @@ type CreateTLSInspectionConfigurationInput struct { // before sending it to its destination. To use a TLS inspection configuration, you // add it to a new Network Firewall firewall policy, then you apply the firewall // policy to a firewall. Network Firewall acts as a proxy service to decrypt and - // inspect inbound traffic. You can reference a TLS inspection configuration from - // more than one firewall policy, and you can use a firewall policy in more than - // one firewall. For more information about using TLS inspection configurations, - // see Decrypting SSL/TLS traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) + // inspect the traffic traveling through your firewalls. You can reference a TLS + // inspection configuration from more than one firewall policy, and you can use a + // firewall policy in more than one firewall. For more information about using TLS + // inspection configurations, see Inspecting SSL/TLS traffic with TLS inspection + // configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. // // This member is required. diff --git a/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go b/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go index 968bd21a2ca..ab175cfd5b8 100644 --- a/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go +++ b/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go @@ -78,10 +78,11 @@ type DescribeTLSInspectionConfigurationOutput struct { // before sending it to its destination. To use a TLS inspection configuration, you // add it to a new Network Firewall firewall policy, then you apply the firewall // policy to a firewall. Network Firewall acts as a proxy service to decrypt and - // inspect inbound traffic. You can reference a TLS inspection configuration from - // more than one firewall policy, and you can use a firewall policy in more than - // one firewall. For more information about using TLS inspection configurations, - // see Decrypting SSL/TLS traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) + // inspect the traffic traveling through your firewalls. You can reference a TLS + // inspection configuration from more than one firewall policy, and you can use a + // firewall policy in more than one firewall. For more information about using TLS + // inspection configurations, see Inspecting SSL/TLS traffic with TLS inspection + // configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. TLSInspectionConfiguration *types.TLSInspectionConfiguration diff --git a/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go b/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go index 22e274043c5..537bed668fa 100644 --- a/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go +++ b/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go @@ -17,10 +17,10 @@ import ( ) // Updates the TLS inspection configuration settings for the specified TLS -// inspection configuration. You use a TLS inspection configuration by reference in -// one or more firewall policies. When you modify a TLS inspection configuration, -// you modify all firewall policies that use the TLS inspection configuration. To -// update a TLS inspection configuration, first call +// inspection configuration. You use a TLS inspection configuration by referencing +// it in one or more firewall policies. When you modify a TLS inspection +// configuration, you modify all firewall policies that use the TLS inspection +// configuration. To update a TLS inspection configuration, first call // DescribeTLSInspectionConfiguration to retrieve the current // TLSInspectionConfiguration object, update the object as needed, and then provide // the updated object to this call. @@ -49,10 +49,11 @@ type UpdateTLSInspectionConfigurationInput struct { // before sending it to its destination. To use a TLS inspection configuration, you // add it to a new Network Firewall firewall policy, then you apply the firewall // policy to a firewall. Network Firewall acts as a proxy service to decrypt and - // inspect inbound traffic. You can reference a TLS inspection configuration from - // more than one firewall policy, and you can use a firewall policy in more than - // one firewall. For more information about using TLS inspection configurations, - // see Decrypting SSL/TLS traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) + // inspect the traffic traveling through your firewalls. You can reference a TLS + // inspection configuration from more than one firewall policy, and you can use a + // firewall policy in more than one firewall. For more information about using TLS + // inspection configurations, see Inspecting SSL/TLS traffic with TLS inspection + // configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. // // This member is required. diff --git a/service/networkfirewall/deserializers.go b/service/networkfirewall/deserializers.go index e5d5b4f9d40..e0ceb2c9baf 100644 --- a/service/networkfirewall/deserializers.go +++ b/service/networkfirewall/deserializers.go @@ -5099,6 +5099,55 @@ func awsAwsjson10_deserializeDocumentCertificates(v *[]types.TlsCertificateData, return nil } +func awsAwsjson10_deserializeDocumentCheckCertificateRevocationStatusActions(v **types.CheckCertificateRevocationStatusActions, 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.CheckCertificateRevocationStatusActions + if *v == nil { + sv = &types.CheckCertificateRevocationStatusActions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RevokedStatusAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RevocationCheckAction to be of type string, got %T instead", value) + } + sv.RevokedStatusAction = types.RevocationCheckAction(jtv) + } + + case "UnknownStatusAction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RevocationCheckAction to be of type string, got %T instead", value) + } + sv.UnknownStatusAction = types.RevocationCheckAction(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentCIDRSummary(v **types.CIDRSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7924,6 +7973,20 @@ func awsAwsjson10_deserializeDocumentServerCertificateConfiguration(v **types.Se for key, value := range shape { switch key { + case "CertificateAuthorityArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.CertificateAuthorityArn = ptr.String(jtv) + } + + case "CheckCertificateRevocationStatus": + if err := awsAwsjson10_deserializeDocumentCheckCertificateRevocationStatusActions(&sv.CheckCertificateRevocationStatus, value); err != nil { + return err + } + case "Scopes": if err := awsAwsjson10_deserializeDocumentServerCertificateScopes(&sv.Scopes, value); err != nil { return err @@ -9376,6 +9439,11 @@ func awsAwsjson10_deserializeDocumentTLSInspectionConfigurationResponse(v **type for key, value := range shape { switch key { + case "CertificateAuthority": + if err := awsAwsjson10_deserializeDocumentTlsCertificateData(&sv.CertificateAuthority, value); err != nil { + return err + } + case "Certificates": if err := awsAwsjson10_deserializeDocumentCertificates(&sv.Certificates, value); err != nil { return err diff --git a/service/networkfirewall/serializers.go b/service/networkfirewall/serializers.go index 370194f49ee..2c6a0e2f0ed 100644 --- a/service/networkfirewall/serializers.go +++ b/service/networkfirewall/serializers.go @@ -2044,6 +2044,23 @@ func awsAwsjson10_serializeDocumentAzSubnets(v []string, value smithyjson.Value) return nil } +func awsAwsjson10_serializeDocumentCheckCertificateRevocationStatusActions(v *types.CheckCertificateRevocationStatusActions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.RevokedStatusAction) > 0 { + ok := object.Key("RevokedStatusAction") + ok.String(string(v.RevokedStatusAction)) + } + + if len(v.UnknownStatusAction) > 0 { + ok := object.Key("UnknownStatusAction") + ok.String(string(v.UnknownStatusAction)) + } + + return nil +} + func awsAwsjson10_serializeDocumentCustomAction(v *types.CustomAction, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2705,6 +2722,18 @@ func awsAwsjson10_serializeDocumentServerCertificateConfiguration(v *types.Serve object := value.Object() defer object.Close() + if v.CertificateAuthorityArn != nil { + ok := object.Key("CertificateAuthorityArn") + ok.String(*v.CertificateAuthorityArn) + } + + if v.CheckCertificateRevocationStatus != nil { + ok := object.Key("CheckCertificateRevocationStatus") + if err := awsAwsjson10_serializeDocumentCheckCertificateRevocationStatusActions(v.CheckCertificateRevocationStatus, ok); err != nil { + return err + } + } + if v.Scopes != nil { ok := object.Key("Scopes") if err := awsAwsjson10_serializeDocumentServerCertificateScopes(v.Scopes, ok); err != nil { diff --git a/service/networkfirewall/types/enums.go b/service/networkfirewall/types/enums.go index 5e40a682b96..aedeb649d38 100644 --- a/service/networkfirewall/types/enums.go +++ b/service/networkfirewall/types/enums.go @@ -240,6 +240,7 @@ type ResourceStatus string const ( ResourceStatusActive ResourceStatus = "ACTIVE" ResourceStatusDeleting ResourceStatus = "DELETING" + ResourceStatusError ResourceStatus = "ERROR" ) // Values returns all known values for ResourceStatus. Note that this can be @@ -249,6 +250,27 @@ func (ResourceStatus) Values() []ResourceStatus { return []ResourceStatus{ "ACTIVE", "DELETING", + "ERROR", + } +} + +type RevocationCheckAction string + +// Enum values for RevocationCheckAction +const ( + RevocationCheckActionPass RevocationCheckAction = "PASS" + RevocationCheckActionDrop RevocationCheckAction = "DROP" + RevocationCheckActionReject RevocationCheckAction = "REJECT" +) + +// Values returns all known values for RevocationCheckAction. 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 (RevocationCheckAction) Values() []RevocationCheckAction { + return []RevocationCheckAction{ + "PASS", + "DROP", + "REJECT", } } diff --git a/service/networkfirewall/types/errors.go b/service/networkfirewall/types/errors.go index fe09e5e6098..ba9c0daf284 100644 --- a/service/networkfirewall/types/errors.go +++ b/service/networkfirewall/types/errors.go @@ -34,7 +34,7 @@ func (e *InsufficientCapacityException) ErrorCode() string { } func (e *InsufficientCapacityException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// Your request is valid, but Network Firewall couldn’t perform the operation +// Your request is valid, but Network Firewall couldn't perform the operation // because of a system problem. Retry your request. type InternalServerError struct { Message *string diff --git a/service/networkfirewall/types/types.go b/service/networkfirewall/types/types.go index 374f0f53952..aded3f5d0e7 100644 --- a/service/networkfirewall/types/types.go +++ b/service/networkfirewall/types/types.go @@ -96,6 +96,39 @@ type CapacityUsageSummary struct { noSmithyDocumentSerde } +// Defines the actions to take on the SSL/TLS connection if the certificate +// presented by the server in the connection has a revoked or unknown status. +type CheckCertificateRevocationStatusActions struct { + + // Configures how Network Firewall processes traffic when it determines that the + // certificate presented by the server in the SSL/TLS connection has a revoked + // status. + // - PASS - Allow the connection to continue, and pass subsequent packets to the + // stateful engine for inspection. + // - DROP - Network Firewall fails closed and drops all subsequent traffic. + // - REJECT - Network Firewall sends a TCP reject packet back to your client so + // that the client can immediately establish a new session. Network Firewall then + // fails closed and drops all subsequent traffic. REJECT is available only for + // TCP traffic. + RevokedStatusAction RevocationCheckAction + + // Configures how Network Firewall processes traffic when it determines that the + // certificate presented by the server in the SSL/TLS connection has an unknown + // status, or a status that cannot be determined for any other reason, including + // when the service is unable to connect to the OCSP and CRL endpoints for the + // certificate. + // - PASS - Allow the connection to continue, and pass subsequent packets to the + // stateful engine for inspection. + // - DROP - Network Firewall fails closed and drops all subsequent traffic. + // - REJECT - Network Firewall sends a TCP reject packet back to your client so + // that the client can immediately establish a new session. Network Firewall then + // fails closed and drops all subsequent traffic. REJECT is available only for + // TCP traffic. + UnknownStatusAction RevocationCheckAction + + noSmithyDocumentSerde +} + // Summarizes the CIDR blocks used by the IP set references in a firewall. Network // Firewall calculates the number of CIDRs by taking an aggregated count of all // CIDRs used by the IP sets you are referencing. @@ -1017,11 +1050,12 @@ type RuleVariables struct { noSmithyDocumentSerde } -// Any Certificate Manager Secure Sockets Layer/Transport Layer Security (SSL/TLS) -// server certificate that's associated with a ServerCertificateConfiguration used -// in a TLSInspectionConfiguration . You must request or import a SSL/TLS -// certificate into ACM for each domain Network Firewall needs to decrypt and -// inspect. Network Firewall uses the SSL/TLS certificates to decrypt specified +// Any Certificate Manager (ACM) Secure Sockets Layer/Transport Layer Security +// (SSL/TLS) server certificate that's associated with a +// ServerCertificateConfiguration . Used in a TLSInspectionConfiguration for +// inspection of inbound traffic to your firewall. You must request or import a +// SSL/TLS certificate into ACM for each domain Network Firewall needs to decrypt +// and inspect. Network Firewall uses the SSL/TLS certificates to decrypt specified // inbound SSL/TLS traffic going to your firewall. For information about working // with certificates in Certificate Manager, see Request a public certificate (https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html) // or Importing certificates (https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) @@ -1029,27 +1063,50 @@ type RuleVariables struct { type ServerCertificate struct { // The Amazon Resource Name (ARN) of the Certificate Manager SSL/TLS server - // certificate. + // certificate that's used for inbound SSL/TLS inspection. ResourceArn *string noSmithyDocumentSerde } -// Configures the associated Certificate Manager Secure Sockets Layer/Transport -// Layer Security (SSL/TLS) server certificates and scope settings Network Firewall -// uses to decrypt traffic in a TLSInspectionConfiguration . For information about -// working with SSL/TLS certificates for TLS inspection, see Requirements for -// using SSL/TLS server certficiates with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection-certificate-requirements.html) +// Configures the Certificate Manager certificates and scope that Network Firewall +// uses to decrypt and re-encrypt traffic using a TLSInspectionConfiguration . You +// can configure ServerCertificates for inbound SSL/TLS inspection, a +// CertificateAuthorityArn for outbound SSL/TLS inspection, or both. For +// information about working with certificates for TLS inspection, see +// Requirements for using SSL/TLS server certficiates with TLS inspection +// configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection-certificate-requirements.html) // in the Network Firewall Developer Guide. If a server certificate that's // associated with your TLSInspectionConfiguration is revoked, deleted, or expired // it can result in client-side TLS errors. type ServerCertificateConfiguration struct { - // A list of a server certificate configuration's scopes. + // The Amazon Resource Name (ARN) of the imported certificate authority (CA) + // certificate configured in Certificate Manager (ACM) to use for outbound SSL/TLS + // inspection. The following limitations apply: + // - You can use CA certificates that you imported into ACM, but you can't + // generate CA certificates with ACM. + // - You can't use certificates issued by Private Certificate Authority. + // For more information about the certificate requirements for outbound + // inspection, see Requirements for using SSL/TLS certificates with TLS inspection + // configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection-certificate-requirements.html) + // in the Network Firewall Developer Guide. For information about working with + // certificates in ACM, see Importing certificates (https://docs.aws.amazon.com/acm/latest/userguide/import-certificate.html) + // in the Certificate Manager User Guide. + CertificateAuthorityArn *string + + // When enabled, Network Firewall checks if the server certificate presented by + // the server in the SSL/TLS connection has a revoked or unkown status. If the + // certificate has an unknown or revoked status, you must specify the actions that + // Network Firewall takes on outbound traffic. To use this option, you must specify + // a CertificateAuthorityArn in ServerCertificateConfiguration . + CheckCertificateRevocationStatus *CheckCertificateRevocationStatusActions + + // A list of scopes. Scopes []ServerCertificateScope - // The list of a server certificate configuration's Certificate Manager SSL/TLS - // certificates. + // The list of a server certificate configuration's Certificate Manager + // certificates, used for inbound SSL/TLS inspection. ServerCertificates []ServerCertificate noSmithyDocumentSerde @@ -1417,10 +1474,11 @@ type TlsCertificateData struct { // before sending it to its destination. To use a TLS inspection configuration, you // add it to a new Network Firewall firewall policy, then you apply the firewall // policy to a firewall. Network Firewall acts as a proxy service to decrypt and -// inspect inbound traffic. You can reference a TLS inspection configuration from -// more than one firewall policy, and you can use a firewall policy in more than -// one firewall. For more information about using TLS inspection configurations, -// see Decrypting SSL/TLS traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) +// inspect the traffic traveling through your firewalls. You can reference a TLS +// inspection configuration from more than one firewall policy, and you can use a +// firewall policy in more than one firewall. For more information about using TLS +// inspection configurations, see Inspecting SSL/TLS traffic with TLS inspection +// configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. type TLSInspectionConfiguration struct { @@ -1470,6 +1528,9 @@ type TLSInspectionConfigurationResponse struct { // This member is required. TLSInspectionConfigurationName *string + // Contains metadata about an Certificate Manager certificate. + CertificateAuthority *TlsCertificateData + // A list of the certificates associated with the TLS inspection configuration. Certificates []TlsCertificateData diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go index 6aed148abe8..012581330e3 100644 --- a/service/opensearch/api_op_CreateDomain.go +++ b/service/opensearch/api_op_CreateDomain.go @@ -101,6 +101,9 @@ type CreateDomainInput struct { // . EngineVersion *string + // The type of IP addresses supported by the endpoint for the domain. + IPAddressType types.IPAddressType + // Key-value pairs to configure log publishing. LogPublishingOptions map[string]types.LogPublishingOption diff --git a/service/opensearch/api_op_GetDomainMaintenanceStatus.go b/service/opensearch/api_op_GetDomainMaintenanceStatus.go index 828f45fe207..e698bf82cd4 100644 --- a/service/opensearch/api_op_GetDomainMaintenanceStatus.go +++ b/service/opensearch/api_op_GetDomainMaintenanceStatus.go @@ -17,7 +17,7 @@ import ( "time" ) -// Get the status of the maintenance action. +// The status of the maintenance action. func (c *Client) GetDomainMaintenanceStatus(ctx context.Context, params *GetDomainMaintenanceStatusInput, optFns ...func(*Options)) (*GetDomainMaintenanceStatusOutput, error) { if params == nil { params = &GetDomainMaintenanceStatusInput{} @@ -41,7 +41,7 @@ type GetDomainMaintenanceStatusInput struct { // This member is required. DomainName *string - // The request id of the maintenance action. + // The request ID of the maintenance action. // // This member is required. MaintenanceId *string @@ -49,26 +49,26 @@ type GetDomainMaintenanceStatusInput struct { noSmithyDocumentSerde } -// The result of a GetDomainMaintenanceStatus request. Contains information about -// the requested action. +// The result of a GetDomainMaintenanceStatus request that information about the +// requested action. type GetDomainMaintenanceStatusOutput struct { - // Contains action name. + // The action name. Action types.MaintenanceType - // Contains time at which action created. + // The time at which the action was created. CreatedAt *time.Time - // Contains node id of maintenance action. + // The node ID of the maintenance action. NodeId *string - // Contains status of the maintenance action. + // The status of the maintenance action. Status types.MaintenanceStatus - // Contains status message of the maintenance action. + // The status message of the maintenance action. StatusMessage *string - // Contains time at which action updated. + // The time at which the action was updated. UpdatedAt *time.Time // Metadata pertaining to the operation's result. diff --git a/service/opensearch/api_op_ListDomainMaintenances.go b/service/opensearch/api_op_ListDomainMaintenances.go index c96074fde20..c798e859b4c 100644 --- a/service/opensearch/api_op_ListDomainMaintenances.go +++ b/service/opensearch/api_op_ListDomainMaintenances.go @@ -16,7 +16,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Get the list of the maintenance action. +// A list of maintenance actions for the domain. func (c *Client) ListDomainMaintenances(ctx context.Context, params *ListDomainMaintenancesInput, optFns ...func(*Options)) (*ListDomainMaintenancesOutput, error) { if params == nil { params = &ListDomainMaintenancesInput{} @@ -47,9 +47,9 @@ type ListDomainMaintenancesInput struct { // You can use nextToken to get the next page of results. MaxResults int32 - // If your initial ListDomainMaintenances operation returns a nextToken , you can - // include the returned nextToken in subsequent ListDomainMaintenances operations, - // which returns results in the next page. + // If your initial ListDomainMaintenances operation returns a nextToken , include + // the returned nextToken in subsequent ListDomainMaintenances operations, which + // returns results in the next page. NextToken *string // The status of the action. @@ -58,11 +58,11 @@ type ListDomainMaintenancesInput struct { noSmithyDocumentSerde } -// The result of a ListDomainMaintenances request. Contains information about the -// requested actions. +// The result of a ListDomainMaintenances request that contains information about +// the requested actions. type ListDomainMaintenancesOutput struct { - // List of the submitted maintenance actions. + // A list of the submitted maintenance actions. DomainMaintenances []types.DomainMaintenanceDetails // When nextToken is returned, there are more results available. The value of diff --git a/service/opensearch/api_op_StartDomainMaintenance.go b/service/opensearch/api_op_StartDomainMaintenance.go index 6461d0b8831..170786f6aec 100644 --- a/service/opensearch/api_op_StartDomainMaintenance.go +++ b/service/opensearch/api_op_StartDomainMaintenance.go @@ -16,9 +16,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Starts the node maintenance (Node restart, Node reboot, -// Opensearch/Elasticsearch process restart, Dashboard/kibana restart) on the data -// node. +// Starts the node maintenance process on the data node. These processes can +// include a node reboot, an Opensearch or Elasticsearch process restart, or a +// Dashboard or Kibana restart. func (c *Client) StartDomainMaintenance(ctx context.Context, params *StartDomainMaintenanceInput, optFns ...func(*Options)) (*StartDomainMaintenanceOutput, error) { if params == nil { params = &StartDomainMaintenanceInput{} @@ -47,17 +47,17 @@ type StartDomainMaintenanceInput struct { // This member is required. DomainName *string - // Id of the data node. + // The ID of the data node. NodeId *string noSmithyDocumentSerde } -// The result of a StartDomainMaintenance request. Contains information about the +// The result of a StartDomainMaintenance request that information about the // requested action. type StartDomainMaintenanceOutput struct { - // Contains request id of requested action. + // The request ID of requested action. MaintenanceId *string // Metadata pertaining to the operation's result. diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index badba45b24c..f3eb03c4c78 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -99,6 +99,9 @@ type UpdateDomainConfigInput struct { // Encryption at rest options for the domain. EncryptionAtRestOptions *types.EncryptionAtRestOptions + // The type of IP addresses supported by the endpoint for the domain. + IPAddressType types.IPAddressType + // Options to publish OpenSearch logs to Amazon CloudWatch Logs. LogPublishingOptions map[string]types.LogPublishingOption diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index 87774d627b8..6cdb584db45 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -11889,6 +11889,11 @@ func awsRestjson1_deserializeDocumentDomainConfig(v **types.DomainConfig, value return err } + case "IPAddressType": + if err := awsRestjson1_deserializeDocumentIPAddressTypeStatus(&sv.IPAddressType, value); err != nil { + return err + } + case "LogPublishingOptions": if err := awsRestjson1_deserializeDocumentLogPublishingOptionsStatus(&sv.LogPublishingOptions, value); err != nil { return err @@ -12736,6 +12741,15 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value return err } + case "EndpointV2": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceUrl to be of type string, got %T instead", value) + } + sv.EndpointV2 = ptr.String(jtv) + } + case "EngineVersion": if value != nil { jtv, ok := value.(string) @@ -12745,6 +12759,15 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value sv.EngineVersion = ptr.String(jtv) } + case "IPAddressType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddressType to be of type string, got %T instead", value) + } + sv.IPAddressType = types.IPAddressType(jtv) + } + case "LogPublishingOptions": if err := awsRestjson1_deserializeDocumentLogPublishingOptions(&sv.LogPublishingOptions, value); err != nil { return err @@ -13914,6 +13937,51 @@ func awsRestjson1_deserializeDocumentInvalidTypeException(v **types.InvalidTypeE return nil } +func awsRestjson1_deserializeDocumentIPAddressTypeStatus(v **types.IPAddressTypeStatus, 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.IPAddressTypeStatus + if *v == nil { + sv = &types.IPAddressTypeStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddressType to be of type string, got %T instead", value) + } + sv.Options = types.IPAddressType(jtv) + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentIssues(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/endpoints.go b/service/opensearch/endpoints.go index 70a78d4a8de..5c11f8f0466 100644 --- a/service/opensearch/endpoints.go +++ b/service/opensearch/endpoints.go @@ -434,6 +434,63 @@ func (r *resolver) ResolveEndpoint( } if _UseDualStack == true { if true == _PartitionResult.SupportsDualStack { + if "aws" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://aos.") + out.WriteString(_Region) + out.WriteString(".api.aws") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if "aws-cn" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://aos.") + out.WriteString(_Region) + out.WriteString(".api.amazonwebservices.com.cn") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if "aws-us-gov" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://aos.") + out.WriteString(_Region) + out.WriteString(".api.aws") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } uriString := func() string { var out strings.Builder out.WriteString("https://es.") diff --git a/service/opensearch/endpoints_test.go b/service/opensearch/endpoints_test.go index 4b3f235d456..096bf5f9a25 100644 --- a/service/opensearch/endpoints_test.go +++ b/service/opensearch/endpoints_test.go @@ -1083,7 +1083,7 @@ func TestEndpointCase27(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://es.us-east-1.api.aws") + uri, _ := url.Parse("https://aos.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1278,7 +1278,7 @@ func TestEndpointCase32(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://es.cn-north-1.api.amazonwebservices.com.cn") + uri, _ := url.Parse("https://aos.cn-north-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1512,7 +1512,7 @@ func TestEndpointCase38(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://es.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://aos.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index 23c1cae902c..1347e5d3e43 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -537,6 +537,11 @@ func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val ok.String(*v.EngineVersion) } + if len(v.IPAddressType) > 0 { + ok := object.Key("IPAddressType") + ok.String(string(v.IPAddressType)) + } + if v.LogPublishingOptions != nil { ok := object.Key("LogPublishingOptions") if err := awsRestjson1_serializeDocumentLogPublishingOptions(v.LogPublishingOptions, ok); err != nil { @@ -4148,6 +4153,11 @@ func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConf } } + if len(v.IPAddressType) > 0 { + ok := object.Key("IPAddressType") + ok.String(string(v.IPAddressType)) + } + if v.LogPublishingOptions != nil { ok := object.Key("LogPublishingOptions") if err := awsRestjson1_serializeDocumentLogPublishingOptions(v.LogPublishingOptions, ok); err != nil { diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 6c2a06343e7..d15c106e024 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -332,6 +332,24 @@ func (InboundConnectionStatusCode) Values() []InboundConnectionStatusCode { } } +type IPAddressType string + +// Enum values for IPAddressType +const ( + IPAddressTypeIpv4 IPAddressType = "ipv4" + IPAddressTypeDualstack IPAddressType = "dualstack" +) + +// Values returns all known values for IPAddressType. 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 (IPAddressType) Values() []IPAddressType { + return []IPAddressType{ + "ipv4", + "dualstack", + } +} + type LogType string // Enum values for LogType diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 26c1270336a..ac124b21107 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -639,6 +639,9 @@ type DomainConfig struct { // The OpenSearch or Elasticsearch version that the domain is running. EngineVersion *VersionStatus + // The type of IP addresses supported by the endpoint for the domain. + IPAddressType *IPAddressTypeStatus + // Key-value pairs to configure log publishing. LogPublishingOptions *LogPublishingOptionsStatus @@ -733,25 +736,25 @@ type DomainMaintenanceDetails struct { // The name of the action. Action MaintenanceType - // Contains time at which action created. + // The time at which the action was created. CreatedAt *time.Time // The name of the domain. DomainName *string - // Id of the requested action. + // The ID of the requested action. MaintenanceId *string - // Id of the data node. + // The ID of the data node. NodeId *string // The status of the action. Status MaintenanceStatus - // The status message of the action. + // The status message for the action. StatusMessage *string - // Contains time at which action updated. + // The time at which the action was updated. UpdatedAt *time.Time noSmithyDocumentSerde @@ -893,6 +896,11 @@ type DomainStatus struct { // to the domain. Endpoint *string + // The domain endpoint to which index and search requests are submitted. For + // example, search-imdb-movies-oopcnjfn6ugo.eu-west-1.es.amazonaws.com or + // doc-imdb-movies-oopcnjfn6u.eu-west-1.es.amazonaws.com . + EndpointV2 *string + // The key-value pair that exists if the OpenSearch Service domain uses VPC // endpoints.. Example key, value : // 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com' . @@ -902,6 +910,9 @@ type DomainStatus struct { // format Elasticsearch_X.Y or OpenSearch_X.Y . EngineVersion *string + // The type of IP addresses supported by the endpoint for the domain. + IPAddressType IPAddressType + // Log publishing options for the domain. LogPublishingOptions map[string]LogPublishingOption @@ -1207,6 +1218,22 @@ type InstanceTypeDetails struct { noSmithyDocumentSerde } +// The IP address type status for the domain. +type IPAddressTypeStatus struct { + + // The IP address options for the domain. + // + // This member is required. + Options IPAddressType + + // Provides the current status of an entity. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + // Limits for a given instance type and for each of its roles. type Limits struct { diff --git a/service/redshift/api_op_DeleteResourcePolicy.go b/service/redshift/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..7bfeea82778 --- /dev/null +++ b/service/redshift/api_op_DeleteResourcePolicy.go @@ -0,0 +1,257 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshift + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the resource policy for a specified resource. +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // The Amazon Resource Name (ARN) of the resource of which its resource policy is + // deleted. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addDeleteResourcePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "redshift", + OperationName: "DeleteResourcePolicy", + } +} + +type opDeleteResourcePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDeleteResourcePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDeleteResourcePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "redshift" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "redshift" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("redshift") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDeleteResourcePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDeleteResourcePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/redshift/api_op_DescribeInboundIntegrations.go b/service/redshift/api_op_DescribeInboundIntegrations.go new file mode 100644 index 00000000000..acd7e312e13 --- /dev/null +++ b/service/redshift/api_op_DescribeInboundIntegrations.go @@ -0,0 +1,378 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshift + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/redshift/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of inbound integrations. +func (c *Client) DescribeInboundIntegrations(ctx context.Context, params *DescribeInboundIntegrationsInput, optFns ...func(*Options)) (*DescribeInboundIntegrationsOutput, error) { + if params == nil { + params = &DescribeInboundIntegrationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInboundIntegrations", params, optFns, c.addOperationDescribeInboundIntegrationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInboundIntegrationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInboundIntegrationsInput struct { + + // The Amazon Resource Name (ARN) of the inbound integration. + IntegrationArn *string + + // An optional parameter that specifies the starting point to return a set of + // response records. When the results of a DescribeInboundIntegrations request + // exceed the value specified in MaxRecords , Amazon Web Services returns a value + // in the Marker field of the response. You can retrieve the next set of response + // records by providing the returned marker value in the Marker parameter and + // retrying the request. + Marker *string + + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. Default: 100 + // Constraints: minimum 20, maximum 100. + MaxRecords *int32 + + // The Amazon Resource Name (ARN) of the target of an inbound integration. + TargetArn *string + + noSmithyDocumentSerde +} + +type DescribeInboundIntegrationsOutput struct { + + // A list of InboundIntegration instances. + InboundIntegrations []types.InboundIntegration + + // 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 marker value in the Marker + // parameter and retrying the command. If the Marker field is empty, all response + // records have been retrieved for the request. + Marker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInboundIntegrationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpDescribeInboundIntegrations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDescribeInboundIntegrations{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addDescribeInboundIntegrationsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInboundIntegrations(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInboundIntegrationsAPIClient is a client that implements the +// DescribeInboundIntegrations operation. +type DescribeInboundIntegrationsAPIClient interface { + DescribeInboundIntegrations(context.Context, *DescribeInboundIntegrationsInput, ...func(*Options)) (*DescribeInboundIntegrationsOutput, error) +} + +var _ DescribeInboundIntegrationsAPIClient = (*Client)(nil) + +// DescribeInboundIntegrationsPaginatorOptions is the paginator options for +// DescribeInboundIntegrations +type DescribeInboundIntegrationsPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. Default: 100 + // Constraints: minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInboundIntegrationsPaginator is a paginator for +// DescribeInboundIntegrations +type DescribeInboundIntegrationsPaginator struct { + options DescribeInboundIntegrationsPaginatorOptions + client DescribeInboundIntegrationsAPIClient + params *DescribeInboundIntegrationsInput + nextToken *string + firstPage bool +} + +// NewDescribeInboundIntegrationsPaginator returns a new +// DescribeInboundIntegrationsPaginator +func NewDescribeInboundIntegrationsPaginator(client DescribeInboundIntegrationsAPIClient, params *DescribeInboundIntegrationsInput, optFns ...func(*DescribeInboundIntegrationsPaginatorOptions)) *DescribeInboundIntegrationsPaginator { + if params == nil { + params = &DescribeInboundIntegrationsInput{} + } + + options := DescribeInboundIntegrationsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInboundIntegrationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInboundIntegrationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInboundIntegrations page. +func (p *DescribeInboundIntegrationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInboundIntegrationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + result, err := p.client.DescribeInboundIntegrations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opDescribeInboundIntegrations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "redshift", + OperationName: "DescribeInboundIntegrations", + } +} + +type opDescribeInboundIntegrationsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDescribeInboundIntegrationsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDescribeInboundIntegrationsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "redshift" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "redshift" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("redshift") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDescribeInboundIntegrationsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDescribeInboundIntegrationsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/redshift/api_op_GetResourcePolicy.go b/service/redshift/api_op_GetResourcePolicy.go new file mode 100644 index 00000000000..fcfe8109f1d --- /dev/null +++ b/service/redshift/api_op_GetResourcePolicy.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshift + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/redshift/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Get the resource policy for a specified resource. +func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { + if params == nil { + params = &GetResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePolicyInput struct { + + // The Amazon Resource Name (ARN) of the resource of which its resource policy is + // fetched. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type GetResourcePolicyOutput struct { + + // The content of the resource policy. + ResourcePolicy *types.ResourcePolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetResourcePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "redshift", + OperationName: "GetResourcePolicy", + } +} + +type opGetResourcePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetResourcePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetResourcePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "redshift" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "redshift" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("redshift") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetResourcePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetResourcePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/redshift/api_op_PutResourcePolicy.go b/service/redshift/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..0515dbd5809 --- /dev/null +++ b/service/redshift/api_op_PutResourcePolicy.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package redshift + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/redshift/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the resource policy for a specified resource. +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // The content of the resource policy being updated. + // + // This member is required. + Policy *string + + // The Amazon Resource Name (ARN) of the resource of which its resource policy is + // updated. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + + // The content of the updated resource policy. + ResourcePolicy *types.ResourcePolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addPutResourcePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "redshift", + OperationName: "PutResourcePolicy", + } +} + +type opPutResourcePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opPutResourcePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opPutResourcePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "redshift" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "redshift" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("redshift") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addPutResourcePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opPutResourcePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/redshift/deserializers.go b/service/redshift/deserializers.go index 9a916153420..8cf23aa92ef 100644 --- a/service/redshift/deserializers.go +++ b/service/redshift/deserializers.go @@ -4499,6 +4499,82 @@ func awsAwsquery_deserializeOpErrorDeletePartner(response *smithyhttp.Response, } } +type awsAwsquery_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsquery_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorDeleteResourcePolicy(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ResourceNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorResourceNotFoundFault(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpDeleteScheduledAction struct { } @@ -7399,14 +7475,14 @@ func awsAwsquery_deserializeOpErrorDescribeHsmConfigurations(response *smithyhtt } } -type awsAwsquery_deserializeOpDescribeLoggingStatus struct { +type awsAwsquery_deserializeOpDescribeInboundIntegrations struct { } -func (*awsAwsquery_deserializeOpDescribeLoggingStatus) ID() string { +func (*awsAwsquery_deserializeOpDescribeInboundIntegrations) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeLoggingStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeInboundIntegrations) 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) @@ -7420,9 +7496,9 @@ func (m *awsAwsquery_deserializeOpDescribeLoggingStatus) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeLoggingStatus(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeInboundIntegrations(response, &metadata) } - output := &DescribeLoggingStatusOutput{} + output := &DescribeInboundIntegrationsOutput{} out.Result = output var buff [1024]byte @@ -7443,7 +7519,7 @@ func (m *awsAwsquery_deserializeOpDescribeLoggingStatus) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeLoggingStatusResult") + t, err = decoder.GetElement("DescribeInboundIntegrationsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7455,7 +7531,7 @@ func (m *awsAwsquery_deserializeOpDescribeLoggingStatus) HandleDeserialize(ctx c } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeLoggingStatusOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeInboundIntegrationsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7469,7 +7545,7 @@ func (m *awsAwsquery_deserializeOpDescribeLoggingStatus) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeLoggingStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeInboundIntegrations(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)} @@ -7494,8 +7570,14 @@ func awsAwsquery_deserializeOpErrorDescribeLoggingStatus(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("IntegrationNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorIntegrationNotFoundFault(response, errorBody) + + case strings.EqualFold("InvalidNamespaceFault", errorCode): + return awsAwsquery_deserializeErrorInvalidNamespaceFault(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7507,14 +7589,14 @@ func awsAwsquery_deserializeOpErrorDescribeLoggingStatus(response *smithyhttp.Re } } -type awsAwsquery_deserializeOpDescribeNodeConfigurationOptions struct { +type awsAwsquery_deserializeOpDescribeLoggingStatus struct { } -func (*awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) ID() string { +func (*awsAwsquery_deserializeOpDescribeLoggingStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeLoggingStatus) 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) @@ -7528,9 +7610,9 @@ func (m *awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeNodeConfigurationOptions(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeLoggingStatus(response, &metadata) } - output := &DescribeNodeConfigurationOptionsOutput{} + output := &DescribeLoggingStatusOutput{} out.Result = output var buff [1024]byte @@ -7551,7 +7633,7 @@ func (m *awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeNodeConfigurationOptionsResult") + t, err = decoder.GetElement("DescribeLoggingStatusResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7563,7 +7645,7 @@ func (m *awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) HandleDeseri } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeNodeConfigurationOptionsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeLoggingStatusOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7577,7 +7659,7 @@ func (m *awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) HandleDeseri return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeNodeConfigurationOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeLoggingStatus(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)} @@ -7602,21 +7684,9 @@ func awsAwsquery_deserializeOpErrorDescribeNodeConfigurationOptions(response *sm } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("AccessToSnapshotDenied", errorCode): - return awsAwsquery_deserializeErrorAccessToSnapshotDeniedFault(response, errorBody) - case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("ClusterSnapshotNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterSnapshotNotFoundFault(response, errorBody) - - case strings.EqualFold("InvalidClusterSnapshotState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterSnapshotStateFault(response, errorBody) - - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7627,14 +7697,14 @@ func awsAwsquery_deserializeOpErrorDescribeNodeConfigurationOptions(response *sm } } -type awsAwsquery_deserializeOpDescribeOrderableClusterOptions struct { +type awsAwsquery_deserializeOpDescribeNodeConfigurationOptions struct { } -func (*awsAwsquery_deserializeOpDescribeOrderableClusterOptions) ID() string { +func (*awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeOrderableClusterOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeNodeConfigurationOptions) 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) @@ -7648,9 +7718,9 @@ func (m *awsAwsquery_deserializeOpDescribeOrderableClusterOptions) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeOrderableClusterOptions(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeNodeConfigurationOptions(response, &metadata) } - output := &DescribeOrderableClusterOptionsOutput{} + output := &DescribeNodeConfigurationOptionsOutput{} out.Result = output var buff [1024]byte @@ -7671,7 +7741,7 @@ func (m *awsAwsquery_deserializeOpDescribeOrderableClusterOptions) HandleDeseria } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeOrderableClusterOptionsResult") + t, err = decoder.GetElement("DescribeNodeConfigurationOptionsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7683,7 +7753,7 @@ func (m *awsAwsquery_deserializeOpDescribeOrderableClusterOptions) HandleDeseria } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeOrderableClusterOptionsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeNodeConfigurationOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7697,7 +7767,7 @@ func (m *awsAwsquery_deserializeOpDescribeOrderableClusterOptions) HandleDeseria return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeOrderableClusterOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeNodeConfigurationOptions(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)} @@ -7722,6 +7792,21 @@ func awsAwsquery_deserializeOpErrorDescribeOrderableClusterOptions(response *smi } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("AccessToSnapshotDenied", errorCode): + return awsAwsquery_deserializeErrorAccessToSnapshotDeniedFault(response, errorBody) + + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("ClusterSnapshotNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterSnapshotNotFoundFault(response, errorBody) + + case strings.EqualFold("InvalidClusterSnapshotState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterSnapshotStateFault(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7732,14 +7817,14 @@ func awsAwsquery_deserializeOpErrorDescribeOrderableClusterOptions(response *smi } } -type awsAwsquery_deserializeOpDescribePartners struct { +type awsAwsquery_deserializeOpDescribeOrderableClusterOptions struct { } -func (*awsAwsquery_deserializeOpDescribePartners) ID() string { +func (*awsAwsquery_deserializeOpDescribeOrderableClusterOptions) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribePartners) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeOrderableClusterOptions) 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) @@ -7753,9 +7838,9 @@ func (m *awsAwsquery_deserializeOpDescribePartners) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribePartners(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeOrderableClusterOptions(response, &metadata) } - output := &DescribePartnersOutput{} + output := &DescribeOrderableClusterOptionsOutput{} out.Result = output var buff [1024]byte @@ -7776,7 +7861,7 @@ func (m *awsAwsquery_deserializeOpDescribePartners) HandleDeserialize(ctx contex } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribePartnersResult") + t, err = decoder.GetElement("DescribeOrderableClusterOptionsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7788,7 +7873,7 @@ func (m *awsAwsquery_deserializeOpDescribePartners) HandleDeserialize(ctx contex } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribePartnersOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeOrderableClusterOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7802,7 +7887,7 @@ func (m *awsAwsquery_deserializeOpDescribePartners) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribePartners(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeOrderableClusterOptions(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)} @@ -7827,12 +7912,6 @@ func awsAwsquery_deserializeOpErrorDescribePartners(response *smithyhttp.Respons } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - - case strings.EqualFold("UnauthorizedPartnerIntegration", errorCode): - return awsAwsquery_deserializeErrorUnauthorizedPartnerIntegrationFault(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7843,14 +7922,14 @@ func awsAwsquery_deserializeOpErrorDescribePartners(response *smithyhttp.Respons } } -type awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus struct { +type awsAwsquery_deserializeOpDescribePartners struct { } -func (*awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) ID() string { +func (*awsAwsquery_deserializeOpDescribePartners) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribePartners) 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) @@ -7864,9 +7943,9 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribePartners(response, &metadata) } - output := &DescribeReservedNodeExchangeStatusOutput{} + output := &DescribePartnersOutput{} out.Result = output var buff [1024]byte @@ -7887,7 +7966,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) HandleDese } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeReservedNodeExchangeStatusResult") + t, err = decoder.GetElement("DescribePartnersResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7899,7 +7978,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) HandleDese } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeReservedNodeExchangeStatusOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribePartnersOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7913,7 +7992,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) HandleDese return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribePartners(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)} @@ -7938,14 +8017,11 @@ func awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(response * } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ReservedNodeExchangeNotFond", errorCode): - return awsAwsquery_deserializeErrorReservedNodeExchangeNotFoundFault(response, errorBody) - - case strings.EqualFold("ReservedNodeNotFound", errorCode): - return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + case strings.EqualFold("UnauthorizedPartnerIntegration", errorCode): + return awsAwsquery_deserializeErrorUnauthorizedPartnerIntegrationFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7957,14 +8033,14 @@ func awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(response * } } -type awsAwsquery_deserializeOpDescribeReservedNodeOfferings struct { +type awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus struct { } -func (*awsAwsquery_deserializeOpDescribeReservedNodeOfferings) ID() string { +func (*awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeReservedNodeOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeReservedNodeExchangeStatus) 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) @@ -7978,9 +8054,9 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeOfferings) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeReservedNodeOfferings(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(response, &metadata) } - output := &DescribeReservedNodeOfferingsOutput{} + output := &DescribeReservedNodeExchangeStatusOutput{} out.Result = output var buff [1024]byte @@ -8001,7 +8077,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeOfferings) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeReservedNodeOfferingsResult") + t, err = decoder.GetElement("DescribeReservedNodeExchangeStatusResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8013,7 +8089,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeOfferings) HandleDeseriali } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeReservedNodeOfferingsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeReservedNodeExchangeStatusOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8027,7 +8103,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodeOfferings) HandleDeseriali return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeReservedNodeOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeReservedNodeExchangeStatus(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)} @@ -8052,11 +8128,11 @@ func awsAwsquery_deserializeOpErrorDescribeReservedNodeOfferings(response *smith } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("DependentServiceUnavailableFault", errorCode): - return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) + case strings.EqualFold("ReservedNodeExchangeNotFond", errorCode): + return awsAwsquery_deserializeErrorReservedNodeExchangeNotFoundFault(response, errorBody) - case strings.EqualFold("ReservedNodeOfferingNotFound", errorCode): - return awsAwsquery_deserializeErrorReservedNodeOfferingNotFoundFault(response, errorBody) + case strings.EqualFold("ReservedNodeNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) case strings.EqualFold("UnsupportedOperation", errorCode): return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) @@ -8071,14 +8147,14 @@ func awsAwsquery_deserializeOpErrorDescribeReservedNodeOfferings(response *smith } } -type awsAwsquery_deserializeOpDescribeReservedNodes struct { +type awsAwsquery_deserializeOpDescribeReservedNodeOfferings struct { } -func (*awsAwsquery_deserializeOpDescribeReservedNodes) ID() string { +func (*awsAwsquery_deserializeOpDescribeReservedNodeOfferings) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeReservedNodes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeReservedNodeOfferings) 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) @@ -8092,9 +8168,9 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodes) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeReservedNodes(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeReservedNodeOfferings(response, &metadata) } - output := &DescribeReservedNodesOutput{} + output := &DescribeReservedNodeOfferingsOutput{} out.Result = output var buff [1024]byte @@ -8115,7 +8191,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodes) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeReservedNodesResult") + t, err = decoder.GetElement("DescribeReservedNodeOfferingsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8127,7 +8203,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodes) HandleDeserialize(ctx c } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeReservedNodesOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeReservedNodeOfferingsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8141,7 +8217,7 @@ func (m *awsAwsquery_deserializeOpDescribeReservedNodes) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeReservedNodes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeReservedNodeOfferings(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)} @@ -8169,8 +8245,11 @@ func awsAwsquery_deserializeOpErrorDescribeReservedNodes(response *smithyhttp.Re case strings.EqualFold("DependentServiceUnavailableFault", errorCode): return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) - case strings.EqualFold("ReservedNodeNotFound", errorCode): - return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) + case strings.EqualFold("ReservedNodeOfferingNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeOfferingNotFoundFault(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -8182,14 +8261,14 @@ func awsAwsquery_deserializeOpErrorDescribeReservedNodes(response *smithyhttp.Re } } -type awsAwsquery_deserializeOpDescribeResize struct { +type awsAwsquery_deserializeOpDescribeReservedNodes struct { } -func (*awsAwsquery_deserializeOpDescribeResize) ID() string { +func (*awsAwsquery_deserializeOpDescribeReservedNodes) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeResize) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeReservedNodes) 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) @@ -8203,9 +8282,9 @@ func (m *awsAwsquery_deserializeOpDescribeResize) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeResize(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeReservedNodes(response, &metadata) } - output := &DescribeResizeOutput{} + output := &DescribeReservedNodesOutput{} out.Result = output var buff [1024]byte @@ -8226,7 +8305,7 @@ func (m *awsAwsquery_deserializeOpDescribeResize) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeResizeResult") + t, err = decoder.GetElement("DescribeReservedNodesResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8238,7 +8317,7 @@ func (m *awsAwsquery_deserializeOpDescribeResize) HandleDeserialize(ctx context. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeResizeOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeReservedNodesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8252,7 +8331,7 @@ func (m *awsAwsquery_deserializeOpDescribeResize) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeResize(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeReservedNodes(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)} @@ -8277,11 +8356,11 @@ func awsAwsquery_deserializeOpErrorDescribeResize(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("DependentServiceUnavailableFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) - case strings.EqualFold("ResizeNotFound", errorCode): - return awsAwsquery_deserializeErrorResizeNotFoundFault(response, errorBody) + case strings.EqualFold("ReservedNodeNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -8293,14 +8372,14 @@ func awsAwsquery_deserializeOpErrorDescribeResize(response *smithyhttp.Response, } } -type awsAwsquery_deserializeOpDescribeScheduledActions struct { +type awsAwsquery_deserializeOpDescribeResize struct { } -func (*awsAwsquery_deserializeOpDescribeScheduledActions) ID() string { +func (*awsAwsquery_deserializeOpDescribeResize) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeScheduledActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeResize) 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) @@ -8314,9 +8393,9 @@ func (m *awsAwsquery_deserializeOpDescribeScheduledActions) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeScheduledActions(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeResize(response, &metadata) } - output := &DescribeScheduledActionsOutput{} + output := &DescribeResizeOutput{} out.Result = output var buff [1024]byte @@ -8337,7 +8416,7 @@ func (m *awsAwsquery_deserializeOpDescribeScheduledActions) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeScheduledActionsResult") + t, err = decoder.GetElement("DescribeResizeResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8349,7 +8428,7 @@ func (m *awsAwsquery_deserializeOpDescribeScheduledActions) HandleDeserialize(ct } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeScheduledActionsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeResizeOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8363,7 +8442,7 @@ func (m *awsAwsquery_deserializeOpDescribeScheduledActions) HandleDeserialize(ct return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeScheduledActions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeResize(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)} @@ -8388,11 +8467,11 @@ func awsAwsquery_deserializeOpErrorDescribeScheduledActions(response *smithyhttp } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ScheduledActionNotFound", errorCode): - return awsAwsquery_deserializeErrorScheduledActionNotFoundFault(response, errorBody) + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("UnauthorizedOperation", errorCode): - return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + case strings.EqualFold("ResizeNotFound", errorCode): + return awsAwsquery_deserializeErrorResizeNotFoundFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -8404,14 +8483,14 @@ func awsAwsquery_deserializeOpErrorDescribeScheduledActions(response *smithyhttp } } -type awsAwsquery_deserializeOpDescribeSnapshotCopyGrants struct { +type awsAwsquery_deserializeOpDescribeScheduledActions struct { } -func (*awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) ID() string { +func (*awsAwsquery_deserializeOpDescribeScheduledActions) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeScheduledActions) 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) @@ -8425,9 +8504,9 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeSnapshotCopyGrants(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeScheduledActions(response, &metadata) } - output := &DescribeSnapshotCopyGrantsOutput{} + output := &DescribeScheduledActionsOutput{} out.Result = output var buff [1024]byte @@ -8448,7 +8527,7 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeSnapshotCopyGrantsResult") + t, err = decoder.GetElement("DescribeScheduledActionsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8460,7 +8539,7 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) HandleDeserialize( } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeSnapshotCopyGrantsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeScheduledActionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8474,7 +8553,7 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) HandleDeserialize( return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeSnapshotCopyGrants(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeScheduledActions(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)} @@ -8499,11 +8578,11 @@ func awsAwsquery_deserializeOpErrorDescribeSnapshotCopyGrants(response *smithyht } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("InvalidTagFault", errorCode): - return awsAwsquery_deserializeErrorInvalidTagFault(response, errorBody) + case strings.EqualFold("ScheduledActionNotFound", errorCode): + return awsAwsquery_deserializeErrorScheduledActionNotFoundFault(response, errorBody) - case strings.EqualFold("SnapshotCopyGrantNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorSnapshotCopyGrantNotFoundFault(response, errorBody) + case strings.EqualFold("UnauthorizedOperation", errorCode): + return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -8515,14 +8594,14 @@ func awsAwsquery_deserializeOpErrorDescribeSnapshotCopyGrants(response *smithyht } } -type awsAwsquery_deserializeOpDescribeSnapshotSchedules struct { +type awsAwsquery_deserializeOpDescribeSnapshotCopyGrants struct { } -func (*awsAwsquery_deserializeOpDescribeSnapshotSchedules) ID() string { +func (*awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeSnapshotSchedules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeSnapshotCopyGrants) 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) @@ -8536,9 +8615,9 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotSchedules) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeSnapshotSchedules(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeSnapshotCopyGrants(response, &metadata) } - output := &DescribeSnapshotSchedulesOutput{} + output := &DescribeSnapshotCopyGrantsOutput{} out.Result = output var buff [1024]byte @@ -8559,7 +8638,7 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotSchedules) HandleDeserialize(c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeSnapshotSchedulesResult") + t, err = decoder.GetElement("DescribeSnapshotCopyGrantsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8571,7 +8650,7 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotSchedules) HandleDeserialize(c } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeSnapshotSchedulesOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeSnapshotCopyGrantsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8585,7 +8664,7 @@ func (m *awsAwsquery_deserializeOpDescribeSnapshotSchedules) HandleDeserialize(c return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeSnapshotSchedules(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeSnapshotCopyGrants(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)} @@ -8610,111 +8689,12 @@ func awsAwsquery_deserializeOpErrorDescribeSnapshotSchedules(response *smithyhtt } errorBody.Seek(0, io.SeekStart) switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpDescribeStorage struct { -} - -func (*awsAwsquery_deserializeOpDescribeStorage) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpDescribeStorage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeStorage(response, &metadata) - } - output := &DescribeStorageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeStorageResult") - 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 - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeStorageOutput(&output, 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 out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorDescribeStorage(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()) + case strings.EqualFold("InvalidTagFault", errorCode): + return awsAwsquery_deserializeErrorInvalidTagFault(response, errorBody) - errorCode := "UnknownError" - errorMessage := errorCode + case strings.EqualFold("SnapshotCopyGrantNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorSnapshotCopyGrantNotFoundFault(response, errorBody) - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8725,14 +8705,14 @@ func awsAwsquery_deserializeOpErrorDescribeStorage(response *smithyhttp.Response } } -type awsAwsquery_deserializeOpDescribeTableRestoreStatus struct { +type awsAwsquery_deserializeOpDescribeSnapshotSchedules struct { } -func (*awsAwsquery_deserializeOpDescribeTableRestoreStatus) ID() string { +func (*awsAwsquery_deserializeOpDescribeSnapshotSchedules) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeTableRestoreStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeSnapshotSchedules) 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) @@ -8746,9 +8726,9 @@ func (m *awsAwsquery_deserializeOpDescribeTableRestoreStatus) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeTableRestoreStatus(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeSnapshotSchedules(response, &metadata) } - output := &DescribeTableRestoreStatusOutput{} + output := &DescribeSnapshotSchedulesOutput{} out.Result = output var buff [1024]byte @@ -8769,7 +8749,7 @@ func (m *awsAwsquery_deserializeOpDescribeTableRestoreStatus) HandleDeserialize( } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeTableRestoreStatusResult") + t, err = decoder.GetElement("DescribeSnapshotSchedulesResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8781,7 +8761,7 @@ func (m *awsAwsquery_deserializeOpDescribeTableRestoreStatus) HandleDeserialize( } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeTableRestoreStatusOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeSnapshotSchedulesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8795,7 +8775,7 @@ func (m *awsAwsquery_deserializeOpDescribeTableRestoreStatus) HandleDeserialize( return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeTableRestoreStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeSnapshotSchedules(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)} @@ -8820,12 +8800,6 @@ func awsAwsquery_deserializeOpErrorDescribeTableRestoreStatus(response *smithyht } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - - case strings.EqualFold("TableRestoreNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorTableRestoreNotFoundFault(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8836,14 +8810,14 @@ func awsAwsquery_deserializeOpErrorDescribeTableRestoreStatus(response *smithyht } } -type awsAwsquery_deserializeOpDescribeTags struct { +type awsAwsquery_deserializeOpDescribeStorage struct { } -func (*awsAwsquery_deserializeOpDescribeTags) ID() string { +func (*awsAwsquery_deserializeOpDescribeStorage) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeStorage) 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) @@ -8857,9 +8831,9 @@ func (m *awsAwsquery_deserializeOpDescribeTags) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeTags(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeStorage(response, &metadata) } - output := &DescribeTagsOutput{} + output := &DescribeStorageOutput{} out.Result = output var buff [1024]byte @@ -8880,7 +8854,7 @@ func (m *awsAwsquery_deserializeOpDescribeTags) HandleDeserialize(ctx context.Co } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeTagsResult") + t, err = decoder.GetElement("DescribeStorageResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8892,7 +8866,7 @@ func (m *awsAwsquery_deserializeOpDescribeTags) HandleDeserialize(ctx context.Co } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeTagsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeStorageOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8906,7 +8880,7 @@ func (m *awsAwsquery_deserializeOpDescribeTags) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeStorage(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)} @@ -8931,12 +8905,6 @@ func awsAwsquery_deserializeOpErrorDescribeTags(response *smithyhttp.Response, m } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("InvalidTagFault", errorCode): - return awsAwsquery_deserializeErrorInvalidTagFault(response, errorBody) - - case strings.EqualFold("ResourceNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorResourceNotFoundFault(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8947,14 +8915,14 @@ func awsAwsquery_deserializeOpErrorDescribeTags(response *smithyhttp.Response, m } } -type awsAwsquery_deserializeOpDescribeUsageLimits struct { +type awsAwsquery_deserializeOpDescribeTableRestoreStatus struct { } -func (*awsAwsquery_deserializeOpDescribeUsageLimits) ID() string { +func (*awsAwsquery_deserializeOpDescribeTableRestoreStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDescribeUsageLimits) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeTableRestoreStatus) 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) @@ -8968,9 +8936,9 @@ func (m *awsAwsquery_deserializeOpDescribeUsageLimits) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDescribeUsageLimits(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeTableRestoreStatus(response, &metadata) } - output := &DescribeUsageLimitsOutput{} + output := &DescribeTableRestoreStatusOutput{} out.Result = output var buff [1024]byte @@ -8991,7 +8959,7 @@ func (m *awsAwsquery_deserializeOpDescribeUsageLimits) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DescribeUsageLimitsResult") + t, err = decoder.GetElement("DescribeTableRestoreStatusResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9003,7 +8971,7 @@ func (m *awsAwsquery_deserializeOpDescribeUsageLimits) HandleDeserialize(ctx con } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDescribeUsageLimitsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeTableRestoreStatusOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9017,7 +8985,7 @@ func (m *awsAwsquery_deserializeOpDescribeUsageLimits) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsquery_deserializeOpErrorDescribeUsageLimits(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeTableRestoreStatus(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)} @@ -9045,8 +9013,8 @@ func awsAwsquery_deserializeOpErrorDescribeUsageLimits(response *smithyhttp.Resp case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + case strings.EqualFold("TableRestoreNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorTableRestoreNotFoundFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9058,14 +9026,14 @@ func awsAwsquery_deserializeOpErrorDescribeUsageLimits(response *smithyhttp.Resp } } -type awsAwsquery_deserializeOpDisableLogging struct { +type awsAwsquery_deserializeOpDescribeTags struct { } -func (*awsAwsquery_deserializeOpDisableLogging) ID() string { +func (*awsAwsquery_deserializeOpDescribeTags) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDisableLogging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeTags) 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) @@ -9079,9 +9047,9 @@ func (m *awsAwsquery_deserializeOpDisableLogging) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDisableLogging(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeTags(response, &metadata) } - output := &DisableLoggingOutput{} + output := &DescribeTagsOutput{} out.Result = output var buff [1024]byte @@ -9102,7 +9070,7 @@ func (m *awsAwsquery_deserializeOpDisableLogging) HandleDeserialize(ctx context. } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DisableLoggingResult") + t, err = decoder.GetElement("DescribeTagsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9114,7 +9082,7 @@ func (m *awsAwsquery_deserializeOpDisableLogging) HandleDeserialize(ctx context. } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDisableLoggingOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeTagsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9128,7 +9096,7 @@ func (m *awsAwsquery_deserializeOpDisableLogging) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsquery_deserializeOpErrorDisableLogging(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeTags(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)} @@ -9153,11 +9121,11 @@ func awsAwsquery_deserializeOpErrorDisableLogging(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("InvalidTagFault", errorCode): + return awsAwsquery_deserializeErrorInvalidTagFault(response, errorBody) - case strings.EqualFold("InvalidClusterState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + case strings.EqualFold("ResourceNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorResourceNotFoundFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9169,14 +9137,14 @@ func awsAwsquery_deserializeOpErrorDisableLogging(response *smithyhttp.Response, } } -type awsAwsquery_deserializeOpDisableSnapshotCopy struct { +type awsAwsquery_deserializeOpDescribeUsageLimits struct { } -func (*awsAwsquery_deserializeOpDisableSnapshotCopy) ID() string { +func (*awsAwsquery_deserializeOpDescribeUsageLimits) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDisableSnapshotCopy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDescribeUsageLimits) 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) @@ -9190,9 +9158,9 @@ func (m *awsAwsquery_deserializeOpDisableSnapshotCopy) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDisableSnapshotCopy(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDescribeUsageLimits(response, &metadata) } - output := &DisableSnapshotCopyOutput{} + output := &DescribeUsageLimitsOutput{} out.Result = output var buff [1024]byte @@ -9213,7 +9181,7 @@ func (m *awsAwsquery_deserializeOpDisableSnapshotCopy) HandleDeserialize(ctx con } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DisableSnapshotCopyResult") + t, err = decoder.GetElement("DescribeUsageLimitsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9225,7 +9193,7 @@ func (m *awsAwsquery_deserializeOpDisableSnapshotCopy) HandleDeserialize(ctx con } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDisableSnapshotCopyOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDescribeUsageLimitsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9239,7 +9207,7 @@ func (m *awsAwsquery_deserializeOpDisableSnapshotCopy) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsquery_deserializeOpErrorDisableSnapshotCopy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDescribeUsageLimits(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)} @@ -9267,14 +9235,8 @@ func awsAwsquery_deserializeOpErrorDisableSnapshotCopy(response *smithyhttp.Resp case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("InvalidClusterState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) - - case strings.EqualFold("SnapshotCopyAlreadyDisabledFault", errorCode): - return awsAwsquery_deserializeErrorSnapshotCopyAlreadyDisabledFault(response, errorBody) - - case strings.EqualFold("UnauthorizedOperation", errorCode): - return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9286,14 +9248,14 @@ func awsAwsquery_deserializeOpErrorDisableSnapshotCopy(response *smithyhttp.Resp } } -type awsAwsquery_deserializeOpDisassociateDataShareConsumer struct { +type awsAwsquery_deserializeOpDisableLogging struct { } -func (*awsAwsquery_deserializeOpDisassociateDataShareConsumer) ID() string { +func (*awsAwsquery_deserializeOpDisableLogging) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpDisassociateDataShareConsumer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDisableLogging) 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) @@ -9307,9 +9269,9 @@ func (m *awsAwsquery_deserializeOpDisassociateDataShareConsumer) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDisassociateDataShareConsumer(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDisableLogging(response, &metadata) } - output := &DisassociateDataShareConsumerOutput{} + output := &DisableLoggingOutput{} out.Result = output var buff [1024]byte @@ -9330,7 +9292,7 @@ func (m *awsAwsquery_deserializeOpDisassociateDataShareConsumer) HandleDeseriali } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DisassociateDataShareConsumerResult") + t, err = decoder.GetElement("DisableLoggingResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9342,7 +9304,7 @@ func (m *awsAwsquery_deserializeOpDisassociateDataShareConsumer) HandleDeseriali } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDisassociateDataShareConsumerOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDisableLoggingOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9356,7 +9318,7 @@ func (m *awsAwsquery_deserializeOpDisassociateDataShareConsumer) HandleDeseriali return out, metadata, err } -func awsAwsquery_deserializeOpErrorDisassociateDataShareConsumer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDisableLogging(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)} @@ -9381,11 +9343,11 @@ func awsAwsquery_deserializeOpErrorDisassociateDataShareConsumer(response *smith } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("InvalidDataShareFault", errorCode): - return awsAwsquery_deserializeErrorInvalidDataShareFault(response, errorBody) + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("InvalidNamespaceFault", errorCode): - return awsAwsquery_deserializeErrorInvalidNamespaceFault(response, errorBody) + case strings.EqualFold("InvalidClusterState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9397,14 +9359,14 @@ func awsAwsquery_deserializeOpErrorDisassociateDataShareConsumer(response *smith } } -type awsAwsquery_deserializeOpEnableLogging struct { +type awsAwsquery_deserializeOpDisableSnapshotCopy struct { } -func (*awsAwsquery_deserializeOpEnableLogging) ID() string { +func (*awsAwsquery_deserializeOpDisableSnapshotCopy) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpEnableLogging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDisableSnapshotCopy) 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) @@ -9418,9 +9380,9 @@ func (m *awsAwsquery_deserializeOpEnableLogging) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorEnableLogging(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDisableSnapshotCopy(response, &metadata) } - output := &EnableLoggingOutput{} + output := &DisableSnapshotCopyOutput{} out.Result = output var buff [1024]byte @@ -9441,7 +9403,7 @@ func (m *awsAwsquery_deserializeOpEnableLogging) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("EnableLoggingResult") + t, err = decoder.GetElement("DisableSnapshotCopyResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9453,7 +9415,7 @@ func (m *awsAwsquery_deserializeOpEnableLogging) HandleDeserialize(ctx context.C } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentEnableLoggingOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDisableSnapshotCopyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9467,7 +9429,7 @@ func (m *awsAwsquery_deserializeOpEnableLogging) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsquery_deserializeOpErrorEnableLogging(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDisableSnapshotCopy(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)} @@ -9492,23 +9454,17 @@ func awsAwsquery_deserializeOpErrorEnableLogging(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("BucketNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorBucketNotFoundFault(response, errorBody) - case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("InsufficientS3BucketPolicyFault", errorCode): - return awsAwsquery_deserializeErrorInsufficientS3BucketPolicyFault(response, errorBody) - case strings.EqualFold("InvalidClusterState", errorCode): return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) - case strings.EqualFold("InvalidS3BucketNameFault", errorCode): - return awsAwsquery_deserializeErrorInvalidS3BucketNameFault(response, errorBody) + case strings.EqualFold("SnapshotCopyAlreadyDisabledFault", errorCode): + return awsAwsquery_deserializeErrorSnapshotCopyAlreadyDisabledFault(response, errorBody) - case strings.EqualFold("InvalidS3KeyPrefixFault", errorCode): - return awsAwsquery_deserializeErrorInvalidS3KeyPrefixFault(response, errorBody) + case strings.EqualFold("UnauthorizedOperation", errorCode): + return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9520,14 +9476,14 @@ func awsAwsquery_deserializeOpErrorEnableLogging(response *smithyhttp.Response, } } -type awsAwsquery_deserializeOpEnableSnapshotCopy struct { +type awsAwsquery_deserializeOpDisassociateDataShareConsumer struct { } -func (*awsAwsquery_deserializeOpEnableSnapshotCopy) ID() string { +func (*awsAwsquery_deserializeOpDisassociateDataShareConsumer) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpEnableSnapshotCopy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpDisassociateDataShareConsumer) 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) @@ -9541,9 +9497,9 @@ func (m *awsAwsquery_deserializeOpEnableSnapshotCopy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorEnableSnapshotCopy(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorDisassociateDataShareConsumer(response, &metadata) } - output := &EnableSnapshotCopyOutput{} + output := &DisassociateDataShareConsumerOutput{} out.Result = output var buff [1024]byte @@ -9564,7 +9520,7 @@ func (m *awsAwsquery_deserializeOpEnableSnapshotCopy) HandleDeserialize(ctx cont } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("EnableSnapshotCopyResult") + t, err = decoder.GetElement("DisassociateDataShareConsumerResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9576,7 +9532,7 @@ func (m *awsAwsquery_deserializeOpEnableSnapshotCopy) HandleDeserialize(ctx cont } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentEnableSnapshotCopyOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentDisassociateDataShareConsumerOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9590,7 +9546,7 @@ func (m *awsAwsquery_deserializeOpEnableSnapshotCopy) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsquery_deserializeOpErrorEnableSnapshotCopy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorDisassociateDataShareConsumer(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)} @@ -9615,38 +9571,134 @@ func awsAwsquery_deserializeOpErrorEnableSnapshotCopy(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("InvalidDataShareFault", errorCode): + return awsAwsquery_deserializeErrorInvalidDataShareFault(response, errorBody) - case strings.EqualFold("CopyToRegionDisabledFault", errorCode): - return awsAwsquery_deserializeErrorCopyToRegionDisabledFault(response, errorBody) + case strings.EqualFold("InvalidNamespaceFault", errorCode): + return awsAwsquery_deserializeErrorInvalidNamespaceFault(response, errorBody) - case strings.EqualFold("DependentServiceRequestThrottlingFault", errorCode): - return awsAwsquery_deserializeErrorDependentServiceRequestThrottlingFault(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case strings.EqualFold("IncompatibleOrderableOptions", errorCode): - return awsAwsquery_deserializeErrorIncompatibleOrderableOptions(response, errorBody) + } +} - case strings.EqualFold("InvalidClusterState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) +type awsAwsquery_deserializeOpEnableLogging struct { +} - case strings.EqualFold("InvalidRetentionPeriodFault", errorCode): - return awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response, errorBody) +func (*awsAwsquery_deserializeOpEnableLogging) ID() string { + return "OperationDeserializer" +} - case strings.EqualFold("LimitExceededFault", errorCode): - return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody) +func (m *awsAwsquery_deserializeOpEnableLogging) 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 + } - case strings.EqualFold("SnapshotCopyAlreadyEnabledFault", errorCode): - return awsAwsquery_deserializeErrorSnapshotCopyAlreadyEnabledFault(response, errorBody) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - case strings.EqualFold("SnapshotCopyGrantNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorSnapshotCopyGrantNotFoundFault(response, errorBody) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorEnableLogging(response, &metadata) + } + output := &EnableLoggingOutput{} + out.Result = output - case strings.EqualFold("UnauthorizedOperation", errorCode): - return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } - case strings.EqualFold("UnknownSnapshotCopyRegionFault", errorCode): - return awsAwsquery_deserializeErrorUnknownSnapshotCopyRegionFault(response, errorBody) + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("EnableLoggingResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentEnableLoggingOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorEnableLogging(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("BucketNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorBucketNotFoundFault(response, errorBody) + + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("InsufficientS3BucketPolicyFault", errorCode): + return awsAwsquery_deserializeErrorInsufficientS3BucketPolicyFault(response, errorBody) + + case strings.EqualFold("InvalidClusterState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + + case strings.EqualFold("InvalidS3BucketNameFault", errorCode): + return awsAwsquery_deserializeErrorInvalidS3BucketNameFault(response, errorBody) + + case strings.EqualFold("InvalidS3KeyPrefixFault", errorCode): + return awsAwsquery_deserializeErrorInvalidS3KeyPrefixFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9658,14 +9710,14 @@ func awsAwsquery_deserializeOpErrorEnableSnapshotCopy(response *smithyhttp.Respo } } -type awsAwsquery_deserializeOpGetClusterCredentials struct { +type awsAwsquery_deserializeOpEnableSnapshotCopy struct { } -func (*awsAwsquery_deserializeOpGetClusterCredentials) ID() string { +func (*awsAwsquery_deserializeOpEnableSnapshotCopy) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpGetClusterCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpEnableSnapshotCopy) 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) @@ -9679,9 +9731,9 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentials) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetClusterCredentials(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorEnableSnapshotCopy(response, &metadata) } - output := &GetClusterCredentialsOutput{} + output := &EnableSnapshotCopyOutput{} out.Result = output var buff [1024]byte @@ -9702,7 +9754,7 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentials) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetClusterCredentialsResult") + t, err = decoder.GetElement("EnableSnapshotCopyResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9714,7 +9766,7 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentials) HandleDeserialize(ctx c } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetClusterCredentialsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentEnableSnapshotCopyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9728,7 +9780,7 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentials) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsquery_deserializeOpErrorGetClusterCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorEnableSnapshotCopy(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)} @@ -9756,8 +9808,35 @@ func awsAwsquery_deserializeOpErrorGetClusterCredentials(response *smithyhttp.Re case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): - return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + case strings.EqualFold("CopyToRegionDisabledFault", errorCode): + return awsAwsquery_deserializeErrorCopyToRegionDisabledFault(response, errorBody) + + case strings.EqualFold("DependentServiceRequestThrottlingFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceRequestThrottlingFault(response, errorBody) + + case strings.EqualFold("IncompatibleOrderableOptions", errorCode): + return awsAwsquery_deserializeErrorIncompatibleOrderableOptions(response, errorBody) + + case strings.EqualFold("InvalidClusterState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + + case strings.EqualFold("InvalidRetentionPeriodFault", errorCode): + return awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response, errorBody) + + case strings.EqualFold("LimitExceededFault", errorCode): + return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody) + + case strings.EqualFold("SnapshotCopyAlreadyEnabledFault", errorCode): + return awsAwsquery_deserializeErrorSnapshotCopyAlreadyEnabledFault(response, errorBody) + + case strings.EqualFold("SnapshotCopyGrantNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorSnapshotCopyGrantNotFoundFault(response, errorBody) + + case strings.EqualFold("UnauthorizedOperation", errorCode): + return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + + case strings.EqualFold("UnknownSnapshotCopyRegionFault", errorCode): + return awsAwsquery_deserializeErrorUnknownSnapshotCopyRegionFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9769,14 +9848,14 @@ func awsAwsquery_deserializeOpErrorGetClusterCredentials(response *smithyhttp.Re } } -type awsAwsquery_deserializeOpGetClusterCredentialsWithIAM struct { +type awsAwsquery_deserializeOpGetClusterCredentials struct { } -func (*awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) ID() string { +func (*awsAwsquery_deserializeOpGetClusterCredentials) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpGetClusterCredentials) 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) @@ -9790,9 +9869,9 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetClusterCredentialsWithIAM(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorGetClusterCredentials(response, &metadata) } - output := &GetClusterCredentialsWithIAMOutput{} + output := &GetClusterCredentialsOutput{} out.Result = output var buff [1024]byte @@ -9813,7 +9892,7 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) HandleDeserializ } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetClusterCredentialsWithIAMResult") + t, err = decoder.GetElement("GetClusterCredentialsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9825,7 +9904,7 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) HandleDeserializ } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetClusterCredentialsWithIAMOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentGetClusterCredentialsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9839,7 +9918,7 @@ func (m *awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) HandleDeserializ return out, metadata, err } -func awsAwsquery_deserializeOpErrorGetClusterCredentialsWithIAM(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorGetClusterCredentials(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)} @@ -9880,14 +9959,14 @@ func awsAwsquery_deserializeOpErrorGetClusterCredentialsWithIAM(response *smithy } } -type awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions struct { +type awsAwsquery_deserializeOpGetClusterCredentialsWithIAM struct { } -func (*awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) ID() string { +func (*awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpGetClusterCredentialsWithIAM) 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) @@ -9901,9 +9980,9 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) H } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorGetClusterCredentialsWithIAM(response, &metadata) } - output := &GetReservedNodeExchangeConfigurationOptionsOutput{} + output := &GetClusterCredentialsWithIAMOutput{} out.Result = output var buff [1024]byte @@ -9924,7 +10003,7 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) H } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetReservedNodeExchangeConfigurationOptionsResult") + t, err = decoder.GetElement("GetClusterCredentialsWithIAMResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9936,7 +10015,7 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) H } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeConfigurationOptionsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentGetClusterCredentialsWithIAMOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9950,7 +10029,7 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) H return out, metadata, err } -func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorGetClusterCredentialsWithIAM(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)} @@ -9978,24 +10057,6 @@ func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(r case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("ClusterSnapshotNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterSnapshotNotFoundFault(response, errorBody) - - case strings.EqualFold("DependentServiceUnavailableFault", errorCode): - return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) - - case strings.EqualFold("InvalidReservedNodeState", errorCode): - return awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response, errorBody) - - case strings.EqualFold("ReservedNodeAlreadyMigrated", errorCode): - return awsAwsquery_deserializeErrorReservedNodeAlreadyMigratedFault(response, errorBody) - - case strings.EqualFold("ReservedNodeNotFound", errorCode): - return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) - - case strings.EqualFold("ReservedNodeOfferingNotFound", errorCode): - return awsAwsquery_deserializeErrorReservedNodeOfferingNotFoundFault(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) @@ -10009,14 +10070,14 @@ func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(r } } -type awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings struct { +type awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions struct { } -func (*awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) ID() string { +func (*awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeConfigurationOptions) 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) @@ -10030,9 +10091,9 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetReservedNodeExchangeOfferings(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(response, &metadata) } - output := &GetReservedNodeExchangeOfferingsOutput{} + output := &GetReservedNodeExchangeConfigurationOptionsOutput{} out.Result = output var buff [1024]byte @@ -10053,7 +10114,7 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) HandleDeseri } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetReservedNodeExchangeOfferingsResult") + t, err = decoder.GetElement("GetReservedNodeExchangeConfigurationOptionsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10065,7 +10126,7 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) HandleDeseri } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeOfferingsOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeConfigurationOptionsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10079,7 +10140,7 @@ func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) HandleDeseri return out, metadata, err } -func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeConfigurationOptions(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)} @@ -10104,6 +10165,12 @@ func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeOfferings(response *sm } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("ClusterSnapshotNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterSnapshotNotFoundFault(response, errorBody) + case strings.EqualFold("DependentServiceUnavailableFault", errorCode): return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) @@ -10132,14 +10199,14 @@ func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeOfferings(response *sm } } -type awsAwsquery_deserializeOpModifyAquaConfiguration struct { +type awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings struct { } -func (*awsAwsquery_deserializeOpModifyAquaConfiguration) ID() string { +func (*awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyAquaConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpGetReservedNodeExchangeOfferings) 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) @@ -10153,9 +10220,9 @@ func (m *awsAwsquery_deserializeOpModifyAquaConfiguration) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyAquaConfiguration(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorGetReservedNodeExchangeOfferings(response, &metadata) } - output := &ModifyAquaConfigurationOutput{} + output := &GetReservedNodeExchangeOfferingsOutput{} out.Result = output var buff [1024]byte @@ -10176,7 +10243,7 @@ func (m *awsAwsquery_deserializeOpModifyAquaConfiguration) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyAquaConfigurationResult") + t, err = decoder.GetElement("GetReservedNodeExchangeOfferingsResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10188,7 +10255,7 @@ func (m *awsAwsquery_deserializeOpModifyAquaConfiguration) HandleDeserialize(ctx } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyAquaConfigurationOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeOfferingsOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10202,7 +10269,7 @@ func (m *awsAwsquery_deserializeOpModifyAquaConfiguration) HandleDeserialize(ctx return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyAquaConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorGetReservedNodeExchangeOfferings(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)} @@ -10227,11 +10294,20 @@ func awsAwsquery_deserializeOpErrorModifyAquaConfiguration(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("DependentServiceUnavailableFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceUnavailableFault(response, errorBody) - case strings.EqualFold("InvalidClusterState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + case strings.EqualFold("InvalidReservedNodeState", errorCode): + return awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response, errorBody) + + case strings.EqualFold("ReservedNodeAlreadyMigrated", errorCode): + return awsAwsquery_deserializeErrorReservedNodeAlreadyMigratedFault(response, errorBody) + + case strings.EqualFold("ReservedNodeNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeNotFoundFault(response, errorBody) + + case strings.EqualFold("ReservedNodeOfferingNotFound", errorCode): + return awsAwsquery_deserializeErrorReservedNodeOfferingNotFoundFault(response, errorBody) case strings.EqualFold("UnsupportedOperation", errorCode): return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) @@ -10246,14 +10322,14 @@ func awsAwsquery_deserializeOpErrorModifyAquaConfiguration(response *smithyhttp. } } -type awsAwsquery_deserializeOpModifyAuthenticationProfile struct { +type awsAwsquery_deserializeOpGetResourcePolicy struct { } -func (*awsAwsquery_deserializeOpModifyAuthenticationProfile) ID() string { +func (*awsAwsquery_deserializeOpGetResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyAuthenticationProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpGetResourcePolicy) 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) @@ -10267,9 +10343,9 @@ func (m *awsAwsquery_deserializeOpModifyAuthenticationProfile) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyAuthenticationProfile(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorGetResourcePolicy(response, &metadata) } - output := &ModifyAuthenticationProfileOutput{} + output := &GetResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -10290,7 +10366,7 @@ func (m *awsAwsquery_deserializeOpModifyAuthenticationProfile) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyAuthenticationProfileResult") + t, err = decoder.GetElement("GetResourcePolicyResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10302,7 +10378,7 @@ func (m *awsAwsquery_deserializeOpModifyAuthenticationProfile) HandleDeserialize } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyAuthenticationProfileOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentGetResourcePolicyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10316,7 +10392,7 @@ func (m *awsAwsquery_deserializeOpModifyAuthenticationProfile) HandleDeserialize return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyAuthenticationProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorGetResourcePolicy(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)} @@ -10341,14 +10417,14 @@ func awsAwsquery_deserializeOpErrorModifyAuthenticationProfile(response *smithyh } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("AuthenticationProfileNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorAuthenticationProfileNotFoundFault(response, errorBody) + case strings.EqualFold("InvalidPolicyFault", errorCode): + return awsAwsquery_deserializeErrorInvalidPolicyFault(response, errorBody) - case strings.EqualFold("AuthenticationProfileQuotaExceededFault", errorCode): - return awsAwsquery_deserializeErrorAuthenticationProfileQuotaExceededFault(response, errorBody) + case strings.EqualFold("ResourceNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorResourceNotFoundFault(response, errorBody) - case strings.EqualFold("InvalidAuthenticationProfileRequestFault", errorCode): - return awsAwsquery_deserializeErrorInvalidAuthenticationProfileRequestFault(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10360,14 +10436,14 @@ func awsAwsquery_deserializeOpErrorModifyAuthenticationProfile(response *smithyh } } -type awsAwsquery_deserializeOpModifyCluster struct { +type awsAwsquery_deserializeOpModifyAquaConfiguration struct { } -func (*awsAwsquery_deserializeOpModifyCluster) ID() string { +func (*awsAwsquery_deserializeOpModifyAquaConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyAquaConfiguration) 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) @@ -10381,9 +10457,9 @@ func (m *awsAwsquery_deserializeOpModifyCluster) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyCluster(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyAquaConfiguration(response, &metadata) } - output := &ModifyClusterOutput{} + output := &ModifyAquaConfigurationOutput{} out.Result = output var buff [1024]byte @@ -10404,7 +10480,7 @@ func (m *awsAwsquery_deserializeOpModifyCluster) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyClusterResult") + t, err = decoder.GetElement("ModifyAquaConfigurationResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10416,7 +10492,7 @@ func (m *awsAwsquery_deserializeOpModifyCluster) HandleDeserialize(ctx context.C } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyClusterOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentModifyAquaConfigurationOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10430,7 +10506,7 @@ func (m *awsAwsquery_deserializeOpModifyCluster) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyAquaConfiguration(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)} @@ -10455,69 +10531,15 @@ func awsAwsquery_deserializeOpErrorModifyCluster(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterAlreadyExists", errorCode): - return awsAwsquery_deserializeErrorClusterAlreadyExistsFault(response, errorBody) - case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("ClusterParameterGroupNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterParameterGroupNotFoundFault(response, errorBody) - - case strings.EqualFold("ClusterSecurityGroupNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterSecurityGroupNotFoundFault(response, errorBody) - - case strings.EqualFold("CustomCnameAssociationFault", errorCode): - return awsAwsquery_deserializeErrorCustomCnameAssociationFault(response, errorBody) - - case strings.EqualFold("DependentServiceRequestThrottlingFault", errorCode): - return awsAwsquery_deserializeErrorDependentServiceRequestThrottlingFault(response, errorBody) - - case strings.EqualFold("HsmClientCertificateNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorHsmClientCertificateNotFoundFault(response, errorBody) - - case strings.EqualFold("HsmConfigurationNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorHsmConfigurationNotFoundFault(response, errorBody) - - case strings.EqualFold("InsufficientClusterCapacity", errorCode): - return awsAwsquery_deserializeErrorInsufficientClusterCapacityFault(response, errorBody) - - case strings.EqualFold("InvalidClusterSecurityGroupState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterSecurityGroupStateFault(response, errorBody) - case strings.EqualFold("InvalidClusterState", errorCode): return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) - case strings.EqualFold("InvalidClusterTrack", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterTrackFault(response, errorBody) - - case strings.EqualFold("InvalidElasticIpFault", errorCode): - return awsAwsquery_deserializeErrorInvalidElasticIpFault(response, errorBody) - - case strings.EqualFold("InvalidRetentionPeriodFault", errorCode): - return awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response, errorBody) - - case strings.EqualFold("LimitExceededFault", errorCode): - return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody) - - case strings.EqualFold("NumberOfNodesPerClusterLimitExceeded", errorCode): - return awsAwsquery_deserializeErrorNumberOfNodesPerClusterLimitExceededFault(response, errorBody) - - case strings.EqualFold("NumberOfNodesQuotaExceeded", errorCode): - return awsAwsquery_deserializeErrorNumberOfNodesQuotaExceededFault(response, errorBody) - - case strings.EqualFold("TableLimitExceeded", errorCode): - return awsAwsquery_deserializeErrorTableLimitExceededFault(response, errorBody) - - case strings.EqualFold("UnauthorizedOperation", errorCode): - return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) - case strings.EqualFold("UnsupportedOperation", errorCode): return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) - case strings.EqualFold("UnsupportedOptionFault", errorCode): - return awsAwsquery_deserializeErrorUnsupportedOptionFault(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10528,14 +10550,14 @@ func awsAwsquery_deserializeOpErrorModifyCluster(response *smithyhttp.Response, } } -type awsAwsquery_deserializeOpModifyClusterDbRevision struct { +type awsAwsquery_deserializeOpModifyAuthenticationProfile struct { } -func (*awsAwsquery_deserializeOpModifyClusterDbRevision) ID() string { +func (*awsAwsquery_deserializeOpModifyAuthenticationProfile) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyClusterDbRevision) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyAuthenticationProfile) 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) @@ -10549,9 +10571,9 @@ func (m *awsAwsquery_deserializeOpModifyClusterDbRevision) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterDbRevision(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyAuthenticationProfile(response, &metadata) } - output := &ModifyClusterDbRevisionOutput{} + output := &ModifyAuthenticationProfileOutput{} out.Result = output var buff [1024]byte @@ -10572,7 +10594,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterDbRevision) HandleDeserialize(ctx } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyClusterDbRevisionResult") + t, err = decoder.GetElement("ModifyAuthenticationProfileResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10584,7 +10606,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterDbRevision) HandleDeserialize(ctx } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyClusterDbRevisionOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentModifyAuthenticationProfileOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10598,7 +10620,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterDbRevision) HandleDeserialize(ctx return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyClusterDbRevision(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyAuthenticationProfile(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)} @@ -10623,14 +10645,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterDbRevision(response *smithyhttp. } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("AuthenticationProfileNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorAuthenticationProfileNotFoundFault(response, errorBody) - case strings.EqualFold("ClusterOnLatestRevision", errorCode): - return awsAwsquery_deserializeErrorClusterOnLatestRevisionFault(response, errorBody) + case strings.EqualFold("AuthenticationProfileQuotaExceededFault", errorCode): + return awsAwsquery_deserializeErrorAuthenticationProfileQuotaExceededFault(response, errorBody) - case strings.EqualFold("InvalidClusterState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + case strings.EqualFold("InvalidAuthenticationProfileRequestFault", errorCode): + return awsAwsquery_deserializeErrorInvalidAuthenticationProfileRequestFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10642,14 +10664,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterDbRevision(response *smithyhttp. } } -type awsAwsquery_deserializeOpModifyClusterIamRoles struct { +type awsAwsquery_deserializeOpModifyCluster struct { } -func (*awsAwsquery_deserializeOpModifyClusterIamRoles) ID() string { +func (*awsAwsquery_deserializeOpModifyCluster) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyClusterIamRoles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyCluster) 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) @@ -10663,9 +10685,9 @@ func (m *awsAwsquery_deserializeOpModifyClusterIamRoles) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterIamRoles(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyCluster(response, &metadata) } - output := &ModifyClusterIamRolesOutput{} + output := &ModifyClusterOutput{} out.Result = output var buff [1024]byte @@ -10686,7 +10708,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterIamRoles) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyClusterIamRolesResult") + t, err = decoder.GetElement("ModifyClusterResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10698,7 +10720,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterIamRoles) HandleDeserialize(ctx c } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyClusterIamRolesOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentModifyClusterOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10712,7 +10734,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterIamRoles) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyClusterIamRoles(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyCluster(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)} @@ -10737,12 +10759,69 @@ func awsAwsquery_deserializeOpErrorModifyClusterIamRoles(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) switch { + case strings.EqualFold("ClusterAlreadyExists", errorCode): + return awsAwsquery_deserializeErrorClusterAlreadyExistsFault(response, errorBody) + case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("ClusterParameterGroupNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterParameterGroupNotFoundFault(response, errorBody) + + case strings.EqualFold("ClusterSecurityGroupNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterSecurityGroupNotFoundFault(response, errorBody) + + case strings.EqualFold("CustomCnameAssociationFault", errorCode): + return awsAwsquery_deserializeErrorCustomCnameAssociationFault(response, errorBody) + + case strings.EqualFold("DependentServiceRequestThrottlingFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceRequestThrottlingFault(response, errorBody) + + case strings.EqualFold("HsmClientCertificateNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorHsmClientCertificateNotFoundFault(response, errorBody) + + case strings.EqualFold("HsmConfigurationNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorHsmConfigurationNotFoundFault(response, errorBody) + + case strings.EqualFold("InsufficientClusterCapacity", errorCode): + return awsAwsquery_deserializeErrorInsufficientClusterCapacityFault(response, errorBody) + + case strings.EqualFold("InvalidClusterSecurityGroupState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterSecurityGroupStateFault(response, errorBody) + case strings.EqualFold("InvalidClusterState", errorCode): return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + case strings.EqualFold("InvalidClusterTrack", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterTrackFault(response, errorBody) + + case strings.EqualFold("InvalidElasticIpFault", errorCode): + return awsAwsquery_deserializeErrorInvalidElasticIpFault(response, errorBody) + + case strings.EqualFold("InvalidRetentionPeriodFault", errorCode): + return awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response, errorBody) + + case strings.EqualFold("LimitExceededFault", errorCode): + return awsAwsquery_deserializeErrorLimitExceededFault(response, errorBody) + + case strings.EqualFold("NumberOfNodesPerClusterLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorNumberOfNodesPerClusterLimitExceededFault(response, errorBody) + + case strings.EqualFold("NumberOfNodesQuotaExceeded", errorCode): + return awsAwsquery_deserializeErrorNumberOfNodesQuotaExceededFault(response, errorBody) + + case strings.EqualFold("TableLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorTableLimitExceededFault(response, errorBody) + + case strings.EqualFold("UnauthorizedOperation", errorCode): + return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) + + case strings.EqualFold("UnsupportedOptionFault", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOptionFault(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10753,14 +10832,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterIamRoles(response *smithyhttp.Re } } -type awsAwsquery_deserializeOpModifyClusterMaintenance struct { +type awsAwsquery_deserializeOpModifyClusterDbRevision struct { } -func (*awsAwsquery_deserializeOpModifyClusterMaintenance) ID() string { +func (*awsAwsquery_deserializeOpModifyClusterDbRevision) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyClusterMaintenance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyClusterDbRevision) 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) @@ -10774,9 +10853,9 @@ func (m *awsAwsquery_deserializeOpModifyClusterMaintenance) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterMaintenance(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterDbRevision(response, &metadata) } - output := &ModifyClusterMaintenanceOutput{} + output := &ModifyClusterDbRevisionOutput{} out.Result = output var buff [1024]byte @@ -10797,7 +10876,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterMaintenance) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyClusterMaintenanceResult") + t, err = decoder.GetElement("ModifyClusterDbRevisionResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10809,7 +10888,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterMaintenance) HandleDeserialize(ct } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyClusterMaintenanceOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentModifyClusterDbRevisionOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10823,7 +10902,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterMaintenance) HandleDeserialize(ct return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyClusterMaintenance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyClusterDbRevision(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)} @@ -10851,6 +10930,9 @@ func awsAwsquery_deserializeOpErrorModifyClusterMaintenance(response *smithyhttp case strings.EqualFold("ClusterNotFound", errorCode): return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("ClusterOnLatestRevision", errorCode): + return awsAwsquery_deserializeErrorClusterOnLatestRevisionFault(response, errorBody) + case strings.EqualFold("InvalidClusterState", errorCode): return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) @@ -10864,14 +10946,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterMaintenance(response *smithyhttp } } -type awsAwsquery_deserializeOpModifyClusterParameterGroup struct { +type awsAwsquery_deserializeOpModifyClusterIamRoles struct { } -func (*awsAwsquery_deserializeOpModifyClusterParameterGroup) ID() string { +func (*awsAwsquery_deserializeOpModifyClusterIamRoles) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyClusterParameterGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyClusterIamRoles) 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) @@ -10885,9 +10967,9 @@ func (m *awsAwsquery_deserializeOpModifyClusterParameterGroup) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterParameterGroup(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterIamRoles(response, &metadata) } - output := &ModifyClusterParameterGroupOutput{} + output := &ModifyClusterIamRolesOutput{} out.Result = output var buff [1024]byte @@ -10908,7 +10990,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterParameterGroup) HandleDeserialize } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyClusterParameterGroupResult") + t, err = decoder.GetElement("ModifyClusterIamRolesResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10920,7 +11002,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterParameterGroup) HandleDeserialize } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyClusterParameterGroupOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentModifyClusterIamRolesOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10934,7 +11016,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterParameterGroup) HandleDeserialize return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyClusterParameterGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyClusterIamRoles(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)} @@ -10959,11 +11041,11 @@ func awsAwsquery_deserializeOpErrorModifyClusterParameterGroup(response *smithyh } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterParameterGroupNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterParameterGroupNotFoundFault(response, errorBody) + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("InvalidClusterParameterGroupState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterParameterGroupStateFault(response, errorBody) + case strings.EqualFold("InvalidClusterState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10975,14 +11057,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterParameterGroup(response *smithyh } } -type awsAwsquery_deserializeOpModifyClusterSnapshot struct { +type awsAwsquery_deserializeOpModifyClusterMaintenance struct { } -func (*awsAwsquery_deserializeOpModifyClusterSnapshot) ID() string { +func (*awsAwsquery_deserializeOpModifyClusterMaintenance) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyClusterSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyClusterMaintenance) 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) @@ -10996,9 +11078,9 @@ func (m *awsAwsquery_deserializeOpModifyClusterSnapshot) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterSnapshot(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterMaintenance(response, &metadata) } - output := &ModifyClusterSnapshotOutput{} + output := &ModifyClusterMaintenanceOutput{} out.Result = output var buff [1024]byte @@ -11019,7 +11101,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterSnapshot) HandleDeserialize(ctx c } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyClusterSnapshotResult") + t, err = decoder.GetElement("ModifyClusterMaintenanceResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11031,7 +11113,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterSnapshot) HandleDeserialize(ctx c } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyClusterSnapshotOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentModifyClusterMaintenanceOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11045,7 +11127,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterSnapshot) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyClusterSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyClusterMaintenance(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)} @@ -11070,14 +11152,11 @@ func awsAwsquery_deserializeOpErrorModifyClusterSnapshot(response *smithyhttp.Re } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterSnapshotNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterSnapshotNotFoundFault(response, errorBody) - - case strings.EqualFold("InvalidClusterSnapshotState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterSnapshotStateFault(response, errorBody) + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - case strings.EqualFold("InvalidRetentionPeriodFault", errorCode): - return awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response, errorBody) + case strings.EqualFold("InvalidClusterState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11089,14 +11168,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterSnapshot(response *smithyhttp.Re } } -type awsAwsquery_deserializeOpModifyClusterSnapshotSchedule struct { +type awsAwsquery_deserializeOpModifyClusterParameterGroup struct { } -func (*awsAwsquery_deserializeOpModifyClusterSnapshotSchedule) ID() string { +func (*awsAwsquery_deserializeOpModifyClusterParameterGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyClusterSnapshotSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyClusterParameterGroup) 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) @@ -11110,21 +11189,56 @@ func (m *awsAwsquery_deserializeOpModifyClusterSnapshotSchedule) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterSnapshotSchedule(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterParameterGroup(response, &metadata) } - output := &ModifyClusterSnapshotScheduleOutput{} + output := &ModifyClusterParameterGroupOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ModifyClusterParameterGroupResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentModifyClusterParameterGroupOutput(&output, 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 out, metadata, err + } + return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyClusterSnapshotSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyClusterParameterGroup(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)} @@ -11149,14 +11263,11 @@ func awsAwsquery_deserializeOpErrorModifyClusterSnapshotSchedule(response *smith } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) - - case strings.EqualFold("InvalidClusterSnapshotScheduleState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterSnapshotScheduleStateFault(response, errorBody) + case strings.EqualFold("ClusterParameterGroupNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterParameterGroupNotFoundFault(response, errorBody) - case strings.EqualFold("SnapshotScheduleNotFound", errorCode): - return awsAwsquery_deserializeErrorSnapshotScheduleNotFoundFault(response, errorBody) + case strings.EqualFold("InvalidClusterParameterGroupState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterParameterGroupStateFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11168,14 +11279,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterSnapshotSchedule(response *smith } } -type awsAwsquery_deserializeOpModifyClusterSubnetGroup struct { +type awsAwsquery_deserializeOpModifyClusterSnapshot struct { } -func (*awsAwsquery_deserializeOpModifyClusterSubnetGroup) ID() string { +func (*awsAwsquery_deserializeOpModifyClusterSnapshot) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyClusterSubnetGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyClusterSnapshot) 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) @@ -11189,9 +11300,9 @@ func (m *awsAwsquery_deserializeOpModifyClusterSubnetGroup) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterSubnetGroup(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterSnapshot(response, &metadata) } - output := &ModifyClusterSubnetGroupOutput{} + output := &ModifyClusterSnapshotOutput{} out.Result = output var buff [1024]byte @@ -11212,7 +11323,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterSubnetGroup) HandleDeserialize(ct } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyClusterSubnetGroupResult") + t, err = decoder.GetElement("ModifyClusterSnapshotResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11224,7 +11335,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterSubnetGroup) HandleDeserialize(ct } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyClusterSubnetGroupOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentModifyClusterSnapshotOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11238,7 +11349,7 @@ func (m *awsAwsquery_deserializeOpModifyClusterSubnetGroup) HandleDeserialize(ct return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyClusterSubnetGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyClusterSnapshot(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)} @@ -11263,23 +11374,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterSubnetGroup(response *smithyhttp } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterSubnetGroupNotFoundFault", errorCode): - return awsAwsquery_deserializeErrorClusterSubnetGroupNotFoundFault(response, errorBody) - - case strings.EqualFold("ClusterSubnetQuotaExceededFault", errorCode): - return awsAwsquery_deserializeErrorClusterSubnetQuotaExceededFault(response, errorBody) - - case strings.EqualFold("DependentServiceRequestThrottlingFault", errorCode): - return awsAwsquery_deserializeErrorDependentServiceRequestThrottlingFault(response, errorBody) - - case strings.EqualFold("InvalidSubnet", errorCode): - return awsAwsquery_deserializeErrorInvalidSubnet(response, errorBody) + case strings.EqualFold("ClusterSnapshotNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterSnapshotNotFoundFault(response, errorBody) - case strings.EqualFold("SubnetAlreadyInUse", errorCode): - return awsAwsquery_deserializeErrorSubnetAlreadyInUse(response, errorBody) + case strings.EqualFold("InvalidClusterSnapshotState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterSnapshotStateFault(response, errorBody) - case strings.EqualFold("UnauthorizedOperation", errorCode): - return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + case strings.EqualFold("InvalidRetentionPeriodFault", errorCode): + return awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11291,14 +11393,14 @@ func awsAwsquery_deserializeOpErrorModifyClusterSubnetGroup(response *smithyhttp } } -type awsAwsquery_deserializeOpModifyCustomDomainAssociation struct { +type awsAwsquery_deserializeOpModifyClusterSnapshotSchedule struct { } -func (*awsAwsquery_deserializeOpModifyCustomDomainAssociation) ID() string { +func (*awsAwsquery_deserializeOpModifyClusterSnapshotSchedule) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpModifyCustomDomainAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpModifyClusterSnapshotSchedule) 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) @@ -11312,56 +11414,258 @@ func (m *awsAwsquery_deserializeOpModifyCustomDomainAssociation) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorModifyCustomDomainAssociation(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterSnapshotSchedule(response, &metadata) } - output := &ModifyCustomDomainAssociationOutput{} + output := &ModifyClusterSnapshotScheduleOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("ModifyCustomDomainAssociationResult") - 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 - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentModifyCustomDomainAssociationOutput(&output, 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(), + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsquery_deserializeOpErrorModifyCustomDomainAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorModifyClusterSnapshotSchedule(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("InvalidClusterSnapshotScheduleState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterSnapshotScheduleStateFault(response, errorBody) + + case strings.EqualFold("SnapshotScheduleNotFound", errorCode): + return awsAwsquery_deserializeErrorSnapshotScheduleNotFoundFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpModifyClusterSubnetGroup struct { +} + +func (*awsAwsquery_deserializeOpModifyClusterSubnetGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpModifyClusterSubnetGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorModifyClusterSubnetGroup(response, &metadata) + } + output := &ModifyClusterSubnetGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ModifyClusterSubnetGroupResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentModifyClusterSubnetGroupOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorModifyClusterSubnetGroup(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ClusterSubnetGroupNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorClusterSubnetGroupNotFoundFault(response, errorBody) + + case strings.EqualFold("ClusterSubnetQuotaExceededFault", errorCode): + return awsAwsquery_deserializeErrorClusterSubnetQuotaExceededFault(response, errorBody) + + case strings.EqualFold("DependentServiceRequestThrottlingFault", errorCode): + return awsAwsquery_deserializeErrorDependentServiceRequestThrottlingFault(response, errorBody) + + case strings.EqualFold("InvalidSubnet", errorCode): + return awsAwsquery_deserializeErrorInvalidSubnet(response, errorBody) + + case strings.EqualFold("SubnetAlreadyInUse", errorCode): + return awsAwsquery_deserializeErrorSubnetAlreadyInUse(response, errorBody) + + case strings.EqualFold("UnauthorizedOperation", errorCode): + return awsAwsquery_deserializeErrorUnauthorizedOperation(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpModifyCustomDomainAssociation struct { +} + +func (*awsAwsquery_deserializeOpModifyCustomDomainAssociation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpModifyCustomDomainAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorModifyCustomDomainAssociation(response, &metadata) + } + output := &ModifyCustomDomainAssociationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ModifyCustomDomainAssociationResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentModifyCustomDomainAssociationOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorModifyCustomDomainAssociation(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)} @@ -12356,14 +12660,14 @@ func awsAwsquery_deserializeOpErrorPurchaseReservedNodeOffering(response *smithy } } -type awsAwsquery_deserializeOpRebootCluster struct { +type awsAwsquery_deserializeOpPutResourcePolicy struct { } -func (*awsAwsquery_deserializeOpRebootCluster) ID() string { +func (*awsAwsquery_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpRebootCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpPutResourcePolicy) 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) @@ -12377,9 +12681,9 @@ func (m *awsAwsquery_deserializeOpRebootCluster) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorRebootCluster(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorPutResourcePolicy(response, &metadata) } - output := &RebootClusterOutput{} + output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -12400,7 +12704,7 @@ func (m *awsAwsquery_deserializeOpRebootCluster) HandleDeserialize(ctx context.C } decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("RebootClusterResult") + t, err = decoder.GetElement("PutResourcePolicyResult") if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12412,7 +12716,7 @@ func (m *awsAwsquery_deserializeOpRebootCluster) HandleDeserialize(ctx context.C } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentRebootClusterOutput(&output, decoder) + err = awsAwsquery_deserializeOpDocumentPutResourcePolicyOutput(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12426,7 +12730,7 @@ func (m *awsAwsquery_deserializeOpRebootCluster) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsquery_deserializeOpErrorRebootCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsquery_deserializeOpErrorPutResourcePolicy(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)} @@ -12451,11 +12755,17 @@ func awsAwsquery_deserializeOpErrorRebootCluster(response *smithyhttp.Response, } errorBody.Seek(0, io.SeekStart) switch { - case strings.EqualFold("ClusterNotFound", errorCode): - return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + case strings.EqualFold("ConflictPolicyUpdateFault", errorCode): + return awsAwsquery_deserializeErrorConflictPolicyUpdateFault(response, errorBody) - case strings.EqualFold("InvalidClusterState", errorCode): - return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + case strings.EqualFold("InvalidPolicyFault", errorCode): + return awsAwsquery_deserializeErrorInvalidPolicyFault(response, errorBody) + + case strings.EqualFold("ResourceNotFoundFault", errorCode): + return awsAwsquery_deserializeErrorResourceNotFoundFault(response, errorBody) + + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsAwsquery_deserializeErrorUnsupportedOperationFault(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12467,14 +12777,14 @@ func awsAwsquery_deserializeOpErrorRebootCluster(response *smithyhttp.Response, } } -type awsAwsquery_deserializeOpRejectDataShare struct { +type awsAwsquery_deserializeOpRebootCluster struct { } -func (*awsAwsquery_deserializeOpRejectDataShare) ID() string { +func (*awsAwsquery_deserializeOpRebootCluster) ID() string { return "OperationDeserializer" } -func (m *awsAwsquery_deserializeOpRejectDataShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsquery_deserializeOpRebootCluster) 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) @@ -12488,9 +12798,120 @@ func (m *awsAwsquery_deserializeOpRejectDataShare) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorRejectDataShare(response, &metadata) + return out, metadata, awsAwsquery_deserializeOpErrorRebootCluster(response, &metadata) } - output := &RejectDataShareOutput{} + output := &RebootClusterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("RebootClusterResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentRebootClusterOutput(&output, 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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorRebootCluster(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("ClusterNotFound", errorCode): + return awsAwsquery_deserializeErrorClusterNotFoundFault(response, errorBody) + + case strings.EqualFold("InvalidClusterState", errorCode): + return awsAwsquery_deserializeErrorInvalidClusterStateFault(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsquery_deserializeOpRejectDataShare struct { +} + +func (*awsAwsquery_deserializeOpRejectDataShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpRejectDataShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsquery_deserializeOpErrorRejectDataShare(response, &metadata) + } + output := &RejectDataShareOutput{} out.Result = output var buff [1024]byte @@ -15094,6 +15515,50 @@ func awsAwsquery_deserializeErrorClusterSubnetQuotaExceededFault(response *smith return output } +func awsAwsquery_deserializeErrorConflictPolicyUpdateFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictPolicyUpdateFault{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentConflictPolicyUpdateFault(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorCopyToRegionDisabledFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.CopyToRegionDisabledFault{} var buff [1024]byte @@ -16106,6 +16571,50 @@ func awsAwsquery_deserializeErrorInsufficientS3BucketPolicyFault(response *smith return output } +func awsAwsquery_deserializeErrorIntegrationNotFoundFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IntegrationNotFoundFault{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentIntegrationNotFoundFault(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorInvalidAuthenticationProfileRequestFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidAuthenticationProfileRequestFault{} var buff [1024]byte @@ -16810,8 +17319,8 @@ func awsAwsquery_deserializeErrorInvalidNamespaceFault(response *smithyhttp.Resp return output } -func awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidReservedNodeStateFault{} +func awsAwsquery_deserializeErrorInvalidPolicyFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidPolicyFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -16841,7 +17350,7 @@ func awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidReservedNodeStateFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidPolicyFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16854,8 +17363,8 @@ func awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response *smithyh return output } -func awsAwsquery_deserializeErrorInvalidRestoreFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRestoreFault{} +func awsAwsquery_deserializeErrorInvalidReservedNodeStateFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidReservedNodeStateFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -16885,7 +17394,7 @@ func awsAwsquery_deserializeErrorInvalidRestoreFault(response *smithyhttp.Respon } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidRestoreFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidReservedNodeStateFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16898,8 +17407,8 @@ func awsAwsquery_deserializeErrorInvalidRestoreFault(response *smithyhttp.Respon return output } -func awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRetentionPeriodFault{} +func awsAwsquery_deserializeErrorInvalidRestoreFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRestoreFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -16929,7 +17438,7 @@ func awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response *smithyhtt } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidRetentionPeriodFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidRestoreFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16942,8 +17451,8 @@ func awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response *smithyhtt return output } -func awsAwsquery_deserializeErrorInvalidS3BucketNameFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidS3BucketNameFault{} +func awsAwsquery_deserializeErrorInvalidRetentionPeriodFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRetentionPeriodFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -16973,7 +17482,7 @@ func awsAwsquery_deserializeErrorInvalidS3BucketNameFault(response *smithyhttp.R } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidS3BucketNameFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidRetentionPeriodFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -16986,8 +17495,8 @@ func awsAwsquery_deserializeErrorInvalidS3BucketNameFault(response *smithyhttp.R return output } -func awsAwsquery_deserializeErrorInvalidS3KeyPrefixFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidS3KeyPrefixFault{} +func awsAwsquery_deserializeErrorInvalidS3BucketNameFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidS3BucketNameFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17017,7 +17526,7 @@ func awsAwsquery_deserializeErrorInvalidS3KeyPrefixFault(response *smithyhttp.Re } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidS3KeyPrefixFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidS3BucketNameFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17030,8 +17539,8 @@ func awsAwsquery_deserializeErrorInvalidS3KeyPrefixFault(response *smithyhttp.Re return output } -func awsAwsquery_deserializeErrorInvalidScheduledActionFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidScheduledActionFault{} +func awsAwsquery_deserializeErrorInvalidS3KeyPrefixFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidS3KeyPrefixFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17061,7 +17570,7 @@ func awsAwsquery_deserializeErrorInvalidScheduledActionFault(response *smithyhtt } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidScheduledActionFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidS3KeyPrefixFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17074,8 +17583,8 @@ func awsAwsquery_deserializeErrorInvalidScheduledActionFault(response *smithyhtt return output } -func awsAwsquery_deserializeErrorInvalidScheduleFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidScheduleFault{} +func awsAwsquery_deserializeErrorInvalidScheduledActionFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidScheduledActionFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17105,7 +17614,7 @@ func awsAwsquery_deserializeErrorInvalidScheduleFault(response *smithyhttp.Respo } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidScheduleFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidScheduledActionFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17118,8 +17627,8 @@ func awsAwsquery_deserializeErrorInvalidScheduleFault(response *smithyhttp.Respo return output } -func awsAwsquery_deserializeErrorInvalidSnapshotCopyGrantStateFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidSnapshotCopyGrantStateFault{} +func awsAwsquery_deserializeErrorInvalidScheduleFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidScheduleFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17149,7 +17658,7 @@ func awsAwsquery_deserializeErrorInvalidSnapshotCopyGrantStateFault(response *sm } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidSnapshotCopyGrantStateFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidScheduleFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17162,8 +17671,8 @@ func awsAwsquery_deserializeErrorInvalidSnapshotCopyGrantStateFault(response *sm return output } -func awsAwsquery_deserializeErrorInvalidSubnet(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidSubnet{} +func awsAwsquery_deserializeErrorInvalidSnapshotCopyGrantStateFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidSnapshotCopyGrantStateFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17193,7 +17702,7 @@ func awsAwsquery_deserializeErrorInvalidSubnet(response *smithyhttp.Response, er } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidSubnet(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidSnapshotCopyGrantStateFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17206,8 +17715,8 @@ func awsAwsquery_deserializeErrorInvalidSubnet(response *smithyhttp.Response, er return output } -func awsAwsquery_deserializeErrorInvalidSubscriptionStateFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidSubscriptionStateFault{} +func awsAwsquery_deserializeErrorInvalidSubnet(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidSubnet{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17237,7 +17746,7 @@ func awsAwsquery_deserializeErrorInvalidSubscriptionStateFault(response *smithyh } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidSubscriptionStateFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidSubnet(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17250,8 +17759,8 @@ func awsAwsquery_deserializeErrorInvalidSubscriptionStateFault(response *smithyh return output } -func awsAwsquery_deserializeErrorInvalidTableRestoreArgumentFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidTableRestoreArgumentFault{} +func awsAwsquery_deserializeErrorInvalidSubscriptionStateFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidSubscriptionStateFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -17281,7 +17790,7 @@ func awsAwsquery_deserializeErrorInvalidTableRestoreArgumentFault(response *smit } decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidTableRestoreArgumentFault(&output, decoder) + err = awsAwsquery_deserializeDocumentInvalidSubscriptionStateFault(&output, decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -17294,8 +17803,52 @@ func awsAwsquery_deserializeErrorInvalidTableRestoreArgumentFault(response *smit return output } -func awsAwsquery_deserializeErrorInvalidTagFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidTagFault{} +func awsAwsquery_deserializeErrorInvalidTableRestoreArgumentFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTableRestoreArgumentFault{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentInvalidTableRestoreArgumentFault(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + +func awsAwsquery_deserializeErrorInvalidTagFault(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTagFault{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) @@ -24321,6 +24874,55 @@ func awsAwsquery_deserializeDocumentClusterVersionListUnwrapped(v *[]types.Clust *v = sv return nil } +func awsAwsquery_deserializeDocumentConflictPolicyUpdateFault(v **types.ConflictPolicyUpdateFault, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ConflictPolicyUpdateFault + if *v == nil { + sv = &types.ConflictPolicyUpdateFault{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentCopyToRegionDisabledFault(v **types.CopyToRegionDisabledFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -28141,6 +28743,185 @@ func awsAwsquery_deserializeDocumentImportTablesNotStartedUnwrapped(v *[]string, *v = sv return nil } +func awsAwsquery_deserializeDocumentInboundIntegration(v **types.InboundIntegration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InboundIntegration + if *v == nil { + sv = &types.InboundIntegration{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("CreateTime", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + + case strings.EqualFold("Errors", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentIntegrationErrorList(&sv.Errors, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("IntegrationArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IntegrationArn = ptr.String(xtv) + } + + case strings.EqualFold("SourceArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourceArn = ptr.String(xtv) + } + + case strings.EqualFold("Status", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Status = types.ZeroETLIntegrationStatus(xtv) + } + + case strings.EqualFold("TargetArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.TargetArn = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentInboundIntegrationList(v *[]types.InboundIntegration, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.InboundIntegration + if *v == nil { + sv = make([]types.InboundIntegration, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("InboundIntegration", t.Name.Local): + var col types.InboundIntegration + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentInboundIntegration(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentInboundIntegrationListUnwrapped(v *[]types.InboundIntegration, decoder smithyxml.NodeDecoder) error { + var sv []types.InboundIntegration + if *v == nil { + sv = make([]types.InboundIntegration, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.InboundIntegration + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentInboundIntegration(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsAwsquery_deserializeDocumentIncompatibleOrderableOptions(v **types.IncompatibleOrderableOptions, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -28337,6 +29118,185 @@ func awsAwsquery_deserializeDocumentInsufficientS3BucketPolicyFault(v **types.In return nil } +func awsAwsquery_deserializeDocumentIntegrationError(v **types.IntegrationError, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IntegrationError + if *v == nil { + sv = &types.IntegrationError{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ErrorCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ErrorCode = ptr.String(xtv) + } + + case strings.EqualFold("ErrorMessage", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ErrorMessage = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentIntegrationErrorList(v *[]types.IntegrationError, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.IntegrationError + if *v == nil { + sv = make([]types.IntegrationError, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("IntegrationError", t.Name.Local): + var col types.IntegrationError + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentIntegrationError(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentIntegrationErrorListUnwrapped(v *[]types.IntegrationError, decoder smithyxml.NodeDecoder) error { + var sv []types.IntegrationError + if *v == nil { + sv = make([]types.IntegrationError, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.IntegrationError + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentIntegrationError(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentIntegrationNotFoundFault(v **types.IntegrationNotFoundFault, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.IntegrationNotFoundFault + if *v == nil { + sv = &types.IntegrationNotFoundFault{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentInvalidAuthenticationProfileRequestFault(v **types.InvalidAuthenticationProfileRequestFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -28435,13 +29395,62 @@ func awsAwsquery_deserializeDocumentInvalidAuthorizationStateFault(v **types.Inv return nil } -func awsAwsquery_deserializeDocumentInvalidClusterParameterGroupStateFault(v **types.InvalidClusterParameterGroupStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidClusterParameterGroupStateFault(v **types.InvalidClusterParameterGroupStateFault, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidClusterParameterGroupStateFault + if *v == nil { + sv = &types.InvalidClusterParameterGroupStateFault{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentInvalidClusterSecurityGroupStateFault(v **types.InvalidClusterSecurityGroupStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterParameterGroupStateFault + var sv *types.InvalidClusterSecurityGroupStateFault if *v == nil { - sv = &types.InvalidClusterParameterGroupStateFault{} + sv = &types.InvalidClusterSecurityGroupStateFault{} } else { sv = *v } @@ -28484,13 +29493,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterParameterGroupStateFault(v **t return nil } -func awsAwsquery_deserializeDocumentInvalidClusterSecurityGroupStateFault(v **types.InvalidClusterSecurityGroupStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidClusterSnapshotScheduleStateFault(v **types.InvalidClusterSnapshotScheduleStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterSecurityGroupStateFault + var sv *types.InvalidClusterSnapshotScheduleStateFault if *v == nil { - sv = &types.InvalidClusterSecurityGroupStateFault{} + sv = &types.InvalidClusterSnapshotScheduleStateFault{} } else { sv = *v } @@ -28533,13 +29542,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterSecurityGroupStateFault(v **ty return nil } -func awsAwsquery_deserializeDocumentInvalidClusterSnapshotScheduleStateFault(v **types.InvalidClusterSnapshotScheduleStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidClusterSnapshotStateFault(v **types.InvalidClusterSnapshotStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterSnapshotScheduleStateFault + var sv *types.InvalidClusterSnapshotStateFault if *v == nil { - sv = &types.InvalidClusterSnapshotScheduleStateFault{} + sv = &types.InvalidClusterSnapshotStateFault{} } else { sv = *v } @@ -28582,13 +29591,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterSnapshotScheduleStateFault(v * return nil } -func awsAwsquery_deserializeDocumentInvalidClusterSnapshotStateFault(v **types.InvalidClusterSnapshotStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidClusterStateFault(v **types.InvalidClusterStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterSnapshotStateFault + var sv *types.InvalidClusterStateFault if *v == nil { - sv = &types.InvalidClusterSnapshotStateFault{} + sv = &types.InvalidClusterStateFault{} } else { sv = *v } @@ -28631,13 +29640,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterSnapshotStateFault(v **types.I return nil } -func awsAwsquery_deserializeDocumentInvalidClusterStateFault(v **types.InvalidClusterStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidClusterSubnetGroupStateFault(v **types.InvalidClusterSubnetGroupStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterStateFault + var sv *types.InvalidClusterSubnetGroupStateFault if *v == nil { - sv = &types.InvalidClusterStateFault{} + sv = &types.InvalidClusterSubnetGroupStateFault{} } else { sv = *v } @@ -28680,13 +29689,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterStateFault(v **types.InvalidCl return nil } -func awsAwsquery_deserializeDocumentInvalidClusterSubnetGroupStateFault(v **types.InvalidClusterSubnetGroupStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidClusterSubnetStateFault(v **types.InvalidClusterSubnetStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterSubnetGroupStateFault + var sv *types.InvalidClusterSubnetStateFault if *v == nil { - sv = &types.InvalidClusterSubnetGroupStateFault{} + sv = &types.InvalidClusterSubnetStateFault{} } else { sv = *v } @@ -28729,13 +29738,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterSubnetGroupStateFault(v **type return nil } -func awsAwsquery_deserializeDocumentInvalidClusterSubnetStateFault(v **types.InvalidClusterSubnetStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidClusterTrackFault(v **types.InvalidClusterTrackFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterSubnetStateFault + var sv *types.InvalidClusterTrackFault if *v == nil { - sv = &types.InvalidClusterSubnetStateFault{} + sv = &types.InvalidClusterTrackFault{} } else { sv = *v } @@ -28778,13 +29787,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterSubnetStateFault(v **types.Inv return nil } -func awsAwsquery_deserializeDocumentInvalidClusterTrackFault(v **types.InvalidClusterTrackFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidDataShareFault(v **types.InvalidDataShareFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidClusterTrackFault + var sv *types.InvalidDataShareFault if *v == nil { - sv = &types.InvalidClusterTrackFault{} + sv = &types.InvalidDataShareFault{} } else { sv = *v } @@ -28827,13 +29836,13 @@ func awsAwsquery_deserializeDocumentInvalidClusterTrackFault(v **types.InvalidCl return nil } -func awsAwsquery_deserializeDocumentInvalidDataShareFault(v **types.InvalidDataShareFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidElasticIpFault(v **types.InvalidElasticIpFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidDataShareFault + var sv *types.InvalidElasticIpFault if *v == nil { - sv = &types.InvalidDataShareFault{} + sv = &types.InvalidElasticIpFault{} } else { sv = *v } @@ -28876,13 +29885,13 @@ func awsAwsquery_deserializeDocumentInvalidDataShareFault(v **types.InvalidDataS return nil } -func awsAwsquery_deserializeDocumentInvalidElasticIpFault(v **types.InvalidElasticIpFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidEndpointStateFault(v **types.InvalidEndpointStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidElasticIpFault + var sv *types.InvalidEndpointStateFault if *v == nil { - sv = &types.InvalidElasticIpFault{} + sv = &types.InvalidEndpointStateFault{} } else { sv = *v } @@ -28925,13 +29934,13 @@ func awsAwsquery_deserializeDocumentInvalidElasticIpFault(v **types.InvalidElast return nil } -func awsAwsquery_deserializeDocumentInvalidEndpointStateFault(v **types.InvalidEndpointStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidHsmClientCertificateStateFault(v **types.InvalidHsmClientCertificateStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidEndpointStateFault + var sv *types.InvalidHsmClientCertificateStateFault if *v == nil { - sv = &types.InvalidEndpointStateFault{} + sv = &types.InvalidHsmClientCertificateStateFault{} } else { sv = *v } @@ -28974,13 +29983,13 @@ func awsAwsquery_deserializeDocumentInvalidEndpointStateFault(v **types.InvalidE return nil } -func awsAwsquery_deserializeDocumentInvalidHsmClientCertificateStateFault(v **types.InvalidHsmClientCertificateStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidHsmConfigurationStateFault(v **types.InvalidHsmConfigurationStateFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidHsmClientCertificateStateFault + var sv *types.InvalidHsmConfigurationStateFault if *v == nil { - sv = &types.InvalidHsmClientCertificateStateFault{} + sv = &types.InvalidHsmConfigurationStateFault{} } else { sv = *v } @@ -29023,13 +30032,13 @@ func awsAwsquery_deserializeDocumentInvalidHsmClientCertificateStateFault(v **ty return nil } -func awsAwsquery_deserializeDocumentInvalidHsmConfigurationStateFault(v **types.InvalidHsmConfigurationStateFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidNamespaceFault(v **types.InvalidNamespaceFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidHsmConfigurationStateFault + var sv *types.InvalidNamespaceFault if *v == nil { - sv = &types.InvalidHsmConfigurationStateFault{} + sv = &types.InvalidNamespaceFault{} } else { sv = *v } @@ -29072,13 +30081,13 @@ func awsAwsquery_deserializeDocumentInvalidHsmConfigurationStateFault(v **types. return nil } -func awsAwsquery_deserializeDocumentInvalidNamespaceFault(v **types.InvalidNamespaceFault, decoder smithyxml.NodeDecoder) error { +func awsAwsquery_deserializeDocumentInvalidPolicyFault(v **types.InvalidPolicyFault, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } - var sv *types.InvalidNamespaceFault + var sv *types.InvalidPolicyFault if *v == nil { - sv = &types.InvalidNamespaceFault{} + sv = &types.InvalidPolicyFault{} } else { sv = *v } @@ -33163,6 +34172,68 @@ func awsAwsquery_deserializeDocumentResourceNotFoundFault(v **types.ResourceNotF return nil } +func awsAwsquery_deserializeDocumentResourcePolicy(v **types.ResourcePolicy, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ResourcePolicy + if *v == nil { + sv = &types.ResourcePolicy{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("Policy", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Policy = ptr.String(xtv) + } + + case strings.EqualFold("ResourceArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResourceArn = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentRestorableNodeTypeList(v *[]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42269,6 +43340,61 @@ func awsAwsquery_deserializeOpDocumentDescribeHsmConfigurationsOutput(v **Descri return nil } +func awsAwsquery_deserializeOpDocumentDescribeInboundIntegrationsOutput(v **DescribeInboundIntegrationsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DescribeInboundIntegrationsOutput + if *v == nil { + sv = &DescribeInboundIntegrationsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("InboundIntegrations", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentInboundIntegrationList(&sv.InboundIntegrations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("Marker", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Marker = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentDescribeLoggingStatusOutput(v **DescribeLoggingStatusOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44135,6 +45261,48 @@ func awsAwsquery_deserializeOpDocumentGetReservedNodeExchangeOfferingsOutput(v * return nil } +func awsAwsquery_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetResourcePolicyOutput + if *v == nil { + sv = &GetResourcePolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResourcePolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentResourcePolicy(&sv.ResourcePolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentModifyAquaConfigurationOutput(v **ModifyAquaConfigurationOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -45356,6 +46524,48 @@ func awsAwsquery_deserializeOpDocumentPurchaseReservedNodeOfferingOutput(v **Pur return nil } +func awsAwsquery_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *PutResourcePolicyOutput + if *v == nil { + sv = &PutResourcePolicyOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ResourcePolicy", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentResourcePolicy(&sv.ResourcePolicy, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentRebootClusterOutput(v **RebootClusterOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/redshift/generated.json b/service/redshift/generated.json index ecb78be8626..996997fb43a 100644 --- a/service/redshift/generated.json +++ b/service/redshift/generated.json @@ -50,6 +50,7 @@ "api_op_DeleteHsmClientCertificate.go", "api_op_DeleteHsmConfiguration.go", "api_op_DeletePartner.go", + "api_op_DeleteResourcePolicy.go", "api_op_DeleteScheduledAction.go", "api_op_DeleteSnapshotCopyGrant.go", "api_op_DeleteSnapshotSchedule.go", @@ -78,6 +79,7 @@ "api_op_DescribeEvents.go", "api_op_DescribeHsmClientCertificates.go", "api_op_DescribeHsmConfigurations.go", + "api_op_DescribeInboundIntegrations.go", "api_op_DescribeLoggingStatus.go", "api_op_DescribeNodeConfigurationOptions.go", "api_op_DescribeOrderableClusterOptions.go", @@ -102,6 +104,7 @@ "api_op_GetClusterCredentialsWithIAM.go", "api_op_GetReservedNodeExchangeConfigurationOptions.go", "api_op_GetReservedNodeExchangeOfferings.go", + "api_op_GetResourcePolicy.go", "api_op_ModifyAquaConfiguration.go", "api_op_ModifyAuthenticationProfile.go", "api_op_ModifyCluster.go", @@ -121,6 +124,7 @@ "api_op_ModifyUsageLimit.go", "api_op_PauseCluster.go", "api_op_PurchaseReservedNodeOffering.go", + "api_op_PutResourcePolicy.go", "api_op_RebootCluster.go", "api_op_RejectDataShare.go", "api_op_ResetClusterParameterGroup.go", diff --git a/service/redshift/serializers.go b/service/redshift/serializers.go index 2b7fcd91cd7..4346390128d 100644 --- a/service/redshift/serializers.go +++ b/service/redshift/serializers.go @@ -2576,6 +2576,70 @@ func (m *awsAwsquery_serializeOpDeletePartner) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsquery_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DeleteResourcePolicy") + body.Key("Version").String("2012-12-01") + + if err := awsAwsquery_serializeOpDocumentDeleteResourcePolicyInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpDeleteScheduledAction struct { } @@ -4368,6 +4432,70 @@ func (m *awsAwsquery_serializeOpDescribeHsmConfigurations) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpDescribeInboundIntegrations struct { +} + +func (*awsAwsquery_serializeOpDescribeInboundIntegrations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpDescribeInboundIntegrations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeInboundIntegrationsInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("DescribeInboundIntegrations") + body.Key("Version").String("2012-12-01") + + if err := awsAwsquery_serializeOpDocumentDescribeInboundIntegrationsInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpDescribeLoggingStatus struct { } @@ -5900,6 +6028,70 @@ func (m *awsAwsquery_serializeOpGetReservedNodeExchangeOfferings) HandleSerializ return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpGetResourcePolicy struct { +} + +func (*awsAwsquery_serializeOpGetResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetResourcePolicyInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("GetResourcePolicy") + body.Key("Version").String("2012-12-01") + + if err := awsAwsquery_serializeOpDocumentGetResourcePolicyInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpModifyAquaConfiguration struct { } @@ -7116,6 +7308,70 @@ func (m *awsAwsquery_serializeOpPurchaseReservedNodeOffering) HandleSerialize(ct return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpPutResourcePolicy struct { +} + +func (*awsAwsquery_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutResourcePolicyInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("PutResourcePolicy") + body.Key("Version").String("2012-12-01") + + if err := awsAwsquery_serializeOpDocumentPutResourcePolicyInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 + + return next.HandleSerialize(ctx, in) +} + type awsAwsquery_serializeOpRebootCluster struct { } @@ -9458,6 +9714,18 @@ func awsAwsquery_serializeOpDocumentDeletePartnerInput(v *DeletePartnerInput, va return nil } +func awsAwsquery_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ResourceArn != nil { + objectKey := object.Key("ResourceArn") + objectKey.String(*v.ResourceArn) + } + + return nil +} + func awsAwsquery_serializeOpDocumentDeleteScheduledActionInput(v *DeleteScheduledActionInput, value query.Value) error { object := value.Object() _ = object @@ -10227,6 +10495,33 @@ func awsAwsquery_serializeOpDocumentDescribeHsmConfigurationsInput(v *DescribeHs return nil } +func awsAwsquery_serializeOpDocumentDescribeInboundIntegrationsInput(v *DescribeInboundIntegrationsInput, value query.Value) error { + object := value.Object() + _ = object + + if v.IntegrationArn != nil { + objectKey := object.Key("IntegrationArn") + objectKey.String(*v.IntegrationArn) + } + + if v.Marker != nil { + objectKey := object.Key("Marker") + objectKey.String(*v.Marker) + } + + if v.MaxRecords != nil { + objectKey := object.Key("MaxRecords") + objectKey.Integer(*v.MaxRecords) + } + + if v.TargetArn != nil { + objectKey := object.Key("TargetArn") + objectKey.String(*v.TargetArn) + } + + return nil +} + func awsAwsquery_serializeOpDocumentDescribeLoggingStatusInput(v *DescribeLoggingStatusInput, value query.Value) error { object := value.Object() _ = object @@ -10907,6 +11202,18 @@ func awsAwsquery_serializeOpDocumentGetReservedNodeExchangeOfferingsInput(v *Get return nil } +func awsAwsquery_serializeOpDocumentGetResourcePolicyInput(v *GetResourcePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.ResourceArn != nil { + objectKey := object.Key("ResourceArn") + objectKey.String(*v.ResourceArn) + } + + return nil +} + func awsAwsquery_serializeOpDocumentModifyAquaConfigurationInput(v *ModifyAquaConfigurationInput, value query.Value) error { object := value.Object() _ = object @@ -11487,6 +11794,23 @@ func awsAwsquery_serializeOpDocumentPurchaseReservedNodeOfferingInput(v *Purchas return nil } +func awsAwsquery_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value query.Value) error { + object := value.Object() + _ = object + + if v.Policy != nil { + objectKey := object.Key("Policy") + objectKey.String(*v.Policy) + } + + if v.ResourceArn != nil { + objectKey := object.Key("ResourceArn") + objectKey.String(*v.ResourceArn) + } + + return nil +} + func awsAwsquery_serializeOpDocumentRebootClusterInput(v *RebootClusterInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/redshift/types/enums.go b/service/redshift/types/enums.go index 81aaca5648c..965dd3391db 100644 --- a/service/redshift/types/enums.go +++ b/service/redshift/types/enums.go @@ -578,3 +578,31 @@ func (UsageLimitPeriod) Values() []UsageLimitPeriod { "monthly", } } + +type ZeroETLIntegrationStatus string + +// Enum values for ZeroETLIntegrationStatus +const ( + ZeroETLIntegrationStatusCreating ZeroETLIntegrationStatus = "creating" + ZeroETLIntegrationStatusActive ZeroETLIntegrationStatus = "active" + ZeroETLIntegrationStatusModifying ZeroETLIntegrationStatus = "modifying" + ZeroETLIntegrationStatusFailed ZeroETLIntegrationStatus = "failed" + ZeroETLIntegrationStatusDeleting ZeroETLIntegrationStatus = "deleting" + ZeroETLIntegrationStatusSyncing ZeroETLIntegrationStatus = "syncing" + ZeroETLIntegrationStatusNeedsAttention ZeroETLIntegrationStatus = "needs_attention" +) + +// Values returns all known values for ZeroETLIntegrationStatus. 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 (ZeroETLIntegrationStatus) Values() []ZeroETLIntegrationStatus { + return []ZeroETLIntegrationStatus{ + "creating", + "active", + "modifying", + "failed", + "deleting", + "syncing", + "needs_attention", + } +} diff --git a/service/redshift/types/errors.go b/service/redshift/types/errors.go index 19bf142342f..fc60be72d59 100644 --- a/service/redshift/types/errors.go +++ b/service/redshift/types/errors.go @@ -784,6 +784,32 @@ func (e *ClusterSubnetQuotaExceededFault) ErrorCode() string { } func (e *ClusterSubnetQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// There is a conflict while updating the resource policy. +type ConflictPolicyUpdateFault struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConflictPolicyUpdateFault) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictPolicyUpdateFault) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictPolicyUpdateFault) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictPolicyUpdateFault" + } + return *e.ErrorCodeOverride +} +func (e *ConflictPolicyUpdateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Cross-region snapshot copy was temporarily disabled. Try your request again. type CopyToRegionDisabledFault struct { Message *string @@ -1425,6 +1451,32 @@ func (e *InsufficientS3BucketPolicyFault) ErrorCode() string { } func (e *InsufficientS3BucketPolicyFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The integration can't be found. +type IntegrationNotFoundFault struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *IntegrationNotFoundFault) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IntegrationNotFoundFault) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IntegrationNotFoundFault) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IntegrationNotFoundFault" + } + return *e.ErrorCodeOverride +} +func (e *IntegrationNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The authentication profile request is not valid. The profile name can't be null // or empty. The authentication profile API operation must be available in the // Amazon Web Services Region. @@ -1861,6 +1913,32 @@ func (e *InvalidNamespaceFault) ErrorCode() string { } func (e *InvalidNamespaceFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The resource policy isn't valid. +type InvalidPolicyFault struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidPolicyFault) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPolicyFault) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPolicyFault) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPolicyFault" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPolicyFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Indicates that the Reserved Node being exchanged is not in an active state. type InvalidReservedNodeStateFault struct { Message *string diff --git a/service/redshift/types/types.go b/service/redshift/types/types.go index 5c7f3c11b6b..39aac6e8cf6 100644 --- a/service/redshift/types/types.go +++ b/service/redshift/types/types.go @@ -1005,6 +1005,45 @@ type HsmStatus struct { noSmithyDocumentSerde } +// The content of an inbound integration. +type InboundIntegration struct { + + // The creation time of an inbound integration. + CreateTime *time.Time + + // The outstanding errors of an inbound integration. Each item is an + // "IntegrationError". This is null if there is no error. + Errors []IntegrationError + + // The Amazon Resource Name (ARN) of an inbound integration. + IntegrationArn *string + + // The Amazon Resource Name (ARN) of the source of an inbound integration. + SourceArn *string + + // The status of an inbound integration. + Status ZeroETLIntegrationStatus + + // The Amazon Resource Name (ARN) of the target of an inbound integration. + TargetArn *string + + noSmithyDocumentSerde +} + +// The error of an inbound integration. +type IntegrationError struct { + + // The error code of an inbound integration error. + // + // This member is required. + ErrorCode *string + + // The error message of an inbound integration error. + ErrorMessage *string + + noSmithyDocumentSerde +} + // Describes an IP range used in a security group. type IPRange struct { @@ -1440,6 +1479,18 @@ type ResizeInfo struct { noSmithyDocumentSerde } +// The policy that is attached to a resource. +type ResourcePolicy struct { + + // The content of a resource policy. + Policy *string + + // The resources that a policy is attached to. + ResourceArn *string + + noSmithyDocumentSerde +} + // Describes the status of a cluster restore action. Returns null if the cluster // was not created by restoring a snapshot. type RestoreStatus struct { diff --git a/service/redshift/validators.go b/service/redshift/validators.go index 2d1ebb5e7d9..ec2272e4a14 100644 --- a/service/redshift/validators.go +++ b/service/redshift/validators.go @@ -790,6 +790,26 @@ func (m *validateOpDeletePartner) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpDeleteResourcePolicy struct { +} + +func (*validateOpDeleteResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteScheduledAction struct { } @@ -1210,6 +1230,26 @@ func (m *validateOpGetReservedNodeExchangeOfferings) HandleInitialize(ctx contex return next.HandleInitialize(ctx, in) } +type validateOpGetResourcePolicy struct { +} + +func (*validateOpGetResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpModifyAquaConfiguration struct { } @@ -1590,6 +1630,26 @@ func (m *validateOpPurchaseReservedNodeOffering) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRebootCluster struct { } @@ -1966,6 +2026,10 @@ func addOpDeletePartnerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeletePartner{}, middleware.After) } +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + func addOpDeleteScheduledActionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteScheduledAction{}, middleware.After) } @@ -2050,6 +2114,10 @@ func addOpGetReservedNodeExchangeOfferingsValidationMiddleware(stack *middleware return stack.Initialize.Add(&validateOpGetReservedNodeExchangeOfferings{}, middleware.After) } +func addOpGetResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicy{}, middleware.After) +} + func addOpModifyAquaConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyAquaConfiguration{}, middleware.After) } @@ -2126,6 +2194,10 @@ func addOpPurchaseReservedNodeOfferingValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpPurchaseReservedNodeOffering{}, middleware.After) } +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + func addOpRebootClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRebootCluster{}, middleware.After) } @@ -3039,6 +3111,21 @@ func validateOpDeletePartnerInput(v *DeletePartnerInput) error { } } +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteScheduledActionInput(v *DeleteScheduledActionInput) error { if v == nil { return nil @@ -3367,6 +3454,21 @@ func validateOpGetReservedNodeExchangeOfferingsInput(v *GetReservedNodeExchangeO } } +func validateOpGetResourcePolicyInput(v *GetResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpModifyAquaConfigurationInput(v *ModifyAquaConfigurationInput) error { if v == nil { return nil @@ -3675,6 +3777,24 @@ func validateOpPurchaseReservedNodeOfferingInput(v *PurchaseReservedNodeOffering } } +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRebootClusterInput(v *RebootClusterInput) error { if v == nil { return nil diff --git a/service/sagemaker/api_op_CreateAutoMLJob.go b/service/sagemaker/api_op_CreateAutoMLJob.go index 3097fe6a831..2743a5aa87c 100644 --- a/service/sagemaker/api_op_CreateAutoMLJob.go +++ b/service/sagemaker/api_op_CreateAutoMLJob.go @@ -21,9 +21,10 @@ import ( // and DescribeAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html) // , which offer backward compatibility. CreateAutoMLJobV2 can manage tabular // problem types identical to those of its previous version CreateAutoMLJob , as -// well as time-series forecasting, and non-tabular problem types such as image or -// text classification. Find guidelines about how to migrate a CreateAutoMLJob to -// CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment-api.html#autopilot-create-experiment-api-migrate-v1-v2) +// well as time-series forecasting, non-tabular problem types such as image or text +// classification, and text generation (LLMs fine-tuning). Find guidelines about +// how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a +// CreateAutoMLJob to CreateAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment-api.html#autopilot-create-experiment-api-migrate-v1-v2) // . You can find the best-performing model after you run an AutoML job by calling // DescribeAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html) // (recommended) or DescribeAutoMLJob (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJob.html) diff --git a/service/sagemaker/api_op_CreateAutoMLJobV2.go b/service/sagemaker/api_op_CreateAutoMLJobV2.go index 6f5d3395230..2812846b40b 100644 --- a/service/sagemaker/api_op_CreateAutoMLJobV2.go +++ b/service/sagemaker/api_op_CreateAutoMLJobV2.go @@ -23,9 +23,10 @@ import ( // and DescribeAutoMLJob (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJob.html) // which offer backward compatibility. CreateAutoMLJobV2 can manage tabular // problem types identical to those of its previous version CreateAutoMLJob , as -// well as time-series forecasting, and non-tabular problem types such as image or -// text classification. Find guidelines about how to migrate a CreateAutoMLJob to -// CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment-api.html#autopilot-create-experiment-api-migrate-v1-v2) +// well as time-series forecasting, non-tabular problem types such as image or text +// classification, and text generation (LLMs fine-tuning). Find guidelines about +// how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a +// CreateAutoMLJob to CreateAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment-api.html#autopilot-create-experiment-api-migrate-v1-v2) // . For the list of available problem types supported by CreateAutoMLJobV2 , see // AutoMLProblemTypeConfig (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AutoMLProblemTypeConfig.html) // . You can find the best-performing model after you run an AutoML job V2 by @@ -56,6 +57,7 @@ type CreateAutoMLJobV2Input struct { // - For image classification: S3Prefix , ManifestFile , AugmentedManifestFile . // - For text classification: S3Prefix . // - For time-series forecasting: S3Prefix . + // - For text generation (LLMs fine-tuning): S3Prefix . // // This member is required. AutoMLJobInputDataConfig []types.AutoMLJobChannel @@ -85,9 +87,19 @@ type CreateAutoMLJobV2Input struct { // Specifies a metric to minimize or maximize as the objective of a job. If not // specified, the default objective metric depends on the problem type. For the // list of default values per problem type, see AutoMLJobObjective (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_AutoMLJobObjective.html) - // . For tabular problem types, you must either provide both the AutoMLJobObjective - // and indicate the type of supervised learning problem in AutoMLProblemTypeConfig - // ( TabularJobConfig.ProblemType ), or none at all. + // . + // - For tabular problem types: You must either provide both the + // AutoMLJobObjective and indicate the type of supervised learning problem in + // AutoMLProblemTypeConfig ( TabularJobConfig.ProblemType ), or none at all. + // - For text generation problem types (LLMs fine-tuning): Fine-tuning language + // models in Autopilot does not require setting the AutoMLJobObjective field. + // Autopilot fine-tunes LLMs without requiring multiple candidates to be trained + // and evaluated. Instead, using your dataset, Autopilot directly fine-tunes your + // target model to enhance a default objective metric, the cross-entropy loss. + // After fine-tuning a language model, you can evaluate the quality of its + // generated text using different metrics. For a list of the available metrics, see + // Metrics for fine-tuning LLMs in Autopilot (https://docs.aws.amazon.com/sagemaker/latest/dg/llms-finetuning-models.html) + // . AutoMLJobObjective *types.AutoMLJobObjective // This structure specifies how to split the data into train and validation diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index d9e267d4a44..46148a48462 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -36309,6 +36309,16 @@ loop: uv = &types.AutoMLProblemTypeConfigMemberTextClassificationJobConfig{Value: mv} break loop + case "TextGenerationJobConfig": + var mv types.TextGenerationJobConfig + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentTextGenerationJobConfig(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AutoMLProblemTypeConfigMemberTextGenerationJobConfig{Value: mv} + break loop + case "TimeSeriesForecastingJobConfig": var mv types.TimeSeriesForecastingJobConfig destAddr := &mv @@ -36359,6 +36369,16 @@ loop: uv = &types.AutoMLProblemTypeResolvedAttributesMemberTabularResolvedAttributes{Value: mv} break loop + case "TextGenerationResolvedAttributes": + var mv types.TextGenerationResolvedAttributes + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentTextGenerationResolvedAttributes(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.AutoMLProblemTypeResolvedAttributesMemberTextGenerationResolvedAttributes{Value: mv} + break loop + default: uv = &types.UnknownUnionMember{Tag: key} break loop @@ -69601,6 +69621,91 @@ func awsAwsjson11_deserializeDocumentTextClassificationJobConfig(v **types.TextC return nil } +func awsAwsjson11_deserializeDocumentTextGenerationJobConfig(v **types.TextGenerationJobConfig, 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.TextGenerationJobConfig + if *v == nil { + sv = &types.TextGenerationJobConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaseModelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaseModelName to be of type string, got %T instead", value) + } + sv.BaseModelName = ptr.String(jtv) + } + + case "CompletionCriteria": + if err := awsAwsjson11_deserializeDocumentAutoMLJobCompletionCriteria(&sv.CompletionCriteria, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTextGenerationResolvedAttributes(v **types.TextGenerationResolvedAttributes, 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.TextGenerationResolvedAttributes + if *v == nil { + sv = &types.TextGenerationResolvedAttributes{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BaseModelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BaseModelName to be of type string, got %T instead", value) + } + sv.BaseModelName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTimeSeriesConfig(v **types.TimeSeriesConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 2988a6b23a8..8dbdc139b7e 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -17551,6 +17551,12 @@ func awsAwsjson11_serializeDocumentAutoMLProblemTypeConfig(v types.AutoMLProblem return err } + case *types.AutoMLProblemTypeConfigMemberTextGenerationJobConfig: + av := object.Key("TextGenerationJobConfig") + if err := awsAwsjson11_serializeDocumentTextGenerationJobConfig(&uv.Value, av); err != nil { + return err + } + case *types.AutoMLProblemTypeConfigMemberTimeSeriesForecastingJobConfig: av := object.Key("TimeSeriesForecastingJobConfig") if err := awsAwsjson11_serializeDocumentTimeSeriesForecastingJobConfig(&uv.Value, av); err != nil { @@ -25415,6 +25421,25 @@ func awsAwsjson11_serializeDocumentTextClassificationJobConfig(v *types.TextClas return nil } +func awsAwsjson11_serializeDocumentTextGenerationJobConfig(v *types.TextGenerationJobConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaseModelName != nil { + ok := object.Key("BaseModelName") + ok.String(*v.BaseModelName) + } + + if v.CompletionCriteria != nil { + ok := object.Key("CompletionCriteria") + if err := awsAwsjson11_serializeDocumentAutoMLJobCompletionCriteria(v.CompletionCriteria, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentTimeSeriesConfig(v *types.TimeSeriesConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index a598ea48834..2c314ed7644 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -723,6 +723,13 @@ const ( AutoMLMetricExtendedEnumMase AutoMLMetricExtendedEnum = "MASE" AutoMLMetricExtendedEnumWape AutoMLMetricExtendedEnum = "WAPE" AutoMLMetricExtendedEnumAverageWeightedQuantileLoss AutoMLMetricExtendedEnum = "AverageWeightedQuantileLoss" + AutoMLMetricExtendedEnumRouge1 AutoMLMetricExtendedEnum = "Rouge1" + AutoMLMetricExtendedEnumRouge2 AutoMLMetricExtendedEnum = "Rouge2" + AutoMLMetricExtendedEnumRougel AutoMLMetricExtendedEnum = "RougeL" + AutoMLMetricExtendedEnumRougelSum AutoMLMetricExtendedEnum = "RougeLSum" + AutoMLMetricExtendedEnumPerplexity AutoMLMetricExtendedEnum = "Perplexity" + AutoMLMetricExtendedEnumValidationLoss AutoMLMetricExtendedEnum = "ValidationLoss" + AutoMLMetricExtendedEnumTrainingLoss AutoMLMetricExtendedEnum = "TrainingLoss" ) // Values returns all known values for AutoMLMetricExtendedEnum. Note that this @@ -749,6 +756,13 @@ func (AutoMLMetricExtendedEnum) Values() []AutoMLMetricExtendedEnum { "MASE", "WAPE", "AverageWeightedQuantileLoss", + "Rouge1", + "Rouge2", + "RougeL", + "RougeLSum", + "Perplexity", + "ValidationLoss", + "TrainingLoss", } } @@ -780,6 +794,7 @@ const ( AutoMLProblemTypeConfigNameTextClassification AutoMLProblemTypeConfigName = "TextClassification" AutoMLProblemTypeConfigNameTabular AutoMLProblemTypeConfigName = "Tabular" AutoMLProblemTypeConfigNameTimeseriesForecasting AutoMLProblemTypeConfigName = "TimeSeriesForecasting" + AutoMLProblemTypeConfigNameTextGeneration AutoMLProblemTypeConfigName = "TextGeneration" ) // Values returns all known values for AutoMLProblemTypeConfigName. Note that this @@ -791,6 +806,7 @@ func (AutoMLProblemTypeConfigName) Values() []AutoMLProblemTypeConfigName { "TextClassification", "Tabular", "TimeSeriesForecasting", + "TextGeneration", } } diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index b02797d5402..912c5c94159 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -1390,6 +1390,9 @@ type AutoMLJobChannel struct { // - For time-series forecasting: text/csv;header=present or // x-application/vnd.amazon+parquet . The default value is // text/csv;header=present . + // - For text generation (LLMs fine-tuning): text/csv;header=present or + // x-application/vnd.amazon+parquet . The default value is + // text/csv;header=present . ContentType *string // The data source for an AutoML channel (Required). @@ -1411,8 +1414,9 @@ type AutoMLJobCompletionCriteria struct { MaxAutoMLJobRuntimeInSeconds *int32 // The maximum number of times a training job is allowed to run. For text and - // image classification, as well as time-series forecasting problem types, the - // supported value is 1. For tabular problem types, the maximum value is 750. + // image classification, time-series forecasting, as well as text generation (LLMs + // fine-tuning) problem types, the supported value is 1. For tabular problem types, + // the maximum value is 750. MaxCandidates *int32 // The maximum time, in seconds, that each training job executed inside @@ -1464,22 +1468,48 @@ type AutoMLJobConfig struct { noSmithyDocumentSerde } -// Specifies a metric to minimize or maximize as the objective of a job. +// Specifies a metric to minimize or maximize as the objective of an AutoML job. type AutoMLJobObjective struct { // The name of the objective metric used to measure the predictive quality of a // machine learning system. During training, the model's parameters are updated // iteratively to optimize its performance based on the feedback provided by the - // objective metric when evaluating the model on the validation dataset. For the - // list of all available metrics supported by Autopilot, see Autopilot metrics (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-metrics-validation.html#autopilot-metrics) - // . If you do not specify a metric explicitly, the default behavior is to - // automatically use: + // objective metric when evaluating the model on the validation dataset. The list + // of available metrics supported by Autopilot and the default metric applied when + // you do not specify a metric name explicitly depend on the problem type. // - For tabular problem types: + // - List of available metrics: + // - Regression: InferenceLatency , MAE , MSE , R2 , RMSE + // - Binary classification: Accuracy , AUC , BalancedAccuracy , F1 , + // InferenceLatency , LogLoss , Precision , Recall + // - Multiclass classification: Accuracy , BalancedAccuracy , F1macro , + // InferenceLatency , LogLoss , PrecisionMacro , RecallMacro For a description of + // each metric, see Autopilot metrics for classification and regression (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-metrics-validation.html#autopilot-metrics) + // . + // - Default objective metrics: // - Regression: MSE . // - Binary classification: F1 . // - Multiclass classification: Accuracy . - // - For image or text classification problem types: Accuracy - // - For time-series forecasting problem types: AverageWeightedQuantileLoss + // - For image or text classification problem types: + // - List of available metrics: Accuracy For a description of each metric, see + // Autopilot metrics for text and image classification (https://docs.aws.amazon.com/sagemaker/latest/dg/text-classification-data-format-and-metric.html) + // . + // - Default objective metrics: Accuracy + // - For time-series forecasting problem types: + // - List of available metrics: RMSE , wQL , Average wQL , MASE , MAPE , WAPE For + // a description of each metric, see Autopilot metrics for time-series + // forecasting (https://docs.aws.amazon.com/sagemaker/latest/dg/timeseries-objective-metric.html) + // . + // - Default objective metrics: AverageWeightedQuantileLoss + // - For text generation problem types (LLMs fine-tuning): Fine-tuning language + // models in Autopilot does not require setting the AutoMLJobObjective field. + // Autopilot fine-tunes LLMs without requiring multiple candidates to be trained + // and evaluated. Instead, using your dataset, Autopilot directly fine-tunes your + // target model to enhance a default objective metric, the cross-entropy loss. + // After fine-tuning a language model, you can evaluate the quality of its + // generated text using different metrics. For a list of the available metrics, see + // Metrics for fine-tuning LLMs in Autopilot (https://docs.aws.amazon.com/sagemaker/latest/dg/llms-finetuning-models.html) + // . // // This member is required. MetricName AutoMLMetricEnum @@ -1572,6 +1602,7 @@ type AutoMLPartialFailureReason struct { // AutoMLProblemTypeConfigMemberImageClassificationJobConfig // AutoMLProblemTypeConfigMemberTabularJobConfig // AutoMLProblemTypeConfigMemberTextClassificationJobConfig +// AutoMLProblemTypeConfigMemberTextGenerationJobConfig // AutoMLProblemTypeConfigMemberTimeSeriesForecastingJobConfig type AutoMLProblemTypeConfig interface { isAutoMLProblemTypeConfig() @@ -1587,7 +1618,7 @@ type AutoMLProblemTypeConfigMemberImageClassificationJobConfig struct { func (*AutoMLProblemTypeConfigMemberImageClassificationJobConfig) isAutoMLProblemTypeConfig() {} -// Settings used to configure an AutoML job V2 for a tabular problem type +// Settings used to configure an AutoML job V2 for the tabular problem type // (regression, classification). type AutoMLProblemTypeConfigMemberTabularJobConfig struct { Value TabularJobConfig @@ -1607,7 +1638,20 @@ type AutoMLProblemTypeConfigMemberTextClassificationJobConfig struct { func (*AutoMLProblemTypeConfigMemberTextClassificationJobConfig) isAutoMLProblemTypeConfig() {} -// Settings used to configure an AutoML job V2 for a time-series forecasting +// Settings used to configure an AutoML job V2 for the text generation (LLMs +// fine-tuning) problem type. The text generation models that support fine-tuning +// in Autopilot are currently accessible exclusively in regions supported by +// Canvas. Refer to the documentation of Canvas for the full list of its supported +// Regions (https://docs.aws.amazon.com/sagemaker/latest/dg/canvas.html) . +type AutoMLProblemTypeConfigMemberTextGenerationJobConfig struct { + Value TextGenerationJobConfig + + noSmithyDocumentSerde +} + +func (*AutoMLProblemTypeConfigMemberTextGenerationJobConfig) isAutoMLProblemTypeConfig() {} + +// Settings used to configure an AutoML job V2 for the time-series forecasting // problem type. type AutoMLProblemTypeConfigMemberTimeSeriesForecastingJobConfig struct { Value TimeSeriesForecastingJobConfig @@ -1617,16 +1661,17 @@ type AutoMLProblemTypeConfigMemberTimeSeriesForecastingJobConfig struct { func (*AutoMLProblemTypeConfigMemberTimeSeriesForecastingJobConfig) isAutoMLProblemTypeConfig() {} -// The resolved attributes specific to the problem type of an AutoML job V2. +// Stores resolved attributes specific to the problem type of an AutoML job V2. // // The following types satisfy this interface: // // AutoMLProblemTypeResolvedAttributesMemberTabularResolvedAttributes +// AutoMLProblemTypeResolvedAttributesMemberTextGenerationResolvedAttributes type AutoMLProblemTypeResolvedAttributes interface { isAutoMLProblemTypeResolvedAttributes() } -// Defines the resolved attributes for the TABULAR problem type. +// The resolved attributes for the tabular problem type. type AutoMLProblemTypeResolvedAttributesMemberTabularResolvedAttributes struct { Value TabularResolvedAttributes @@ -1636,10 +1681,20 @@ type AutoMLProblemTypeResolvedAttributesMemberTabularResolvedAttributes struct { func (*AutoMLProblemTypeResolvedAttributesMemberTabularResolvedAttributes) isAutoMLProblemTypeResolvedAttributes() { } +// The resolved attributes for the text generation problem type. +type AutoMLProblemTypeResolvedAttributesMemberTextGenerationResolvedAttributes struct { + Value TextGenerationResolvedAttributes + + noSmithyDocumentSerde +} + +func (*AutoMLProblemTypeResolvedAttributesMemberTextGenerationResolvedAttributes) isAutoMLProblemTypeResolvedAttributes() { +} + // The resolved attributes used to configure an AutoML job V2. type AutoMLResolvedAttributes struct { - // Specifies a metric to minimize or maximize as the objective of a job. + // Specifies a metric to minimize or maximize as the objective of an AutoML job. AutoMLJobObjective *AutoMLJobObjective // Defines the resolved attributes specific to a problem type. @@ -6122,7 +6177,10 @@ type HyperParameterTrainingJobDefinition struct { // Defines the objective metric for a hyperparameter tuning job. Hyperparameter // tuning uses the value of this metric to evaluate the training jobs it launches, // and returns the training job that results in either the highest or lowest value - // for this metric, depending on the value you specify for the Type parameter. + // for this metric, depending on the value you specify for the Type parameter. If + // you want to define a custom objective metric, see Define metrics and + // environment variables (https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-define-metrics-variables.html) + // . TuningObjective *HyperParameterTuningJobObjective // The VpcConfig (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html) @@ -6323,7 +6381,10 @@ type HyperParameterTuningJobConsumedResources struct { // Defines the objective metric for a hyperparameter tuning job. Hyperparameter // tuning uses the value of this metric to evaluate the training jobs it launches, // and returns the training job that results in either the highest or lowest value -// for this metric, depending on the value you specify for the Type parameter. +// for this metric, depending on the value you specify for the Type parameter. If +// you want to define a custom objective metric, see Define metrics and +// environment variables (https://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-define-metrics-variables.html) +// . type HyperParameterTuningJobObjective struct { // The name of the metric to use for the objective metric. @@ -6681,8 +6742,8 @@ type Image struct { noSmithyDocumentSerde } -// Stores the configuration information for the image classification problem of an -// AutoML job V2. +// The collection of settings used by an AutoML job V2 for the image +// classification problem type. type ImageClassificationJobConfig struct { // How long a job is allowed to run, or how many candidates a job is allowed to @@ -12207,7 +12268,7 @@ type RepositoryAuthConfig struct { // The resolved attributes. type ResolvedAttributes struct { - // Specifies a metric to minimize or maximize as the objective of a job. + // Specifies a metric to minimize or maximize as the objective of an AutoML job. AutoMLJobObjective *AutoMLJobObjective // How long a job is allowed to run, or how many candidates a job is allowed to @@ -13305,7 +13366,7 @@ type SuggestionQuery struct { noSmithyDocumentSerde } -// The collection of settings used by an AutoML job V2 for the TABULAR problem +// The collection of settings used by an AutoML job V2 for the tabular problem // type. type TabularJobConfig struct { @@ -13386,7 +13447,7 @@ type TabularJobConfig struct { noSmithyDocumentSerde } -// The resolved attributes specific to the TABULAR problem type. +// The resolved attributes specific to the tabular problem type. type TabularResolvedAttributes struct { // The type of supervised learning problem available for the model candidates of @@ -13500,8 +13561,8 @@ type TensorBoardOutputConfig struct { noSmithyDocumentSerde } -// Stores the configuration information for the text classification problem of an -// AutoML job V2. +// The collection of settings used by an AutoML job V2 for the text classification +// problem type. type TextClassificationJobConfig struct { // The name of the column used to provide the sentences to be classified. It @@ -13523,6 +13584,35 @@ type TextClassificationJobConfig struct { noSmithyDocumentSerde } +// The collection of settings used by an AutoML job V2 for the text generation +// problem type. The text generation models that support fine-tuning in Autopilot +// are currently accessible exclusively in regions supported by Canvas. Refer to +// the documentation of Canvas for the full list of its supported Regions (https://docs.aws.amazon.com/sagemaker/latest/dg/canvas.html) +// . +type TextGenerationJobConfig struct { + + // The name of the base model to fine-tune. Autopilot supports fine-tuning a + // variety of large language models. For information on the list of supported + // models, see Text generation models supporting fine-tuning in Autopilot (https://docs.aws.amazon.com/sagemaker/src/AWSIronmanApiDoc/build/server-root/sagemaker/latest/dg/llms-finetuning-models.html#llms-finetuning-supported-llms) + // . If no BaseModelName is provided, the default model used is Falcon-7B-Instruct. + BaseModelName *string + + // How long a job is allowed to run, or how many candidates a job is allowed to + // generate. + CompletionCriteria *AutoMLJobCompletionCriteria + + noSmithyDocumentSerde +} + +// The resolved attributes specific to the text generation problem type. +type TextGenerationResolvedAttributes struct { + + // The name of the base model to fine-tune. + BaseModelName *string + + noSmithyDocumentSerde +} + // The collection of components that defines the time-series. type TimeSeriesConfig struct { diff --git a/service/sagemaker/types/types_exported_test.go b/service/sagemaker/types/types_exported_test.go index d8204e9407e..a93ae6df30f 100644 --- a/service/sagemaker/types/types_exported_test.go +++ b/service/sagemaker/types/types_exported_test.go @@ -20,6 +20,9 @@ func ExampleAutoMLProblemTypeConfig_outputUsage() { case *types.AutoMLProblemTypeConfigMemberTextClassificationJobConfig: _ = v.Value // Value is types.TextClassificationJobConfig + case *types.AutoMLProblemTypeConfigMemberTextGenerationJobConfig: + _ = v.Value // Value is types.TextGenerationJobConfig + case *types.AutoMLProblemTypeConfigMemberTimeSeriesForecastingJobConfig: _ = v.Value // Value is types.TimeSeriesForecastingJobConfig @@ -32,6 +35,7 @@ func ExampleAutoMLProblemTypeConfig_outputUsage() { } } +var _ *types.TextGenerationJobConfig var _ *types.TextClassificationJobConfig var _ *types.TimeSeriesForecastingJobConfig var _ *types.ImageClassificationJobConfig @@ -44,6 +48,9 @@ func ExampleAutoMLProblemTypeResolvedAttributes_outputUsage() { case *types.AutoMLProblemTypeResolvedAttributesMemberTabularResolvedAttributes: _ = v.Value // Value is types.TabularResolvedAttributes + case *types.AutoMLProblemTypeResolvedAttributesMemberTextGenerationResolvedAttributes: + _ = v.Value // Value is types.TextGenerationResolvedAttributes + case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) @@ -53,6 +60,7 @@ func ExampleAutoMLProblemTypeResolvedAttributes_outputUsage() { } } +var _ *types.TextGenerationResolvedAttributes var _ *types.TabularResolvedAttributes func ExampleCollectionConfig_outputUsage() { diff --git a/service/sns/api_op_CreateTopic.go b/service/sns/api_op_CreateTopic.go index c89c262d50e..4086e2f846c 100644 --- a/service/sns/api_op_CreateTopic.go +++ b/service/sns/api_op_CreateTopic.go @@ -75,7 +75,12 @@ type CreateTopicInput struct { // in the Key Management Service API Reference. // The following attributes apply only to FIFO topics (https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html) // : - // - FifoTopic – When this is set to true , a FIFO topic is created. + // - ArchivePolicy – Adds or updates an inline policy document to archive + // messages stored in the specified Amazon SNS topic. + // - BeginningArchiveTime – The earliest starting point at which a message in the + // topic’s archive can be replayed from. This point in time is based on the + // configured message retention period set by the topic’s message archiving policy. + // // - ContentBasedDeduplication – Enables content-based deduplication for FIFO // topics. // - By default, ContentBasedDeduplication is set to false . If you create a FIFO diff --git a/service/sns/api_op_Subscribe.go b/service/sns/api_op_Subscribe.go index 6437f732357..c63372eca34 100644 --- a/service/sns/api_op_Subscribe.go +++ b/service/sns/api_op_Subscribe.go @@ -19,7 +19,7 @@ import ( // or email, or if the endpoint and the topic are not in the same Amazon Web // Services account, the endpoint owner must run the ConfirmSubscription action to // confirm the subscription. You call the ConfirmSubscription action with the -// token from the subscription response. Confirmation tokens are valid for three +// token from the subscription response. Confirmation tokens are valid for two // days. This action is throttled at 100 transactions per second (TPS). func (c *Client) Subscribe(ctx context.Context, params *SubscribeInput, optFns ...func(*Options)) (*SubscribeOutput, error) { if params == nil { @@ -90,6 +90,19 @@ type SubscribeInput struct { // attribute is required for Kinesis Data Firehose delivery stream subscriptions. // For more information, see Fanout to Kinesis Data Firehose delivery streams (https://docs.aws.amazon.com/sns/latest/dg/sns-firehose-as-subscriber.html) // in the Amazon SNS Developer Guide. + // The following attributes apply only to FIFO topics (https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html) + // : + // - ReplayPolicy – Adds or updates an inline policy document for a subscription + // to replay messages stored in the specified Amazon SNS topic. + // - ReplayStatus – Retrieves the status of the subscription message replay, + // which can be one of the following: + // - Completed – The replay has successfully redelivered all messages, and is now + // delivering newly published messages. If an ending point was specified in the + // ReplayPolicy then the subscription will no longer receive newly published + // messages. + // - In progress – The replay is currently replaying the selected messages. + // - Failed – The replay was unable to complete. + // - Pending – The default state while the replay initiates. Attributes map[string]string // The endpoint that you want to receive notifications. Endpoints vary by diff --git a/service/sns/deserializers.go b/service/sns/deserializers.go index 329c856579e..e4bd955b3da 100644 --- a/service/sns/deserializers.go +++ b/service/sns/deserializers.go @@ -332,6 +332,9 @@ func awsAwsquery_deserializeOpErrorConfirmSubscription(response *smithyhttp.Resp case strings.EqualFold("NotFound", errorCode): return awsAwsquery_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ReplayLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorReplayLimitExceededException(response, errorBody) + case strings.EqualFold("SubscriptionLimitExceeded", errorCode): return awsAwsquery_deserializeErrorSubscriptionLimitExceededException(response, errorBody) @@ -1184,6 +1187,9 @@ func awsAwsquery_deserializeOpErrorDeleteTopic(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameter", errorCode): return awsAwsquery_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidState", errorCode): + return awsAwsquery_deserializeErrorInvalidStateException(response, errorBody) + case strings.EqualFold("NotFound", errorCode): return awsAwsquery_deserializeErrorNotFoundException(response, errorBody) @@ -4033,6 +4039,9 @@ func awsAwsquery_deserializeOpErrorSetSubscriptionAttributes(response *smithyhtt case strings.EqualFold("NotFound", errorCode): return awsAwsquery_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ReplayLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorReplayLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4241,6 +4250,9 @@ func awsAwsquery_deserializeOpErrorSubscribe(response *smithyhttp.Response, meta case strings.EqualFold("NotFound", errorCode): return awsAwsquery_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ReplayLimitExceeded", errorCode): + return awsAwsquery_deserializeErrorReplayLimitExceededException(response, errorBody) + case strings.EqualFold("SubscriptionLimitExceeded", errorCode): return awsAwsquery_deserializeErrorSubscriptionLimitExceededException(response, errorBody) @@ -5242,6 +5254,50 @@ func awsAwsquery_deserializeErrorInvalidSecurityException(response *smithyhttp.R return output } +func awsAwsquery_deserializeErrorInvalidStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidStateException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentInvalidStateException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorKMSAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.KMSAccessDeniedException{} var buff [1024]byte @@ -5638,6 +5694,50 @@ func awsAwsquery_deserializeErrorPlatformApplicationDisabledException(response * return output } +func awsAwsquery_deserializeErrorReplayLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ReplayLimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentReplayLimitExceededException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceNotFoundException{} var buff [1024]byte @@ -6924,6 +7024,55 @@ func awsAwsquery_deserializeDocumentInvalidSecurityException(v **types.InvalidSe return nil } +func awsAwsquery_deserializeDocumentInvalidStateException(v **types.InvalidStateException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.InvalidStateException + if *v == nil { + sv = &types.InvalidStateException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentKMSAccessDeniedException(v **types.KMSAccessDeniedException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8136,6 +8285,55 @@ func awsAwsquery_deserializeDocumentPublishBatchResultEntryListUnwrapped(v *[]ty *v = sv return nil } +func awsAwsquery_deserializeDocumentReplayLimitExceededException(v **types.ReplayLimitExceededException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ReplayLimitExceededException + if *v == nil { + sv = &types.ReplayLimitExceededException{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sns/endpoints.go b/service/sns/endpoints.go index 45415dd3859..7568d01af2c 100644 --- a/service/sns/endpoints.go +++ b/service/sns/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { if _Region == "us-gov-east-1" { uriString := "https://sns.us-gov-east-1.amazonaws.com" diff --git a/service/sns/types/errors.go b/service/sns/types/errors.go index 3fc0dcf06e1..cadbd8dbfc4 100644 --- a/service/sns/types/errors.go +++ b/service/sns/types/errors.go @@ -327,6 +327,32 @@ func (e *InvalidSecurityException) ErrorCode() string { } func (e *InvalidSecurityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Indicates that the specified state is not a valid state for an event source. +type InvalidStateException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidStateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidStateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidStateException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidState" + } + return *e.ErrorCodeOverride +} +func (e *InvalidStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The ciphertext references a key that doesn't exist or that you don't have // access to. type KMSAccessDeniedException struct { @@ -354,8 +380,8 @@ func (e *KMSAccessDeniedException) ErrorCode() string { } func (e *KMSAccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The request was rejected because the specified customer master key (CMK) isn't -// enabled. +// The request was rejected because the specified Amazon Web Services KMS key +// isn't enabled. type KMSDisabledException struct { Message *string @@ -382,8 +408,8 @@ func (e *KMSDisabledException) ErrorCode() string { func (e *KMSDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because the state of the specified resource isn't -// valid for this request. For more information, see How Key State Affects Use of -// a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// valid for this request. For more information, see Key states of Amazon Web +// Services KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the Key Management Service Developer Guide. type KMSInvalidStateException struct { Message *string @@ -573,6 +599,33 @@ func (e *PlatformApplicationDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Indicates that the request parameter has exceeded the maximum number of +// concurrent message replays. +type ReplayLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ReplayLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ReplayLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ReplayLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ReplayLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *ReplayLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Can’t perform the action on the specified resource. Make sure that the resource // exists. type ResourceNotFoundException struct { diff --git a/service/ssmsap/api_op_ListApplications.go b/service/ssmsap/api_op_ListApplications.go index ad5c7cbfb31..18d3b10412d 100644 --- a/service/ssmsap/api_op_ListApplications.go +++ b/service/ssmsap/api_op_ListApplications.go @@ -34,6 +34,9 @@ func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsI type ListApplicationsInput struct { + // The filter of name, value, and operator. + Filters []types.Filter + // The maximum number of results to return with a single call. To retrieve the // remaining results, make another call with the returned nextToken value. MaxResults *int32 @@ -110,6 +113,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addListApplicationsResolveEndpointMiddleware(stack, options); err != nil { return err } + if err = addOpListApplicationsValidationMiddleware(stack); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ssmsap/api_op_RegisterApplication.go b/service/ssmsap/api_op_RegisterApplication.go index 2412c74e210..ee8d3d237b7 100644 --- a/service/ssmsap/api_op_RegisterApplication.go +++ b/service/ssmsap/api_op_RegisterApplication.go @@ -49,16 +49,17 @@ type RegisterApplicationInput struct { // This member is required. ApplicationType types.ApplicationType - // The credentials of the SAP application. - // - // This member is required. - Credentials []types.ApplicationCredential - // The Amazon EC2 instances on which your SAP application is running. // // This member is required. Instances []string + // The credentials of the SAP application. + Credentials []types.ApplicationCredential + + // The Amazon Resource Name of the SAP HANA database. + DatabaseArn *string + // The SAP instance number of the application. SapInstanceNumber *string diff --git a/service/ssmsap/api_op_UpdateApplicationSettings.go b/service/ssmsap/api_op_UpdateApplicationSettings.go index 020728208a7..c0a4371ddd5 100644 --- a/service/ssmsap/api_op_UpdateApplicationSettings.go +++ b/service/ssmsap/api_op_UpdateApplicationSettings.go @@ -49,6 +49,10 @@ type UpdateApplicationSettingsInput struct { // The credentials to be removed. CredentialsToRemove []types.ApplicationCredential + // The Amazon Resource Name of the SAP HANA database that replaces the current SAP + // HANA connection with the SAP_ABAP application. + DatabaseArn *string + noSmithyDocumentSerde } diff --git a/service/ssmsap/deserializers.go b/service/ssmsap/deserializers.go index 9d338b1b83f..2274936600f 100644 --- a/service/ssmsap/deserializers.go +++ b/service/ssmsap/deserializers.go @@ -249,6 +249,9 @@ func awsRestjson1_deserializeOpErrorDeregisterApplication(response *smithyhttp.R case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -518,6 +521,9 @@ func awsRestjson1_deserializeOpErrorGetComponent(response *smithyhttp.Response, case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -1300,6 +1306,9 @@ func awsRestjson1_deserializeOpErrorListComponents(response *smithyhttp.Response case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2093,6 +2102,9 @@ func awsRestjson1_deserializeOpErrorRegisterApplication(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2258,6 +2270,9 @@ func awsRestjson1_deserializeOpErrorStartApplicationRefresh(response *smithyhttp case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2596,6 +2611,9 @@ func awsRestjson1_deserializeOpErrorUpdateApplicationSettings(response *smithyht case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2762,6 +2780,42 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return output } +func awsRestjson1_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnauthorizedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + err := awsRestjson1_deserializeDocumentUnauthorizedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ValidationException{} var buff [1024]byte @@ -3036,6 +3090,15 @@ func awsRestjson1_deserializeDocumentApplicationSummary(v **types.ApplicationSum sv.Arn = ptr.String(jtv) } + case "DiscoveryStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationDiscoveryStatus to be of type string, got %T instead", value) + } + sv.DiscoveryStatus = types.ApplicationDiscoveryStatus(jtv) + } + case "Id": if value != nil { jtv, ok := value.(string) @@ -3142,6 +3205,11 @@ func awsRestjson1_deserializeDocumentAssociatedHost(v **types.AssociatedHost, va sv.Hostname = ptr.String(jtv) } + case "IpAddresses": + if err := awsRestjson1_deserializeDocumentIpAddressList(&sv.IpAddresses, value); err != nil { + return err + } + case "OsVersion": if value != nil { jtv, ok := value.(string) @@ -3228,6 +3296,11 @@ func awsRestjson1_deserializeDocumentComponent(v **types.Component, value interf sv.ComponentType = types.ComponentType(jtv) } + case "DatabaseConnection": + if err := awsRestjson1_deserializeDocumentDatabaseConnection(&sv.DatabaseConnection, value); err != nil { + return err + } + case "Databases": if err := awsRestjson1_deserializeDocumentDatabaseIdList(&sv.Databases, value); err != nil { return err @@ -3286,6 +3359,15 @@ func awsRestjson1_deserializeDocumentComponent(v **types.Component, value interf return err } + case "SapFeature": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SapFeature = ptr.String(jtv) + } + case "SapHostname": if value != nil { jtv, ok := value.(string) @@ -3304,6 +3386,15 @@ func awsRestjson1_deserializeDocumentComponent(v **types.Component, value interf sv.SapKernelVersion = ptr.String(jtv) } + case "Sid": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SID to be of type string, got %T instead", value) + } + sv.Sid = ptr.String(jtv) + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -3313,6 +3404,15 @@ func awsRestjson1_deserializeDocumentComponent(v **types.Component, value interf sv.Status = types.ComponentStatus(jtv) } + case "SystemNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SAPInstanceNumber to be of type string, got %T instead", value) + } + sv.SystemNumber = ptr.String(jtv) + } + default: _, _ = key, value @@ -3641,6 +3741,64 @@ func awsRestjson1_deserializeDocumentDatabase(v **types.Database, value interfac return nil } +func awsRestjson1_deserializeDocumentDatabaseConnection(v **types.DatabaseConnection, 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.DatabaseConnection + if *v == nil { + sv = &types.DatabaseConnection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectionIp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConnectionIp = ptr.String(jtv) + } + + case "DatabaseArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SsmSapArn to be of type string, got %T instead", value) + } + sv.DatabaseArn = ptr.String(jtv) + } + + case "DatabaseConnectionMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatabaseConnectionMethod to be of type string, got %T instead", value) + } + sv.DatabaseConnectionMethod = types.DatabaseConnectionMethod(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDatabaseIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3951,6 +4109,98 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentIpAddressList(v *[]types.IpAddressMember, 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.IpAddressMember + if *v == nil { + cv = []types.IpAddressMember{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IpAddressMember + destAddr := &col + if err := awsRestjson1_deserializeDocumentIpAddressMember(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentIpAddressMember(v **types.IpAddressMember, 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.IpAddressMember + if *v == nil { + sv = &types.IpAddressMember{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllocationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AllocationType to be of type string, got %T instead", value) + } + sv.AllocationType = types.AllocationType(jtv) + } + + case "IpAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } + + case "Primary": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Primary = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentOperation(v **types.Operation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4235,6 +4485,15 @@ func awsRestjson1_deserializeDocumentResilience(v **types.Resilience, value inte sv.ClusterStatus = types.ClusterStatus(jtv) } + case "EnqueueReplication": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnqueueReplication = ptr.Bool(jtv) + } + case "HsrOperationMode": if value != nil { jtv, ok := value.(string) @@ -4347,6 +4606,46 @@ func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interfac return nil } +func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, 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.UnauthorizedException + if *v == nil { + sv = &types.UnauthorizedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ssmsap/endpoints.go b/service/ssmsap/endpoints.go index 92c10aa89d2..73c78e0a186 100644 --- a/service/ssmsap/endpoints.go +++ b/service/ssmsap/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://ssm-sap-fips.") diff --git a/service/ssmsap/serializers.go b/service/ssmsap/serializers.go index 48772446412..3045a763892 100644 --- a/service/ssmsap/serializers.go +++ b/service/ssmsap/serializers.go @@ -651,6 +651,13 @@ func awsRestjson1_serializeOpDocumentListApplicationsInput(v *ListApplicationsIn object := value.Object() defer object.Close() + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + return err + } + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -1165,6 +1172,11 @@ func awsRestjson1_serializeOpDocumentRegisterApplicationInput(v *RegisterApplica } } + if v.DatabaseArn != nil { + ok := object.Key("DatabaseArn") + ok.String(*v.DatabaseArn) + } + if v.Instances != nil { ok := object.Key("Instances") if err := awsRestjson1_serializeDocumentInstanceList(v.Instances, ok); err != nil { @@ -1521,6 +1533,11 @@ func awsRestjson1_serializeOpDocumentUpdateApplicationSettingsInput(v *UpdateApp } } + if v.DatabaseArn != nil { + ok := object.Key("DatabaseArn") + ok.String(*v.DatabaseArn) + } + return nil } diff --git a/service/ssmsap/types/enums.go b/service/ssmsap/types/enums.go index 5a56e63c77e..143aa340fde 100644 --- a/service/ssmsap/types/enums.go +++ b/service/ssmsap/types/enums.go @@ -2,6 +2,28 @@ package types +type AllocationType string + +// Enum values for AllocationType +const ( + AllocationTypeVpcSubnet AllocationType = "VPC_SUBNET" + AllocationTypeElasticIp AllocationType = "ELASTIC_IP" + AllocationTypeOverlay AllocationType = "OVERLAY" + AllocationTypeUnknown AllocationType = "UNKNOWN" +) + +// Values returns all known values for AllocationType. 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 (AllocationType) Values() []AllocationType { + return []AllocationType{ + "VPC_SUBNET", + "ELASTIC_IP", + "OVERLAY", + "UNKNOWN", + } +} + type ApplicationDiscoveryStatus string // Enum values for ApplicationDiscoveryStatus @@ -60,7 +82,8 @@ type ApplicationType string // Enum values for ApplicationType const ( - ApplicationTypeHana ApplicationType = "HANA" + ApplicationTypeHana ApplicationType = "HANA" + ApplicationTypeSapAbap ApplicationType = "SAP_ABAP" ) // Values returns all known values for ApplicationType. Note that this can be @@ -69,6 +92,7 @@ const ( func (ApplicationType) Values() []ApplicationType { return []ApplicationType{ "HANA", + "SAP_ABAP", } } @@ -146,6 +170,12 @@ type ComponentType string const ( ComponentTypeHana ComponentType = "HANA" ComponentTypeHanaNode ComponentType = "HANA_NODE" + ComponentTypeAbap ComponentType = "ABAP" + ComponentTypeAscs ComponentType = "ASCS" + ComponentTypeDialog ComponentType = "DIALOG" + ComponentTypeWebdisp ComponentType = "WEBDISP" + ComponentTypeWd ComponentType = "WD" + ComponentTypeErs ComponentType = "ERS" ) // Values returns all known values for ComponentType. Note that this can be @@ -155,6 +185,12 @@ func (ComponentType) Values() []ComponentType { return []ComponentType{ "HANA", "HANA_NODE", + "ABAP", + "ASCS", + "DIALOG", + "WEBDISP", + "WD", + "ERS", } } @@ -174,6 +210,24 @@ func (CredentialType) Values() []CredentialType { } } +type DatabaseConnectionMethod string + +// Enum values for DatabaseConnectionMethod +const ( + DatabaseConnectionMethodDirect DatabaseConnectionMethod = "DIRECT" + DatabaseConnectionMethodOverlay DatabaseConnectionMethod = "OVERLAY" +) + +// Values returns all known values for DatabaseConnectionMethod. 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 (DatabaseConnectionMethod) Values() []DatabaseConnectionMethod { + return []DatabaseConnectionMethod{ + "DIRECT", + "OVERLAY", + } +} + type DatabaseStatus string // Enum values for DatabaseStatus diff --git a/service/ssmsap/types/errors.go b/service/ssmsap/types/errors.go index bcf891db0ac..e5164c366e5 100644 --- a/service/ssmsap/types/errors.go +++ b/service/ssmsap/types/errors.go @@ -85,6 +85,32 @@ func (e *ResourceNotFoundException) ErrorCode() string { } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request is not authorized. +type UnauthorizedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnauthorizedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnauthorizedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnauthorizedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnauthorizedException" + } + return *e.ErrorCodeOverride +} +func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The input fails to satisfy the constraints specified by an AWS service. type ValidationException struct { Message *string diff --git a/service/ssmsap/types/types.go b/service/ssmsap/types/types.go index 57dd5289b40..27fba160862 100644 --- a/service/ssmsap/types/types.go +++ b/service/ssmsap/types/types.go @@ -68,6 +68,9 @@ type ApplicationSummary struct { // The Amazon Resource Name (ARN) of the application. Arn *string + // The status of the latest discovery. + DiscoveryStatus ApplicationDiscoveryStatus + // The ID of the application. Id *string @@ -89,6 +92,9 @@ type AssociatedHost struct { // The name of the host. Hostname *string + // The IP addresses of the associated host. + IpAddresses []IpAddressMember + // The version of the operating system. OsVersion *string @@ -135,6 +141,9 @@ type Component struct { // The type of the component. ComponentType ComponentType + // The connection specifications for the database of the component. + DatabaseConnection *DatabaseConnection + // The SAP HANA databases of the component. Databases []string @@ -162,15 +171,34 @@ type Component struct { // Details of the SAP HANA system replication for the component. Resilience *Resilience + // The SAP feature of the component. + SapFeature *string + // The hostname of the component. SapHostname *string // The kernel version of the component. SapKernelVersion *string + // The SAP System Identifier of the application component. + Sid *string + // The status of the component. + // - ACTIVATED - this status has been deprecated. + // - STARTING - the component is in the process of being started. + // - STOPPED - the component is not running. + // - STOPPING - the component is in the process of being stopped. + // - RUNNING - the component is running. + // - RUNNING_WITH_ERROR - one or more child component(s) of the parent component + // is not running. Call GetComponent (https://docs.aws.amazon.com/ssmsap/latest/APIReference/API_GetComponent.html) + // to review the status of each child component. + // - UNDEFINED - AWS Systems Manager for SAP cannot provide the component status + // based on the discovered information. Verify your SAP application. Status ComponentStatus + // The SAP system number of the application component. + SystemNumber *string + noSmithyDocumentSerde } @@ -235,6 +263,21 @@ type Database struct { noSmithyDocumentSerde } +// The connection specifications for the database. +type DatabaseConnection struct { + + // The IP address for connection. + ConnectionIp *string + + // The Amazon Resource Name of the connected SAP HANA database. + DatabaseArn *string + + // The method of connection. + DatabaseConnectionMethod DatabaseConnectionMethod + + noSmithyDocumentSerde +} + // The summary of the database. type DatabaseSummary struct { @@ -306,6 +349,21 @@ type Host struct { noSmithyDocumentSerde } +// Provides information of the IP address. +type IpAddressMember struct { + + // The type of allocation for the IP address. + AllocationType AllocationType + + // The IP address. + IpAddress *string + + // The primary IP address. + Primary *bool + + noSmithyDocumentSerde +} + // The operations performed by AWS Systems Manager for SAP. type Operation struct { @@ -351,6 +409,9 @@ type Resilience struct { // The cluster status of the component. ClusterStatus ClusterStatus + // Indicates if or not enqueue replication is enabled for the ASCS component. + EnqueueReplication *bool + // The operation mode of the component. HsrOperationMode OperationMode diff --git a/service/ssmsap/validators.go b/service/ssmsap/validators.go index e2d0afbffee..e2f342b6fee 100644 --- a/service/ssmsap/validators.go +++ b/service/ssmsap/validators.go @@ -110,6 +110,26 @@ func (m *validateOpGetResourcePermission) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpListApplications struct { +} + +func (*validateOpListApplications) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListApplications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListApplicationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListApplicationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListOperations struct { } @@ -290,6 +310,10 @@ func addOpGetResourcePermissionValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpGetResourcePermission{}, middleware.After) } +func addOpListApplicationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListApplications{}, middleware.After) +} + func addOpListOperationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListOperations{}, middleware.After) } @@ -494,6 +518,23 @@ func validateOpGetResourcePermissionInput(v *GetResourcePermissionInput) error { } } +func validateOpListApplicationsInput(v *ListApplicationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListApplicationsInput"} + if v.Filters != nil { + if err := validateFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListOperationsInput(v *ListOperationsInput) error { if v == nil { return nil @@ -564,9 +605,7 @@ func validateOpRegisterApplicationInput(v *RegisterApplicationInput) error { if v.Instances == nil { invalidParams.Add(smithy.NewErrParamRequired("Instances")) } - if v.Credentials == nil { - invalidParams.Add(smithy.NewErrParamRequired("Credentials")) - } else if v.Credentials != nil { + if v.Credentials != nil { if err := validateApplicationCredentialList(v.Credentials); err != nil { invalidParams.AddNested("Credentials", err.(smithy.InvalidParamsError)) } diff --git a/service/transfer/api_op_CreateUser.go b/service/transfer/api_op_CreateUser.go index 88ce2d93169..125ad56c745 100644 --- a/service/transfer/api_op_CreateUser.go +++ b/service/transfer/api_op_CreateUser.go @@ -120,9 +120,9 @@ type CreateUserInput struct { PosixProfile *types.PosixProfile // The public portion of the Secure Shell (SSH) key used to authenticate the user - // to the server. The three standard SSH public key format elements are , , and an - // optional , with spaces between each element. Transfer Family accepts RSA, - // ECDSA, and ED25519 keys. + // to the server. The three standard SSH public key format elements are + // , , and an optional , with spaces between each element. + // Transfer Family accepts RSA, ECDSA, and ED25519 keys. // - For RSA keys, the key type is ssh-rsa . // - For ED25519 keys, the key type is ssh-ed25519 . // - For ECDSA keys, the key type is either ecdsa-sha2-nistp256 , diff --git a/service/transfer/api_op_DescribeServer.go b/service/transfer/api_op_DescribeServer.go index f0607f04de2..4de8c75c01f 100644 --- a/service/transfer/api_op_DescribeServer.go +++ b/service/transfer/api_op_DescribeServer.go @@ -159,8 +159,8 @@ type ServerOfflineWaiterOptions struct { MinDelay time.Duration // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ServerOfflineWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. + // set to zero, ServerOfflineWaiter will use default max delay of 3600 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. MaxDelay time.Duration // LogWaitAttempts is used to enable logging for waiter retry attempts @@ -188,7 +188,7 @@ type ServerOfflineWaiter struct { func NewServerOfflineWaiter(client DescribeServerAPIClient, optFns ...func(*ServerOfflineWaiterOptions)) *ServerOfflineWaiter { options := ServerOfflineWaiterOptions{} options.MinDelay = 30 * time.Second - options.MaxDelay = 120 * time.Second + options.MaxDelay = 3600 * time.Second options.Retryable = serverOfflineStateRetryable for _, fn := range optFns { @@ -223,7 +223,7 @@ func (w *ServerOfflineWaiter) WaitForOutput(ctx context.Context, params *Describ } if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second + options.MaxDelay = 3600 * time.Second } if options.MinDelay > options.MaxDelay { @@ -336,7 +336,7 @@ type ServerOnlineWaiterOptions struct { MinDelay time.Duration // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ServerOnlineWaiter will use default max delay of 120 seconds. Note + // set to zero, ServerOnlineWaiter will use default max delay of 3600 seconds. Note // that MaxDelay must resolve to value greater than or equal to the MinDelay. MaxDelay time.Duration @@ -365,7 +365,7 @@ type ServerOnlineWaiter struct { func NewServerOnlineWaiter(client DescribeServerAPIClient, optFns ...func(*ServerOnlineWaiterOptions)) *ServerOnlineWaiter { options := ServerOnlineWaiterOptions{} options.MinDelay = 30 * time.Second - options.MaxDelay = 120 * time.Second + options.MaxDelay = 3600 * time.Second options.Retryable = serverOnlineStateRetryable for _, fn := range optFns { @@ -399,7 +399,7 @@ func (w *ServerOnlineWaiter) WaitForOutput(ctx context.Context, params *Describe } if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second + options.MaxDelay = 3600 * time.Second } if options.MinDelay > options.MaxDelay { diff --git a/service/transfer/deserializers.go b/service/transfer/deserializers.go index 2d69871bffc..115470e3428 100644 --- a/service/transfer/deserializers.go +++ b/service/transfer/deserializers.go @@ -8694,7 +8694,7 @@ func awsAwsjson11_deserializeDocumentDescribedServer(v **types.DescribedServer, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Role to be of type string, got %T instead", value) + return fmt.Errorf("expected NullableRole to be of type string, got %T instead", value) } sv.LoggingRole = ptr.String(jtv) } diff --git a/service/transfer/endpoints.go b/service/transfer/endpoints.go index d4803f67dc0..bd16759d0e4 100644 --- a/service/transfer/endpoints.go +++ b/service/transfer/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://transfer-fips.") diff --git a/service/transfer/types/types.go b/service/transfer/types/types.go index eabd5baccae..be7a1c62734 100644 --- a/service/transfer/types/types.go +++ b/service/transfer/types/types.go @@ -1558,18 +1558,19 @@ type SftpConnectorConfig struct { // The public portion of the host key, or keys, that are used to identify the // external server to which you are connecting. You can use the ssh-keyscan // command against the SFTP server to retrieve the necessary key. The three - // standard SSH public key format elements are , , and an optional , with spaces - // between each element. Specify only the and : do not enter the portion of the - // key. For the trusted host key, Transfer Family accepts RSA and ECDSA keys. - // - For RSA keys, the string is ssh-rsa . - // - For ECDSA keys, the string is either ecdsa-sha2-nistp256 , + // standard SSH public key format elements are , , and an + // optional , with spaces between each element. Specify only the and : do not enter the portion of the key. For + // the trusted host key, Transfer Family accepts RSA and ECDSA keys. + // - For RSA keys, the string is ssh-rsa . + // - For ECDSA keys, the string is either ecdsa-sha2-nistp256 , // ecdsa-sha2-nistp384 , or ecdsa-sha2-nistp521 , depending on the size of the // key you generated. TrustedHostKeys []string // The identifier for the secret (in Amazon Web Services Secrets Manager) that - // contains the SFTP user's private key, password, or both. The identifier can be - // either the Amazon Resource Name (ARN) or the name of the secret. + // contains the SFTP user's private key, password, or both. The identifier must be + // the Amazon Resource Name (ARN) of the secret. UserSecretId *string noSmithyDocumentSerde