diff --git a/.changelog/56285e969f88421c953edff772ac88c8.json b/.changelog/56285e969f88421c953edff772ac88c8.json new file mode 100644 index 00000000000..2f7af3c8ddb --- /dev/null +++ b/.changelog/56285e969f88421c953edff772ac88c8.json @@ -0,0 +1,8 @@ +{ + "id": "56285e96-9f88-421c-953e-dff772ac88c8", + "type": "feature", + "description": "This change allows the customer to use the SRT Caller protocol as part of their flows", + "modules": [ + "service/mediaconnect" + ] +} \ No newline at end of file diff --git a/.changelog/8acb4360965742d3bc53c0d2f348eb53.json b/.changelog/8acb4360965742d3bc53c0d2f348eb53.json new file mode 100644 index 00000000000..27f6c6cd74a --- /dev/null +++ b/.changelog/8acb4360965742d3bc53c0d2f348eb53.json @@ -0,0 +1,8 @@ +{ + "id": "8acb4360-9657-42d3-bc53-c0d2f348eb53", + "type": "feature", + "description": "This release adds support for Amazon RDS Proxy with SQL Server compatibility.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/a0cc0f9b991448b1b2b7bd2f124d321b.json b/.changelog/a0cc0f9b991448b1b2b7bd2f124d321b.json new file mode 100644 index 00000000000..bf3fedf725e --- /dev/null +++ b/.changelog/a0cc0f9b991448b1b2b7bd2f124d321b.json @@ -0,0 +1,8 @@ +{ + "id": "a0cc0f9b-9914-48b1-b2b7-bd2f124d321b", + "type": "feature", + "description": "This release includes support for importing existing trails into CloudTrail Lake.", + "modules": [ + "service/cloudtrail" + ] +} \ No newline at end of file diff --git a/.changelog/bf575dee378a4df0b4117175fdab8d02.json b/.changelog/bf575dee378a4df0b4117175fdab8d02.json new file mode 100644 index 00000000000..6bbf51a0c2d --- /dev/null +++ b/.changelog/bf575dee378a4df0b4117175fdab8d02.json @@ -0,0 +1,8 @@ +{ + "id": "bf575dee-378a-4df0-b411-7175fdab8d02", + "type": "feature", + "description": "This release adds CapacityAllocations field to DescribeCapacityReservations", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/service/cloudtrail/api_op_GetEventSelectors.go b/service/cloudtrail/api_op_GetEventSelectors.go index 6949491ae68..55b5f1f0b52 100644 --- a/service/cloudtrail/api_op_GetEventSelectors.go +++ b/service/cloudtrail/api_op_GetEventSelectors.go @@ -25,9 +25,16 @@ import ( // selector includes data events, the resources on which you are logging data // events. // -// For more information, see Logging Data and Management Events for Trails -// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) -// in the CloudTrail User Guide. +// For more information about logging management and data events, see the +// following topics in the CloudTrail User Guide: +// +// * Logging management events for +// trails +// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html) +// +// * +// Logging data events for trails +// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) func (c *Client) GetEventSelectors(ctx context.Context, params *GetEventSelectorsInput, optFns ...func(*Options)) (*GetEventSelectorsOutput, error) { if params == nil { params = &GetEventSelectorsInput{} diff --git a/service/cloudtrail/api_op_GetImport.go b/service/cloudtrail/api_op_GetImport.go new file mode 100644 index 00000000000..3e302d512b5 --- /dev/null +++ b/service/cloudtrail/api_op_GetImport.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudtrail + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/cloudtrail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns information for the specified import. +func (c *Client) GetImport(ctx context.Context, params *GetImportInput, optFns ...func(*Options)) (*GetImportOutput, error) { + if params == nil { + params = &GetImportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetImport", params, optFns, c.addOperationGetImportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetImportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetImportInput struct { + + // The ID for the import. + // + // This member is required. + ImportId *string + + noSmithyDocumentSerde +} + +type GetImportOutput struct { + + // The timestamp of the import's creation. + CreatedTimestamp *time.Time + + // The destination event data store. + Destinations []string + + // Used with StartEventTime to bound a StartImport request, and limit imported + // trail events to only those events logged within a specified time period. + EndEventTime *time.Time + + // The ID of the import. + ImportId *string + + // The source S3 bucket. + ImportSource *types.ImportSource + + // Provides statistics for the import. + ImportStatistics *types.ImportStatistics + + // The status of the import. + ImportStatus types.ImportStatus + + // Used with EndEventTime to bound a StartImport request, and limit imported trail + // events to only those events logged within a specified time period. + StartEventTime *time.Time + + // The timestamp of when the import was updated. + UpdatedTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetImportMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetImport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetImport{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetImportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImport(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetImport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cloudtrail", + OperationName: "GetImport", + } +} diff --git a/service/cloudtrail/api_op_ListImportFailures.go b/service/cloudtrail/api_op_ListImportFailures.go new file mode 100644 index 00000000000..f25d5c03eea --- /dev/null +++ b/service/cloudtrail/api_op_ListImportFailures.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudtrail + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/cloudtrail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of failures for the specified import. +func (c *Client) ListImportFailures(ctx context.Context, params *ListImportFailuresInput, optFns ...func(*Options)) (*ListImportFailuresOutput, error) { + if params == nil { + params = &ListImportFailuresInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListImportFailures", params, optFns, c.addOperationListImportFailuresMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListImportFailuresOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListImportFailuresInput struct { + + // The ID of the import. + // + // This member is required. + ImportId *string + + // The maximum number of failures to display on a single page. + MaxResults *int32 + + // A token you can use to get the next page of import failures. + NextToken *string + + noSmithyDocumentSerde +} + +type ListImportFailuresOutput struct { + + // Contains information about the import failures. + Failures []types.ImportFailureListItem + + // A token you can use to get the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListImportFailuresMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListImportFailures{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListImportFailures{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListImportFailuresValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImportFailures(options.Region), middleware.Before); 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 + } + return nil +} + +// ListImportFailuresAPIClient is a client that implements the ListImportFailures +// operation. +type ListImportFailuresAPIClient interface { + ListImportFailures(context.Context, *ListImportFailuresInput, ...func(*Options)) (*ListImportFailuresOutput, error) +} + +var _ ListImportFailuresAPIClient = (*Client)(nil) + +// ListImportFailuresPaginatorOptions is the paginator options for +// ListImportFailures +type ListImportFailuresPaginatorOptions struct { + // The maximum number of failures to display on a single page. + 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 +} + +// ListImportFailuresPaginator is a paginator for ListImportFailures +type ListImportFailuresPaginator struct { + options ListImportFailuresPaginatorOptions + client ListImportFailuresAPIClient + params *ListImportFailuresInput + nextToken *string + firstPage bool +} + +// NewListImportFailuresPaginator returns a new ListImportFailuresPaginator +func NewListImportFailuresPaginator(client ListImportFailuresAPIClient, params *ListImportFailuresInput, optFns ...func(*ListImportFailuresPaginatorOptions)) *ListImportFailuresPaginator { + if params == nil { + params = &ListImportFailuresInput{} + } + + options := ListImportFailuresPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListImportFailuresPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListImportFailuresPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListImportFailures page. +func (p *ListImportFailuresPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImportFailuresOutput, 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.ListImportFailures(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_opListImportFailures(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cloudtrail", + OperationName: "ListImportFailures", + } +} diff --git a/service/cloudtrail/api_op_ListImports.go b/service/cloudtrail/api_op_ListImports.go new file mode 100644 index 00000000000..ae2c29b886a --- /dev/null +++ b/service/cloudtrail/api_op_ListImports.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudtrail + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/cloudtrail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information on all imports, or a select set of imports by ImportStatus +// or Destination. +func (c *Client) ListImports(ctx context.Context, params *ListImportsInput, optFns ...func(*Options)) (*ListImportsOutput, error) { + if params == nil { + params = &ListImportsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListImports", params, optFns, c.addOperationListImportsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListImportsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListImportsInput struct { + + // The destination event data store. + Destination *string + + // The status of the import. + ImportStatus types.ImportStatus + + // The maximum number of imports to display on a single page. + MaxResults *int32 + + // A token you can use to get the next page of import results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListImportsOutput struct { + + // The list of returned imports. + Imports []types.ImportsListItem + + // A token you can use to get the next page of import results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListImports{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListImports{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImports(options.Region), middleware.Before); 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 + } + return nil +} + +// ListImportsAPIClient is a client that implements the ListImports operation. +type ListImportsAPIClient interface { + ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) +} + +var _ ListImportsAPIClient = (*Client)(nil) + +// ListImportsPaginatorOptions is the paginator options for ListImports +type ListImportsPaginatorOptions struct { + // The maximum number of imports to display on a single page. + 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 +} + +// ListImportsPaginator is a paginator for ListImports +type ListImportsPaginator struct { + options ListImportsPaginatorOptions + client ListImportsAPIClient + params *ListImportsInput + nextToken *string + firstPage bool +} + +// NewListImportsPaginator returns a new ListImportsPaginator +func NewListImportsPaginator(client ListImportsAPIClient, params *ListImportsInput, optFns ...func(*ListImportsPaginatorOptions)) *ListImportsPaginator { + if params == nil { + params = &ListImportsInput{} + } + + options := ListImportsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListImportsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListImportsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListImports page. +func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImportsOutput, 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.ListImports(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_opListImports(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cloudtrail", + OperationName: "ListImports", + } +} diff --git a/service/cloudtrail/api_op_PutEventSelectors.go b/service/cloudtrail/api_op_PutEventSelectors.go index 63a5abd3e07..3d87a81704e 100644 --- a/service/cloudtrail/api_op_PutEventSelectors.go +++ b/service/cloudtrail/api_op_PutEventSelectors.go @@ -40,8 +40,10 @@ import ( // The PutEventSelectors operation must be called from the region in which // the trail was created; otherwise, an InvalidHomeRegionException exception is // thrown. You can configure up to five event selectors for each trail. For more -// information, see Logging data and management events for trails -// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) +// information, see Logging management events for trails +// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html), +// Logging data events for trails +// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html), // and Quotas in CloudTrail // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) // in the CloudTrail User Guide. You can add advanced event selectors, and diff --git a/service/cloudtrail/api_op_StartImport.go b/service/cloudtrail/api_op_StartImport.go new file mode 100644 index 00000000000..246a02cbf7d --- /dev/null +++ b/service/cloudtrail/api_op_StartImport.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudtrail + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/cloudtrail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Starts an import of logged trail events from a source S3 bucket to a destination +// event data store. When you start a new import, the Destinations and ImportSource +// parameters are required. Before starting a new import, disable any access +// control lists (ACLs) attached to the source S3 bucket. For more information +// about disabling ACLs, see Controlling ownership of objects and disabling ACLs +// for your bucket +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html). +// When you retry an import, the ImportID parameter is required. +func (c *Client) StartImport(ctx context.Context, params *StartImportInput, optFns ...func(*Options)) (*StartImportOutput, error) { + if params == nil { + params = &StartImportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartImport", params, optFns, c.addOperationStartImportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartImportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartImportInput struct { + + // The destination event data store. Use this parameter for a new import. + Destinations []string + + // Use with StartEventTime to bound a StartImport request, and limit imported trail + // events to only those events logged within a specified time period. + EndEventTime *time.Time + + // The ID of the import. Use this parameter when you are retrying an import. + ImportId *string + + // The source S3 bucket for the import. Use this parameter for a new import. + ImportSource *types.ImportSource + + // Use with EndEventTime to bound a StartImport request, and limit imported trail + // events to only those events logged within a specified time period. + StartEventTime *time.Time + + noSmithyDocumentSerde +} + +type StartImportOutput struct { + + // The timestamp for the import's creation. + CreatedTimestamp *time.Time + + // The destination event data store. + Destinations []string + + // Used with StartEventTime to bound a StartImport request, and limit imported + // trail events to only those events logged within a specified time period. + EndEventTime *time.Time + + // The ID of the import. + ImportId *string + + // The source S3 bucket. + ImportSource *types.ImportSource + + // Shows the status of the import after a StartImport request. An import finishes + // with a status of COMPLETED if there were no failures, or FAILED if there were + // failures. + ImportStatus types.ImportStatus + + // Used with EndEventTime to bound a StartImport request, and limit imported trail + // events to only those events logged within a specified time period. + StartEventTime *time.Time + + // The timestamp of the import's last update, if applicable. + UpdatedTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartImportMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartImport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartImport{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStartImportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartImport(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opStartImport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cloudtrail", + OperationName: "StartImport", + } +} diff --git a/service/cloudtrail/api_op_StopImport.go b/service/cloudtrail/api_op_StopImport.go new file mode 100644 index 00000000000..7d137796fb6 --- /dev/null +++ b/service/cloudtrail/api_op_StopImport.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudtrail + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/cloudtrail/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Stops a specified import. +func (c *Client) StopImport(ctx context.Context, params *StopImportInput, optFns ...func(*Options)) (*StopImportOutput, error) { + if params == nil { + params = &StopImportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopImport", params, optFns, c.addOperationStopImportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopImportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopImportInput struct { + + // The ID of the import. + // + // This member is required. + ImportId *string + + noSmithyDocumentSerde +} + +type StopImportOutput struct { + + // The timestamp of the import's creation. + CreatedTimestamp *time.Time + + // The destination event data store. + Destinations []string + + // Used with StartEventTime to bound a StartImport request, and limit imported + // trail events to only those events logged within a specified time period. + EndEventTime *time.Time + + // The ID for the import. + ImportId *string + + // The source S3 bucket. + ImportSource *types.ImportSource + + // Returns information on the stopped import. + ImportStatistics *types.ImportStatistics + + // The status of the import. + ImportStatus types.ImportStatus + + // Used with EndEventTime to bound a StartImport request, and limit imported trail + // events to only those events logged within a specified time period. + StartEventTime *time.Time + + // The timestamp of the import's last update. + UpdatedTimestamp *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopImportMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopImport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopImport{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpStopImportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopImport(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opStopImport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cloudtrail", + OperationName: "StopImport", + } +} diff --git a/service/cloudtrail/api_op_UpdateEventDataStore.go b/service/cloudtrail/api_op_UpdateEventDataStore.go index 79be40d1ce9..5e25916c04d 100644 --- a/service/cloudtrail/api_op_UpdateEventDataStore.go +++ b/service/cloudtrail/api_op_UpdateEventDataStore.go @@ -42,7 +42,8 @@ type UpdateEventDataStoreInput struct { // This member is required. EventDataStore *string - // The advanced event selectors used to select events for the event data store. + // The advanced event selectors used to select events for the event data store. You + // can configure up to five advanced event selectors for each event data store. AdvancedEventSelectors []types.AdvancedEventSelector // Specifies whether an event data store collects events from all regions, or only diff --git a/service/cloudtrail/deserializers.go b/service/cloudtrail/deserializers.go index c7b76364dec..84d022ab96a 100644 --- a/service/cloudtrail/deserializers.go +++ b/service/cloudtrail/deserializers.go @@ -739,6 +739,9 @@ func awsAwsjson11_deserializeOpErrorDeleteEventDataStore(response *smithyhttp.Re case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) + case strings.EqualFold("EventDataStoreHasOngoingImportException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreHasOngoingImportException(response, errorBody) + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) @@ -1511,6 +1514,126 @@ func awsAwsjson11_deserializeOpErrorGetEventSelectors(response *smithyhttp.Respo } } +type awsAwsjson11_deserializeOpGetImport struct { +} + +func (*awsAwsjson11_deserializeOpGetImport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetImport) 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, awsAwsjson11_deserializeOpErrorGetImport(response, &metadata) + } + output := &GetImportOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetImportOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetImport(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ImportNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorImportNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpGetInsightSelectors struct { } @@ -2246,14 +2369,14 @@ func awsAwsjson11_deserializeOpErrorListEventDataStores(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListPublicKeys struct { +type awsAwsjson11_deserializeOpListImportFailures struct { } -func (*awsAwsjson11_deserializeOpListPublicKeys) ID() string { +func (*awsAwsjson11_deserializeOpListImportFailures) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListPublicKeys) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListImportFailures) 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) @@ -2267,9 +2390,9 @@ func (m *awsAwsjson11_deserializeOpListPublicKeys) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListPublicKeys(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListImportFailures(response, &metadata) } - output := &ListPublicKeysOutput{} + output := &ListImportFailuresOutput{} out.Result = output var buff [1024]byte @@ -2289,7 +2412,7 @@ func (m *awsAwsjson11_deserializeOpListPublicKeys) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListPublicKeysOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListImportFailuresOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2303,7 +2426,7 @@ func (m *awsAwsjson11_deserializeOpListPublicKeys) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListPublicKeys(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListImportFailures(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)} @@ -2344,11 +2467,8 @@ func awsAwsjson11_deserializeOpErrorListPublicKeys(response *smithyhttp.Response } switch { - case strings.EqualFold("InvalidTimeRangeException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTimeRangeException(response, errorBody) - - case strings.EqualFold("InvalidTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTokenException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) @@ -2366,14 +2486,14 @@ func awsAwsjson11_deserializeOpErrorListPublicKeys(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpListQueries struct { +type awsAwsjson11_deserializeOpListImports struct { } -func (*awsAwsjson11_deserializeOpListQueries) ID() string { +func (*awsAwsjson11_deserializeOpListImports) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListQueries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListImports) 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) @@ -2387,9 +2507,9 @@ func (m *awsAwsjson11_deserializeOpListQueries) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListQueries(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListImports(response, &metadata) } - output := &ListQueriesOutput{} + output := &ListImportsOutput{} out.Result = output var buff [1024]byte @@ -2409,7 +2529,7 @@ func (m *awsAwsjson11_deserializeOpListQueries) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListQueriesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListImportsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2423,7 +2543,7 @@ func (m *awsAwsjson11_deserializeOpListQueries) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListQueries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListImports(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)} @@ -2467,27 +2587,12 @@ func awsAwsjson11_deserializeOpErrorListQueries(response *smithyhttp.Response, m case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) - case strings.EqualFold("EventDataStoreNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) - - case strings.EqualFold("InactiveEventDataStoreException", errorCode): - return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) - - case strings.EqualFold("InvalidDateRangeException", errorCode): - return awsAwsjson11_deserializeErrorInvalidDateRangeException(response, errorBody) - - case strings.EqualFold("InvalidMaxResultsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidMaxResultsException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidQueryStatusException", errorCode): - return awsAwsjson11_deserializeErrorInvalidQueryStatusException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) @@ -2504,14 +2609,14 @@ func awsAwsjson11_deserializeOpErrorListQueries(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListTags struct { +type awsAwsjson11_deserializeOpListPublicKeys struct { } -func (*awsAwsjson11_deserializeOpListTags) ID() string { +func (*awsAwsjson11_deserializeOpListPublicKeys) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListPublicKeys) 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) @@ -2525,9 +2630,9 @@ func (m *awsAwsjson11_deserializeOpListTags) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTags(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListPublicKeys(response, &metadata) } - output := &ListTagsOutput{} + output := &ListPublicKeysOutput{} out.Result = output var buff [1024]byte @@ -2547,7 +2652,7 @@ func (m *awsAwsjson11_deserializeOpListTags) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListPublicKeysOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2561,7 +2666,7 @@ func (m *awsAwsjson11_deserializeOpListTags) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListPublicKeys(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)} @@ -2602,30 +2707,15 @@ func awsAwsjson11_deserializeOpErrorListTags(response *smithyhttp.Response, meta } switch { - case strings.EqualFold("CloudTrailARNInvalidException", errorCode): - return awsAwsjson11_deserializeErrorCloudTrailARNInvalidException(response, errorBody) - - case strings.EqualFold("EventDataStoreNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) - - case strings.EqualFold("InactiveEventDataStoreException", errorCode): - return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) + case strings.EqualFold("InvalidTimeRangeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTimeRangeException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidTokenException(response, errorBody) - case strings.EqualFold("InvalidTrailNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceTypeNotSupportedException", errorCode): - return awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -2639,14 +2729,14 @@ func awsAwsjson11_deserializeOpErrorListTags(response *smithyhttp.Response, meta } } -type awsAwsjson11_deserializeOpListTrails struct { +type awsAwsjson11_deserializeOpListQueries struct { } -func (*awsAwsjson11_deserializeOpListTrails) ID() string { +func (*awsAwsjson11_deserializeOpListQueries) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTrails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListQueries) 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) @@ -2660,9 +2750,9 @@ func (m *awsAwsjson11_deserializeOpListTrails) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTrails(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListQueries(response, &metadata) } - output := &ListTrailsOutput{} + output := &ListQueriesOutput{} out.Result = output var buff [1024]byte @@ -2682,7 +2772,7 @@ func (m *awsAwsjson11_deserializeOpListTrails) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTrailsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListQueriesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2696,7 +2786,7 @@ func (m *awsAwsjson11_deserializeOpListTrails) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTrails(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListQueries(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)} @@ -2737,6 +2827,30 @@ func awsAwsjson11_deserializeOpErrorListTrails(response *smithyhttp.Response, me } switch { + case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) + + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) + + case strings.EqualFold("InactiveEventDataStoreException", errorCode): + return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) + + case strings.EqualFold("InvalidDateRangeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidDateRangeException(response, errorBody) + + case strings.EqualFold("InvalidMaxResultsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidMaxResultsException(response, errorBody) + + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidQueryStatusException", errorCode): + return awsAwsjson11_deserializeErrorInvalidQueryStatusException(response, errorBody) + case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) @@ -2753,14 +2867,14 @@ func awsAwsjson11_deserializeOpErrorListTrails(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpLookupEvents struct { +type awsAwsjson11_deserializeOpListTags struct { } -func (*awsAwsjson11_deserializeOpLookupEvents) ID() string { +func (*awsAwsjson11_deserializeOpListTags) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpLookupEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTags) 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) @@ -2774,9 +2888,9 @@ func (m *awsAwsjson11_deserializeOpLookupEvents) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorLookupEvents(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTags(response, &metadata) } - output := &LookupEventsOutput{} + output := &ListTagsOutput{} out.Result = output var buff [1024]byte @@ -2796,7 +2910,7 @@ func (m *awsAwsjson11_deserializeOpLookupEvents) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentLookupEventsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2810,7 +2924,7 @@ func (m *awsAwsjson11_deserializeOpLookupEvents) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorLookupEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTags(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)} @@ -2851,27 +2965,33 @@ func awsAwsjson11_deserializeOpErrorLookupEvents(response *smithyhttp.Response, } switch { - case strings.EqualFold("InvalidEventCategoryException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEventCategoryException(response, errorBody) + case strings.EqualFold("CloudTrailARNInvalidException", errorCode): + return awsAwsjson11_deserializeErrorCloudTrailARNInvalidException(response, errorBody) - case strings.EqualFold("InvalidLookupAttributesException", errorCode): - return awsAwsjson11_deserializeErrorInvalidLookupAttributesException(response, errorBody) + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) - case strings.EqualFold("InvalidMaxResultsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidMaxResultsException(response, errorBody) + case strings.EqualFold("InactiveEventDataStoreException", errorCode): + return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTokenException(response, errorBody) - case strings.EqualFold("InvalidTimeRangeException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTimeRangeException(response, errorBody) + case strings.EqualFold("InvalidTrailNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceTypeNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2882,14 +3002,14 @@ func awsAwsjson11_deserializeOpErrorLookupEvents(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpPutEventSelectors struct { +type awsAwsjson11_deserializeOpListTrails struct { } -func (*awsAwsjson11_deserializeOpPutEventSelectors) ID() string { +func (*awsAwsjson11_deserializeOpListTrails) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutEventSelectors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTrails) 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) @@ -2903,9 +3023,9 @@ func (m *awsAwsjson11_deserializeOpPutEventSelectors) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutEventSelectors(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTrails(response, &metadata) } - output := &PutEventSelectorsOutput{} + output := &ListTrailsOutput{} out.Result = output var buff [1024]byte @@ -2925,7 +3045,7 @@ func (m *awsAwsjson11_deserializeOpPutEventSelectors) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutEventSelectorsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTrailsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2939,7 +3059,7 @@ func (m *awsAwsjson11_deserializeOpPutEventSelectors) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutEventSelectors(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTrails(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)} @@ -2980,27 +3100,9 @@ func awsAwsjson11_deserializeOpErrorPutEventSelectors(response *smithyhttp.Respo } switch { - case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) - - case strings.EqualFold("InvalidEventSelectorsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response, errorBody) - - case strings.EqualFold("InvalidHomeRegionException", errorCode): - return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) - - case strings.EqualFold("InvalidTrailNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) - - case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): - return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) - case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("TrailNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3014,14 +3116,14 @@ func awsAwsjson11_deserializeOpErrorPutEventSelectors(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpPutInsightSelectors struct { +type awsAwsjson11_deserializeOpLookupEvents struct { } -func (*awsAwsjson11_deserializeOpPutInsightSelectors) ID() string { +func (*awsAwsjson11_deserializeOpLookupEvents) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutInsightSelectors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpLookupEvents) 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) @@ -3035,9 +3137,9 @@ func (m *awsAwsjson11_deserializeOpPutInsightSelectors) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutInsightSelectors(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorLookupEvents(response, &metadata) } - output := &PutInsightSelectorsOutput{} + output := &LookupEventsOutput{} out.Result = output var buff [1024]byte @@ -3057,7 +3159,7 @@ func (m *awsAwsjson11_deserializeOpPutInsightSelectors) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutInsightSelectorsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentLookupEventsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3071,7 +3173,7 @@ func (m *awsAwsjson11_deserializeOpPutInsightSelectors) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutInsightSelectors(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorLookupEvents(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)} @@ -3112,36 +3214,24 @@ func awsAwsjson11_deserializeOpErrorPutInsightSelectors(response *smithyhttp.Res } switch { - case strings.EqualFold("InsufficientEncryptionPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response, errorBody) - - case strings.EqualFold("InsufficientS3BucketPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response, errorBody) - - case strings.EqualFold("InvalidHomeRegionException", errorCode): - return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) + case strings.EqualFold("InvalidEventCategoryException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEventCategoryException(response, errorBody) - case strings.EqualFold("InvalidInsightSelectorsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInsightSelectorsException(response, errorBody) + case strings.EqualFold("InvalidLookupAttributesException", errorCode): + return awsAwsjson11_deserializeErrorInvalidLookupAttributesException(response, errorBody) - case strings.EqualFold("InvalidTrailNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) + case strings.EqualFold("InvalidMaxResultsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidMaxResultsException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): - return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): - return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) + case strings.EqualFold("InvalidTimeRangeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTimeRangeException(response, errorBody) case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("S3BucketDoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response, errorBody) - - case strings.EqualFold("TrailNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3155,14 +3245,14 @@ func awsAwsjson11_deserializeOpErrorPutInsightSelectors(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpRemoveTags struct { +type awsAwsjson11_deserializeOpPutEventSelectors struct { } -func (*awsAwsjson11_deserializeOpRemoveTags) ID() string { +func (*awsAwsjson11_deserializeOpPutEventSelectors) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRemoveTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutEventSelectors) 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) @@ -3176,9 +3266,9 @@ func (m *awsAwsjson11_deserializeOpRemoveTags) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTags(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutEventSelectors(response, &metadata) } - output := &RemoveTagsOutput{} + output := &PutEventSelectorsOutput{} out.Result = output var buff [1024]byte @@ -3198,7 +3288,7 @@ func (m *awsAwsjson11_deserializeOpRemoveTags) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRemoveTagsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutEventSelectorsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3212,7 +3302,7 @@ func (m *awsAwsjson11_deserializeOpRemoveTags) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRemoveTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutEventSelectors(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)} @@ -3253,17 +3343,14 @@ func awsAwsjson11_deserializeOpErrorRemoveTags(response *smithyhttp.Response, me } switch { - case strings.EqualFold("CloudTrailARNInvalidException", errorCode): - return awsAwsjson11_deserializeErrorCloudTrailARNInvalidException(response, errorBody) - - case strings.EqualFold("EventDataStoreNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) + case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) - case strings.EqualFold("InactiveEventDataStoreException", errorCode): - return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) + case strings.EqualFold("InvalidEventSelectorsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response, errorBody) - case strings.EqualFold("InvalidTagParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) + case strings.EqualFold("InvalidHomeRegionException", errorCode): + return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) case strings.EqualFold("InvalidTrailNameException", errorCode): return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) @@ -3274,11 +3361,8 @@ func awsAwsjson11_deserializeOpErrorRemoveTags(response *smithyhttp.Response, me case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceTypeNotSupportedException", errorCode): - return awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3293,14 +3377,14 @@ func awsAwsjson11_deserializeOpErrorRemoveTags(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpRestoreEventDataStore struct { +type awsAwsjson11_deserializeOpPutInsightSelectors struct { } -func (*awsAwsjson11_deserializeOpRestoreEventDataStore) ID() string { +func (*awsAwsjson11_deserializeOpPutInsightSelectors) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRestoreEventDataStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutInsightSelectors) 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) @@ -3314,9 +3398,9 @@ func (m *awsAwsjson11_deserializeOpRestoreEventDataStore) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRestoreEventDataStore(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutInsightSelectors(response, &metadata) } - output := &RestoreEventDataStoreOutput{} + output := &PutInsightSelectorsOutput{} out.Result = output var buff [1024]byte @@ -3336,7 +3420,7 @@ func (m *awsAwsjson11_deserializeOpRestoreEventDataStore) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRestoreEventDataStoreOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutInsightSelectorsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3350,7 +3434,7 @@ func (m *awsAwsjson11_deserializeOpRestoreEventDataStore) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRestoreEventDataStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutInsightSelectors(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)} @@ -3391,26 +3475,23 @@ func awsAwsjson11_deserializeOpErrorRestoreEventDataStore(response *smithyhttp.R } switch { - case strings.EqualFold("CloudTrailAccessNotEnabledException", errorCode): - return awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response, errorBody) - - case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) + case strings.EqualFold("InsufficientEncryptionPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response, errorBody) - case strings.EqualFold("EventDataStoreMaxLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreMaxLimitExceededException(response, errorBody) + case strings.EqualFold("InsufficientS3BucketPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response, errorBody) - case strings.EqualFold("EventDataStoreNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) + case strings.EqualFold("InvalidHomeRegionException", errorCode): + return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) - case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) + case strings.EqualFold("InvalidInsightSelectorsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInsightSelectorsException(response, errorBody) - case strings.EqualFold("InvalidEventDataStoreStatusException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEventDataStoreStatusException(response, errorBody) + case strings.EqualFold("InvalidTrailNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("KmsException", errorCode): + return awsAwsjson11_deserializeErrorKmsException(response, errorBody) case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) @@ -3418,11 +3499,11 @@ func awsAwsjson11_deserializeOpErrorRestoreEventDataStore(response *smithyhttp.R case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + case strings.EqualFold("S3BucketDoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response, errorBody) - case strings.EqualFold("OrganizationsNotInUseException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3437,14 +3518,14 @@ func awsAwsjson11_deserializeOpErrorRestoreEventDataStore(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpStartLogging struct { +type awsAwsjson11_deserializeOpRemoveTags struct { } -func (*awsAwsjson11_deserializeOpStartLogging) ID() string { +func (*awsAwsjson11_deserializeOpRemoveTags) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartLogging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRemoveTags) 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) @@ -3458,9 +3539,9 @@ func (m *awsAwsjson11_deserializeOpStartLogging) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartLogging(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTags(response, &metadata) } - output := &StartLoggingOutput{} + output := &RemoveTagsOutput{} out.Result = output var buff [1024]byte @@ -3480,7 +3561,7 @@ func (m *awsAwsjson11_deserializeOpStartLogging) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartLoggingOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRemoveTagsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3494,7 +3575,7 @@ func (m *awsAwsjson11_deserializeOpStartLogging) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartLogging(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRemoveTags(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)} @@ -3535,11 +3616,17 @@ func awsAwsjson11_deserializeOpErrorStartLogging(response *smithyhttp.Response, } switch { - case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) + case strings.EqualFold("CloudTrailARNInvalidException", errorCode): + return awsAwsjson11_deserializeErrorCloudTrailARNInvalidException(response, errorBody) - case strings.EqualFold("InvalidHomeRegionException", errorCode): - return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) + + case strings.EqualFold("InactiveEventDataStoreException", errorCode): + return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) + + case strings.EqualFold("InvalidTagParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTagParameterException(response, errorBody) case strings.EqualFold("InvalidTrailNameException", errorCode): return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) @@ -3550,8 +3637,11 @@ func awsAwsjson11_deserializeOpErrorStartLogging(response *smithyhttp.Response, case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("TrailNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceTypeNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3566,14 +3656,14 @@ func awsAwsjson11_deserializeOpErrorStartLogging(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpStartQuery struct { +type awsAwsjson11_deserializeOpRestoreEventDataStore struct { } -func (*awsAwsjson11_deserializeOpStartQuery) ID() string { +func (*awsAwsjson11_deserializeOpRestoreEventDataStore) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRestoreEventDataStore) 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) @@ -3587,9 +3677,9 @@ func (m *awsAwsjson11_deserializeOpStartQuery) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartQuery(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRestoreEventDataStore(response, &metadata) } - output := &StartQueryOutput{} + output := &RestoreEventDataStoreOutput{} out.Result = output var buff [1024]byte @@ -3609,7 +3699,7 @@ func (m *awsAwsjson11_deserializeOpStartQuery) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartQueryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRestoreEventDataStoreOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3623,7 +3713,7 @@ func (m *awsAwsjson11_deserializeOpStartQuery) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRestoreEventDataStore(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)} @@ -3664,27 +3754,39 @@ func awsAwsjson11_deserializeOpErrorStartQuery(response *smithyhttp.Response, me } switch { + case strings.EqualFold("CloudTrailAccessNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response, errorBody) + case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) + case strings.EqualFold("EventDataStoreMaxLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreMaxLimitExceededException(response, errorBody) + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) - case strings.EqualFold("InactiveEventDataStoreException", errorCode): - return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) + case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) + + case strings.EqualFold("InvalidEventDataStoreStatusException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEventDataStoreStatusException(response, errorBody) case strings.EqualFold("InvalidParameterException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidQueryStatementException", errorCode): - return awsAwsjson11_deserializeErrorInvalidQueryStatementException(response, errorBody) - - case strings.EqualFold("MaxConcurrentQueriesException", errorCode): - return awsAwsjson11_deserializeErrorMaxConcurrentQueriesException(response, errorBody) + case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): + return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + + case strings.EqualFold("OrganizationsNotInUseException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response, errorBody) + case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3698,14 +3800,14 @@ func awsAwsjson11_deserializeOpErrorStartQuery(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpStopLogging struct { +type awsAwsjson11_deserializeOpStartImport struct { } -func (*awsAwsjson11_deserializeOpStopLogging) ID() string { +func (*awsAwsjson11_deserializeOpStartImport) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopLogging) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartImport) 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) @@ -3719,9 +3821,9 @@ func (m *awsAwsjson11_deserializeOpStopLogging) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopLogging(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartImport(response, &metadata) } - output := &StopLoggingOutput{} + output := &StartImportOutput{} out.Result = output var buff [1024]byte @@ -3741,7 +3843,7 @@ func (m *awsAwsjson11_deserializeOpStopLogging) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopLoggingOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartImportOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3755,7 +3857,7 @@ func (m *awsAwsjson11_deserializeOpStopLogging) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopLogging(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartImport(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)} @@ -3796,24 +3898,36 @@ func awsAwsjson11_deserializeOpErrorStopLogging(response *smithyhttp.Response, m } switch { - case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) + case strings.EqualFold("AccountHasOngoingImportException", errorCode): + return awsAwsjson11_deserializeErrorAccountHasOngoingImportException(response, errorBody) - case strings.EqualFold("InvalidHomeRegionException", errorCode): - return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) + case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) - case strings.EqualFold("InvalidTrailNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) - case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): - return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) + case strings.EqualFold("ImportNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorImportNotFoundException(response, errorBody) + + case strings.EqualFold("InactiveEventDataStoreException", errorCode): + return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) + + case strings.EqualFold("InvalidEventDataStoreCategoryException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEventDataStoreCategoryException(response, errorBody) + + case strings.EqualFold("InvalidEventDataStoreStatusException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEventDataStoreStatusException(response, errorBody) + + case strings.EqualFold("InvalidImportSourceException", errorCode): + return awsAwsjson11_deserializeErrorInvalidImportSourceException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("TrailNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3827,14 +3941,14 @@ func awsAwsjson11_deserializeOpErrorStopLogging(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUpdateEventDataStore struct { +type awsAwsjson11_deserializeOpStartLogging struct { } -func (*awsAwsjson11_deserializeOpUpdateEventDataStore) ID() string { +func (*awsAwsjson11_deserializeOpStartLogging) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateEventDataStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartLogging) 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) @@ -3848,9 +3962,9 @@ func (m *awsAwsjson11_deserializeOpUpdateEventDataStore) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateEventDataStore(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartLogging(response, &metadata) } - output := &UpdateEventDataStoreOutput{} + output := &StartLoggingOutput{} out.Result = output var buff [1024]byte @@ -3870,7 +3984,7 @@ func (m *awsAwsjson11_deserializeOpUpdateEventDataStore) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateEventDataStoreOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartLoggingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3884,7 +3998,7 @@ func (m *awsAwsjson11_deserializeOpUpdateEventDataStore) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateEventDataStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartLogging(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)} @@ -3925,23 +4039,14 @@ func awsAwsjson11_deserializeOpErrorUpdateEventDataStore(response *smithyhttp.Re } switch { - case strings.EqualFold("CloudTrailAccessNotEnabledException", errorCode): - return awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response, errorBody) - - case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) - - case strings.EqualFold("EventDataStoreNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) - - case strings.EqualFold("InactiveEventDataStoreException", errorCode): - return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) - case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidHomeRegionException", errorCode): + return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) + + case strings.EqualFold("InvalidTrailNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) @@ -3949,11 +4054,8 @@ func awsAwsjson11_deserializeOpErrorUpdateEventDataStore(response *smithyhttp.Re case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) - - case strings.EqualFold("OrganizationsNotInUseException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -3968,14 +4070,14 @@ func awsAwsjson11_deserializeOpErrorUpdateEventDataStore(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpUpdateTrail struct { +type awsAwsjson11_deserializeOpStartQuery struct { } -func (*awsAwsjson11_deserializeOpUpdateTrail) ID() string { +func (*awsAwsjson11_deserializeOpStartQuery) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateTrail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartQuery) 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) @@ -3989,9 +4091,9 @@ func (m *awsAwsjson11_deserializeOpUpdateTrail) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateTrail(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartQuery(response, &metadata) } - output := &UpdateTrailOutput{} + output := &StartQueryOutput{} out.Result = output var buff [1024]byte @@ -4011,7 +4113,7 @@ func (m *awsAwsjson11_deserializeOpUpdateTrail) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateTrailOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartQueryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4025,7 +4127,7 @@ func (m *awsAwsjson11_deserializeOpUpdateTrail) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateTrail(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartQuery(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)} @@ -4066,87 +4168,27 @@ func awsAwsjson11_deserializeOpErrorUpdateTrail(response *smithyhttp.Response, m } switch { - case strings.EqualFold("CloudTrailAccessNotEnabledException", errorCode): - return awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response, errorBody) - - case strings.EqualFold("CloudTrailInvalidClientTokenIdException", errorCode): - return awsAwsjson11_deserializeErrorCloudTrailInvalidClientTokenIdException(response, errorBody) - - case strings.EqualFold("CloudWatchLogsDeliveryUnavailableException", errorCode): - return awsAwsjson11_deserializeErrorCloudWatchLogsDeliveryUnavailableException(response, errorBody) - - case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) - - case strings.EqualFold("InsufficientEncryptionPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response, errorBody) - - case strings.EqualFold("InsufficientS3BucketPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response, errorBody) - - case strings.EqualFold("InsufficientSnsTopicPolicyException", errorCode): - return awsAwsjson11_deserializeErrorInsufficientSnsTopicPolicyException(response, errorBody) - - case strings.EqualFold("InvalidCloudWatchLogsLogGroupArnException", errorCode): - return awsAwsjson11_deserializeErrorInvalidCloudWatchLogsLogGroupArnException(response, errorBody) - - case strings.EqualFold("InvalidCloudWatchLogsRoleArnException", errorCode): - return awsAwsjson11_deserializeErrorInvalidCloudWatchLogsRoleArnException(response, errorBody) - - case strings.EqualFold("InvalidEventSelectorsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response, errorBody) - - case strings.EqualFold("InvalidHomeRegionException", errorCode): - return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) - - case strings.EqualFold("InvalidKmsKeyIdException", errorCode): - return awsAwsjson11_deserializeErrorInvalidKmsKeyIdException(response, errorBody) - - case strings.EqualFold("InvalidParameterCombinationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterCombinationException(response, errorBody) - - case strings.EqualFold("InvalidS3BucketNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidS3BucketNameException(response, errorBody) - - case strings.EqualFold("InvalidS3PrefixException", errorCode): - return awsAwsjson11_deserializeErrorInvalidS3PrefixException(response, errorBody) - - case strings.EqualFold("InvalidSnsTopicNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidSnsTopicNameException(response, errorBody) + case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) - case strings.EqualFold("InvalidTrailNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) - case strings.EqualFold("KmsException", errorCode): - return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + case strings.EqualFold("InactiveEventDataStoreException", errorCode): + return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) - case strings.EqualFold("KmsKeyDisabledException", errorCode): - return awsAwsjson11_deserializeErrorKmsKeyDisabledException(response, errorBody) + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - case strings.EqualFold("KmsKeyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorKmsKeyNotFoundException(response, errorBody) + case strings.EqualFold("InvalidQueryStatementException", errorCode): + return awsAwsjson11_deserializeErrorInvalidQueryStatementException(response, errorBody) - case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): - return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) + case strings.EqualFold("MaxConcurrentQueriesException", errorCode): + return awsAwsjson11_deserializeErrorMaxConcurrentQueriesException(response, errorBody) case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) - case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) - - case strings.EqualFold("OrganizationsNotInUseException", errorCode): - return awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response, errorBody) - - case strings.EqualFold("S3BucketDoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response, errorBody) - - case strings.EqualFold("TrailNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) - - case strings.EqualFold("TrailNotProvidedException", errorCode): - return awsAwsjson11_deserializeErrorTrailNotProvidedException(response, errorBody) - case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) @@ -4160,46 +4202,36 @@ func awsAwsjson11_deserializeOpErrorUpdateTrail(response *smithyhttp.Response, m } } -func awsAwsjson11_deserializeErrorChannelARNInvalidException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - 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 - } +type awsAwsjson11_deserializeOpStopImport struct { +} - output := &types.ChannelARNInvalidException{} - err := awsAwsjson11_deserializeDocumentChannelARNInvalidException(&output, shape) +func (*awsAwsjson11_deserializeOpStopImport) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson11_deserializeOpStopImport) 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 { - 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopImport(response, &metadata) + } + output := &StopImportOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorChannelNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4210,12 +4242,10 @@ func awsAwsjson11_deserializeErrorChannelNotFoundException(response *smithyhttp. Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ChannelNotFoundException{} - err := awsAwsjson11_deserializeDocumentChannelNotFoundException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentStopImportOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4223,34 +4253,34 @@ func awsAwsjson11_deserializeErrorChannelNotFoundException(response *smithyhttp. Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorStopImport(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + 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 - } - - output := &types.CloudTrailAccessNotEnabledException{} - err := awsAwsjson11_deserializeDocumentCloudTrailAccessNotEnabledException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4262,84 +4292,66 @@ func awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response * } errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorCloudTrailARNInvalidException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - 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 + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message } - output := &types.CloudTrailARNInvalidException{} - err := awsAwsjson11_deserializeDocumentCloudTrailARNInvalidException(&output, shape) + switch { + case strings.EqualFold("ImportNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorImportNotFoundException(response, errorBody) - 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 - } + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - errorBody.Seek(0, io.SeekStart) - return output -} + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) -func awsAwsjson11_deserializeErrorCloudTrailInvalidClientTokenIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) - 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(), + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - output := &types.CloudTrailInvalidClientTokenIdException{} - err := awsAwsjson11_deserializeDocumentCloudTrailInvalidClientTokenIdException(&output, shape) +type awsAwsjson11_deserializeOpStopLogging struct { +} + +func (*awsAwsjson11_deserializeOpStopLogging) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson11_deserializeOpStopLogging) 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 { - 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopLogging(response, &metadata) + } + output := &StopLoggingOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorCloudWatchLogsDeliveryUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4350,12 +4362,10 @@ func awsAwsjson11_deserializeErrorCloudWatchLogsDeliveryUnavailableException(res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.CloudWatchLogsDeliveryUnavailableException{} - err := awsAwsjson11_deserializeDocumentCloudWatchLogsDeliveryUnavailableException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentStopLoggingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4363,34 +4373,34 @@ func awsAwsjson11_deserializeErrorCloudWatchLogsDeliveryUnavailableException(res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorStopLogging(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + 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 - } - - output := &types.ConflictException{} - err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4402,49 +4412,75 @@ func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Respons } errorBody.Seek(0, io.SeekStart) - return output -} + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } -func awsAwsjson11_deserializeErrorEventDataStoreAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + switch { + case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) - 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(), + case strings.EqualFold("InvalidHomeRegionException", errorCode): + return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) + + case strings.EqualFold("InvalidTrailNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) + + case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): + return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("TrailNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - output := &types.EventDataStoreAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentEventDataStoreAlreadyExistsException(&output, shape) +type awsAwsjson11_deserializeOpUpdateEventDataStore struct { +} + +func (*awsAwsjson11_deserializeOpUpdateEventDataStore) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson11_deserializeOpUpdateEventDataStore) 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 { - 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateEventDataStore(response, &metadata) + } + output := &UpdateEventDataStoreOutput{} + out.Result = output -func awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4455,12 +4491,10 @@ func awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response *sm Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.EventDataStoreARNInvalidException{} - err := awsAwsjson11_deserializeDocumentEventDataStoreARNInvalidException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdateEventDataStoreOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4468,22 +4502,35 @@ func awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response *sm Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorEventDataStoreMaxLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdateEventDataStore(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + 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 { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -4493,28 +4540,91 @@ func awsAwsjson11_deserializeErrorEventDataStoreMaxLimitExceededException(respon return err } - output := &types.EventDataStoreMaxLimitExceededException{} - err := awsAwsjson11_deserializeDocumentEventDataStoreMaxLimitExceededException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - 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(), + switch { + case strings.EqualFold("CloudTrailAccessNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response, errorBody) + + case strings.EqualFold("EventDataStoreARNInvalidException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response, errorBody) + + case strings.EqualFold("EventDataStoreHasOngoingImportException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreHasOngoingImportException(response, errorBody) + + case strings.EqualFold("EventDataStoreNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response, errorBody) + + case strings.EqualFold("InactiveEventDataStoreException", errorCode): + return awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response, errorBody) + + case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): + return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + + case strings.EqualFold("OrganizationsNotInUseException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson11_deserializeOpUpdateTrail struct { } -func awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson11_deserializeOpUpdateTrail) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateTrail) 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, awsAwsjson11_deserializeOpErrorUpdateTrail(response, &metadata) + } + output := &UpdateTrailOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4525,12 +4635,10 @@ func awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response *smit Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.EventDataStoreNotFoundException{} - err := awsAwsjson11_deserializeDocumentEventDataStoreNotFoundException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdateTrailOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4538,22 +4646,35 @@ func awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response *smit Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorEventDataStoreTerminationProtectedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdateTrail(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + 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 { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -4563,24 +4684,110 @@ func awsAwsjson11_deserializeErrorEventDataStoreTerminationProtectedException(re return err } - output := &types.EventDataStoreTerminationProtectedException{} - err := awsAwsjson11_deserializeDocumentEventDataStoreTerminationProtectedException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - 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(), + switch { + case strings.EqualFold("CloudTrailAccessNotEnabledException", errorCode): + return awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response, errorBody) + + case strings.EqualFold("CloudTrailInvalidClientTokenIdException", errorCode): + return awsAwsjson11_deserializeErrorCloudTrailInvalidClientTokenIdException(response, errorBody) + + case strings.EqualFold("CloudWatchLogsDeliveryUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorCloudWatchLogsDeliveryUnavailableException(response, errorBody) + + case strings.EqualFold("InsufficientDependencyServiceAccessPermissionException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response, errorBody) + + case strings.EqualFold("InsufficientEncryptionPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response, errorBody) + + case strings.EqualFold("InsufficientS3BucketPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response, errorBody) + + case strings.EqualFold("InsufficientSnsTopicPolicyException", errorCode): + return awsAwsjson11_deserializeErrorInsufficientSnsTopicPolicyException(response, errorBody) + + case strings.EqualFold("InvalidCloudWatchLogsLogGroupArnException", errorCode): + return awsAwsjson11_deserializeErrorInvalidCloudWatchLogsLogGroupArnException(response, errorBody) + + case strings.EqualFold("InvalidCloudWatchLogsRoleArnException", errorCode): + return awsAwsjson11_deserializeErrorInvalidCloudWatchLogsRoleArnException(response, errorBody) + + case strings.EqualFold("InvalidEventSelectorsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response, errorBody) + + case strings.EqualFold("InvalidHomeRegionException", errorCode): + return awsAwsjson11_deserializeErrorInvalidHomeRegionException(response, errorBody) + + case strings.EqualFold("InvalidKmsKeyIdException", errorCode): + return awsAwsjson11_deserializeErrorInvalidKmsKeyIdException(response, errorBody) + + case strings.EqualFold("InvalidParameterCombinationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterCombinationException(response, errorBody) + + case strings.EqualFold("InvalidS3BucketNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidS3BucketNameException(response, errorBody) + + case strings.EqualFold("InvalidS3PrefixException", errorCode): + return awsAwsjson11_deserializeErrorInvalidS3PrefixException(response, errorBody) + + case strings.EqualFold("InvalidSnsTopicNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSnsTopicNameException(response, errorBody) + + case strings.EqualFold("InvalidTrailNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTrailNameException(response, errorBody) + + case strings.EqualFold("KmsException", errorCode): + return awsAwsjson11_deserializeErrorKmsException(response, errorBody) + + case strings.EqualFold("KmsKeyDisabledException", errorCode): + return awsAwsjson11_deserializeErrorKmsKeyDisabledException(response, errorBody) + + case strings.EqualFold("KmsKeyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorKmsKeyNotFoundException(response, errorBody) + + case strings.EqualFold("NotOrganizationMasterAccountException", errorCode): + return awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response, errorBody) + + case strings.EqualFold("OperationNotPermittedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + + case strings.EqualFold("OrganizationNotInAllFeaturesModeException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response, errorBody) + + case strings.EqualFold("OrganizationsNotInUseException", errorCode): + return awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response, errorBody) + + case strings.EqualFold("S3BucketDoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response, errorBody) + + case strings.EqualFold("TrailNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) + + case strings.EqualFold("TrailNotProvidedException", errorCode): + return awsAwsjson11_deserializeErrorTrailNotProvidedException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err - } + return genericError - errorBody.Seek(0, io.SeekStart) - return output + } } -func awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorAccountHasOngoingImportException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4598,8 +4805,8 @@ func awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response *smit return err } - output := &types.InactiveEventDataStoreException{} - err := awsAwsjson11_deserializeDocumentInactiveEventDataStoreException(&output, shape) + output := &types.AccountHasOngoingImportException{} + err := awsAwsjson11_deserializeDocumentAccountHasOngoingImportException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4615,7 +4822,7 @@ func awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response *smit return output } -func awsAwsjson11_deserializeErrorInactiveQueryException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorChannelARNInvalidException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4633,8 +4840,8 @@ func awsAwsjson11_deserializeErrorInactiveQueryException(response *smithyhttp.Re return err } - output := &types.InactiveQueryException{} - err := awsAwsjson11_deserializeDocumentInactiveQueryException(&output, shape) + output := &types.ChannelARNInvalidException{} + err := awsAwsjson11_deserializeDocumentChannelARNInvalidException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4650,7 +4857,7 @@ func awsAwsjson11_deserializeErrorInactiveQueryException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorInsightNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorChannelNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4668,8 +4875,8 @@ func awsAwsjson11_deserializeErrorInsightNotEnabledException(response *smithyhtt return err } - output := &types.InsightNotEnabledException{} - err := awsAwsjson11_deserializeDocumentInsightNotEnabledException(&output, shape) + output := &types.ChannelNotFoundException{} + err := awsAwsjson11_deserializeDocumentChannelNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4685,7 +4892,7 @@ func awsAwsjson11_deserializeErrorInsightNotEnabledException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorCloudTrailAccessNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4703,8 +4910,8 @@ func awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionE return err } - output := &types.InsufficientDependencyServiceAccessPermissionException{} - err := awsAwsjson11_deserializeDocumentInsufficientDependencyServiceAccessPermissionException(&output, shape) + output := &types.CloudTrailAccessNotEnabledException{} + err := awsAwsjson11_deserializeDocumentCloudTrailAccessNotEnabledException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4720,7 +4927,7 @@ func awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionE return output } -func awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorCloudTrailARNInvalidException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4738,8 +4945,8 @@ func awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response return err } - output := &types.InsufficientEncryptionPolicyException{} - err := awsAwsjson11_deserializeDocumentInsufficientEncryptionPolicyException(&output, shape) + output := &types.CloudTrailARNInvalidException{} + err := awsAwsjson11_deserializeDocumentCloudTrailARNInvalidException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4755,7 +4962,7 @@ func awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response return output } -func awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorCloudTrailInvalidClientTokenIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4773,8 +4980,8 @@ func awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response * return err } - output := &types.InsufficientS3BucketPolicyException{} - err := awsAwsjson11_deserializeDocumentInsufficientS3BucketPolicyException(&output, shape) + output := &types.CloudTrailInvalidClientTokenIdException{} + err := awsAwsjson11_deserializeDocumentCloudTrailInvalidClientTokenIdException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4790,7 +4997,7 @@ func awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response * return output } -func awsAwsjson11_deserializeErrorInsufficientSnsTopicPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorCloudWatchLogsDeliveryUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4808,8 +5015,8 @@ func awsAwsjson11_deserializeErrorInsufficientSnsTopicPolicyException(response * return err } - output := &types.InsufficientSnsTopicPolicyException{} - err := awsAwsjson11_deserializeDocumentInsufficientSnsTopicPolicyException(&output, shape) + output := &types.CloudWatchLogsDeliveryUnavailableException{} + err := awsAwsjson11_deserializeDocumentCloudWatchLogsDeliveryUnavailableException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4825,7 +5032,7 @@ func awsAwsjson11_deserializeErrorInsufficientSnsTopicPolicyException(response * return output } -func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsLogGroupArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4843,8 +5050,8 @@ func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsLogGroupArnException(resp return err } - output := &types.InvalidCloudWatchLogsLogGroupArnException{} - err := awsAwsjson11_deserializeDocumentInvalidCloudWatchLogsLogGroupArnException(&output, shape) + output := &types.ConflictException{} + err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4860,7 +5067,7 @@ func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsLogGroupArnException(resp return output } -func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsRoleArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorEventDataStoreAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4878,8 +5085,8 @@ func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsRoleArnException(response return err } - output := &types.InvalidCloudWatchLogsRoleArnException{} - err := awsAwsjson11_deserializeDocumentInvalidCloudWatchLogsRoleArnException(&output, shape) + output := &types.EventDataStoreAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentEventDataStoreAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4895,7 +5102,7 @@ func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsRoleArnException(response return output } -func awsAwsjson11_deserializeErrorInvalidDateRangeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorEventDataStoreARNInvalidException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4913,8 +5120,8 @@ func awsAwsjson11_deserializeErrorInvalidDateRangeException(response *smithyhttp return err } - output := &types.InvalidDateRangeException{} - err := awsAwsjson11_deserializeDocumentInvalidDateRangeException(&output, shape) + output := &types.EventDataStoreARNInvalidException{} + err := awsAwsjson11_deserializeDocumentEventDataStoreARNInvalidException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4930,7 +5137,7 @@ func awsAwsjson11_deserializeErrorInvalidDateRangeException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorInvalidEventCategoryException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorEventDataStoreHasOngoingImportException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4948,8 +5155,8 @@ func awsAwsjson11_deserializeErrorInvalidEventCategoryException(response *smithy return err } - output := &types.InvalidEventCategoryException{} - err := awsAwsjson11_deserializeDocumentInvalidEventCategoryException(&output, shape) + output := &types.EventDataStoreHasOngoingImportException{} + err := awsAwsjson11_deserializeDocumentEventDataStoreHasOngoingImportException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4965,7 +5172,7 @@ func awsAwsjson11_deserializeErrorInvalidEventCategoryException(response *smithy return output } -func awsAwsjson11_deserializeErrorInvalidEventDataStoreStatusException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorEventDataStoreMaxLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4983,8 +5190,8 @@ func awsAwsjson11_deserializeErrorInvalidEventDataStoreStatusException(response return err } - output := &types.InvalidEventDataStoreStatusException{} - err := awsAwsjson11_deserializeDocumentInvalidEventDataStoreStatusException(&output, shape) + output := &types.EventDataStoreMaxLimitExceededException{} + err := awsAwsjson11_deserializeDocumentEventDataStoreMaxLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5000,7 +5207,7 @@ func awsAwsjson11_deserializeErrorInvalidEventDataStoreStatusException(response return output } -func awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorEventDataStoreNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5018,8 +5225,8 @@ func awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response *smith return err } - output := &types.InvalidEventSelectorsException{} - err := awsAwsjson11_deserializeDocumentInvalidEventSelectorsException(&output, shape) + output := &types.EventDataStoreNotFoundException{} + err := awsAwsjson11_deserializeDocumentEventDataStoreNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5035,7 +5242,7 @@ func awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response *smith return output } -func awsAwsjson11_deserializeErrorInvalidHomeRegionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorEventDataStoreTerminationProtectedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5053,8 +5260,8 @@ func awsAwsjson11_deserializeErrorInvalidHomeRegionException(response *smithyhtt return err } - output := &types.InvalidHomeRegionException{} - err := awsAwsjson11_deserializeDocumentInvalidHomeRegionException(&output, shape) + output := &types.EventDataStoreTerminationProtectedException{} + err := awsAwsjson11_deserializeDocumentEventDataStoreTerminationProtectedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5070,7 +5277,7 @@ func awsAwsjson11_deserializeErrorInvalidHomeRegionException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorInvalidInsightSelectorsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorImportNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5088,8 +5295,8 @@ func awsAwsjson11_deserializeErrorInvalidInsightSelectorsException(response *smi return err } - output := &types.InvalidInsightSelectorsException{} - err := awsAwsjson11_deserializeDocumentInvalidInsightSelectorsException(&output, shape) + output := &types.ImportNotFoundException{} + err := awsAwsjson11_deserializeDocumentImportNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5105,7 +5312,7 @@ func awsAwsjson11_deserializeErrorInvalidInsightSelectorsException(response *smi return output } -func awsAwsjson11_deserializeErrorInvalidKmsKeyIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInactiveEventDataStoreException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5123,8 +5330,8 @@ func awsAwsjson11_deserializeErrorInvalidKmsKeyIdException(response *smithyhttp. return err } - output := &types.InvalidKmsKeyIdException{} - err := awsAwsjson11_deserializeDocumentInvalidKmsKeyIdException(&output, shape) + output := &types.InactiveEventDataStoreException{} + err := awsAwsjson11_deserializeDocumentInactiveEventDataStoreException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5140,7 +5347,7 @@ func awsAwsjson11_deserializeErrorInvalidKmsKeyIdException(response *smithyhttp. return output } -func awsAwsjson11_deserializeErrorInvalidLookupAttributesException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInactiveQueryException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5158,8 +5365,8 @@ func awsAwsjson11_deserializeErrorInvalidLookupAttributesException(response *smi return err } - output := &types.InvalidLookupAttributesException{} - err := awsAwsjson11_deserializeDocumentInvalidLookupAttributesException(&output, shape) + output := &types.InactiveQueryException{} + err := awsAwsjson11_deserializeDocumentInactiveQueryException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5175,7 +5382,7 @@ func awsAwsjson11_deserializeErrorInvalidLookupAttributesException(response *smi return output } -func awsAwsjson11_deserializeErrorInvalidMaxResultsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInsightNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5193,8 +5400,8 @@ func awsAwsjson11_deserializeErrorInvalidMaxResultsException(response *smithyhtt return err } - output := &types.InvalidMaxResultsException{} - err := awsAwsjson11_deserializeDocumentInvalidMaxResultsException(&output, shape) + output := &types.InsightNotEnabledException{} + err := awsAwsjson11_deserializeDocumentInsightNotEnabledException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5210,7 +5417,7 @@ func awsAwsjson11_deserializeErrorInvalidMaxResultsException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInsufficientDependencyServiceAccessPermissionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5228,8 +5435,8 @@ func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp return err } - output := &types.InvalidNextTokenException{} - err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) + output := &types.InsufficientDependencyServiceAccessPermissionException{} + err := awsAwsjson11_deserializeDocumentInsufficientDependencyServiceAccessPermissionException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5245,7 +5452,7 @@ func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorInvalidParameterCombinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInsufficientEncryptionPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5263,8 +5470,8 @@ func awsAwsjson11_deserializeErrorInvalidParameterCombinationException(response return err } - output := &types.InvalidParameterCombinationException{} - err := awsAwsjson11_deserializeDocumentInvalidParameterCombinationException(&output, shape) + output := &types.InsufficientEncryptionPolicyException{} + err := awsAwsjson11_deserializeDocumentInsufficientEncryptionPolicyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5280,7 +5487,7 @@ func awsAwsjson11_deserializeErrorInvalidParameterCombinationException(response return output } -func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInsufficientS3BucketPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5298,8 +5505,8 @@ func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp return err } - output := &types.InvalidParameterException{} - err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) + output := &types.InsufficientS3BucketPolicyException{} + err := awsAwsjson11_deserializeDocumentInsufficientS3BucketPolicyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5315,7 +5522,7 @@ func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorInvalidQueryStatementException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInsufficientSnsTopicPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5333,8 +5540,8 @@ func awsAwsjson11_deserializeErrorInvalidQueryStatementException(response *smith return err } - output := &types.InvalidQueryStatementException{} - err := awsAwsjson11_deserializeDocumentInvalidQueryStatementException(&output, shape) + output := &types.InsufficientSnsTopicPolicyException{} + err := awsAwsjson11_deserializeDocumentInsufficientSnsTopicPolicyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5350,7 +5557,7 @@ func awsAwsjson11_deserializeErrorInvalidQueryStatementException(response *smith return output } -func awsAwsjson11_deserializeErrorInvalidQueryStatusException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsLogGroupArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5368,8 +5575,8 @@ func awsAwsjson11_deserializeErrorInvalidQueryStatusException(response *smithyht return err } - output := &types.InvalidQueryStatusException{} - err := awsAwsjson11_deserializeDocumentInvalidQueryStatusException(&output, shape) + output := &types.InvalidCloudWatchLogsLogGroupArnException{} + err := awsAwsjson11_deserializeDocumentInvalidCloudWatchLogsLogGroupArnException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5385,7 +5592,7 @@ func awsAwsjson11_deserializeErrorInvalidQueryStatusException(response *smithyht return output } -func awsAwsjson11_deserializeErrorInvalidS3BucketNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidCloudWatchLogsRoleArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5403,8 +5610,8 @@ func awsAwsjson11_deserializeErrorInvalidS3BucketNameException(response *smithyh return err } - output := &types.InvalidS3BucketNameException{} - err := awsAwsjson11_deserializeDocumentInvalidS3BucketNameException(&output, shape) + output := &types.InvalidCloudWatchLogsRoleArnException{} + err := awsAwsjson11_deserializeDocumentInvalidCloudWatchLogsRoleArnException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5420,7 +5627,7 @@ func awsAwsjson11_deserializeErrorInvalidS3BucketNameException(response *smithyh return output } -func awsAwsjson11_deserializeErrorInvalidS3PrefixException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidDateRangeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5438,8 +5645,8 @@ func awsAwsjson11_deserializeErrorInvalidS3PrefixException(response *smithyhttp. return err } - output := &types.InvalidS3PrefixException{} - err := awsAwsjson11_deserializeDocumentInvalidS3PrefixException(&output, shape) + output := &types.InvalidDateRangeException{} + err := awsAwsjson11_deserializeDocumentInvalidDateRangeException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5455,7 +5662,7 @@ func awsAwsjson11_deserializeErrorInvalidS3PrefixException(response *smithyhttp. return output } -func awsAwsjson11_deserializeErrorInvalidSnsTopicNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidEventCategoryException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5473,8 +5680,8 @@ func awsAwsjson11_deserializeErrorInvalidSnsTopicNameException(response *smithyh return err } - output := &types.InvalidSnsTopicNameException{} - err := awsAwsjson11_deserializeDocumentInvalidSnsTopicNameException(&output, shape) + output := &types.InvalidEventCategoryException{} + err := awsAwsjson11_deserializeDocumentInvalidEventCategoryException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5490,7 +5697,7 @@ func awsAwsjson11_deserializeErrorInvalidSnsTopicNameException(response *smithyh return output } -func awsAwsjson11_deserializeErrorInvalidTagParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidEventDataStoreCategoryException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5508,8 +5715,8 @@ func awsAwsjson11_deserializeErrorInvalidTagParameterException(response *smithyh return err } - output := &types.InvalidTagParameterException{} - err := awsAwsjson11_deserializeDocumentInvalidTagParameterException(&output, shape) + output := &types.InvalidEventDataStoreCategoryException{} + err := awsAwsjson11_deserializeDocumentInvalidEventDataStoreCategoryException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5525,7 +5732,7 @@ func awsAwsjson11_deserializeErrorInvalidTagParameterException(response *smithyh return output } -func awsAwsjson11_deserializeErrorInvalidTimeRangeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidEventDataStoreStatusException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5543,8 +5750,8 @@ func awsAwsjson11_deserializeErrorInvalidTimeRangeException(response *smithyhttp return err } - output := &types.InvalidTimeRangeException{} - err := awsAwsjson11_deserializeDocumentInvalidTimeRangeException(&output, shape) + output := &types.InvalidEventDataStoreStatusException{} + err := awsAwsjson11_deserializeDocumentInvalidEventDataStoreStatusException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5560,7 +5767,7 @@ func awsAwsjson11_deserializeErrorInvalidTimeRangeException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorInvalidTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidEventSelectorsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5578,8 +5785,8 @@ func awsAwsjson11_deserializeErrorInvalidTokenException(response *smithyhttp.Res return err } - output := &types.InvalidTokenException{} - err := awsAwsjson11_deserializeDocumentInvalidTokenException(&output, shape) + output := &types.InvalidEventSelectorsException{} + err := awsAwsjson11_deserializeDocumentInvalidEventSelectorsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5595,7 +5802,7 @@ func awsAwsjson11_deserializeErrorInvalidTokenException(response *smithyhttp.Res return output } -func awsAwsjson11_deserializeErrorInvalidTrailNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidHomeRegionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5613,8 +5820,8 @@ func awsAwsjson11_deserializeErrorInvalidTrailNameException(response *smithyhttp return err } - output := &types.InvalidTrailNameException{} - err := awsAwsjson11_deserializeDocumentInvalidTrailNameException(&output, shape) + output := &types.InvalidHomeRegionException{} + err := awsAwsjson11_deserializeDocumentInvalidHomeRegionException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5630,7 +5837,7 @@ func awsAwsjson11_deserializeErrorInvalidTrailNameException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorKmsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidImportSourceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5648,8 +5855,8 @@ func awsAwsjson11_deserializeErrorKmsException(response *smithyhttp.Response, er return err } - output := &types.KmsException{} - err := awsAwsjson11_deserializeDocumentKmsException(&output, shape) + output := &types.InvalidImportSourceException{} + err := awsAwsjson11_deserializeDocumentInvalidImportSourceException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5665,7 +5872,7 @@ func awsAwsjson11_deserializeErrorKmsException(response *smithyhttp.Response, er return output } -func awsAwsjson11_deserializeErrorKmsKeyDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidInsightSelectorsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5683,8 +5890,8 @@ func awsAwsjson11_deserializeErrorKmsKeyDisabledException(response *smithyhttp.R return err } - output := &types.KmsKeyDisabledException{} - err := awsAwsjson11_deserializeDocumentKmsKeyDisabledException(&output, shape) + output := &types.InvalidInsightSelectorsException{} + err := awsAwsjson11_deserializeDocumentInvalidInsightSelectorsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5700,7 +5907,7 @@ func awsAwsjson11_deserializeErrorKmsKeyDisabledException(response *smithyhttp.R return output } -func awsAwsjson11_deserializeErrorKmsKeyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidKmsKeyIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5718,8 +5925,8 @@ func awsAwsjson11_deserializeErrorKmsKeyNotFoundException(response *smithyhttp.R return err } - output := &types.KmsKeyNotFoundException{} - err := awsAwsjson11_deserializeDocumentKmsKeyNotFoundException(&output, shape) + output := &types.InvalidKmsKeyIdException{} + err := awsAwsjson11_deserializeDocumentInvalidKmsKeyIdException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5735,7 +5942,7 @@ func awsAwsjson11_deserializeErrorKmsKeyNotFoundException(response *smithyhttp.R return output } -func awsAwsjson11_deserializeErrorMaxConcurrentQueriesException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidLookupAttributesException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5753,8 +5960,8 @@ func awsAwsjson11_deserializeErrorMaxConcurrentQueriesException(response *smithy return err } - output := &types.MaxConcurrentQueriesException{} - err := awsAwsjson11_deserializeDocumentMaxConcurrentQueriesException(&output, shape) + output := &types.InvalidLookupAttributesException{} + err := awsAwsjson11_deserializeDocumentInvalidLookupAttributesException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5770,7 +5977,7 @@ func awsAwsjson11_deserializeErrorMaxConcurrentQueriesException(response *smithy return output } -func awsAwsjson11_deserializeErrorMaximumNumberOfTrailsExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidMaxResultsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5788,8 +5995,8 @@ func awsAwsjson11_deserializeErrorMaximumNumberOfTrailsExceededException(respons return err } - output := &types.MaximumNumberOfTrailsExceededException{} - err := awsAwsjson11_deserializeDocumentMaximumNumberOfTrailsExceededException(&output, shape) + output := &types.InvalidMaxResultsException{} + err := awsAwsjson11_deserializeDocumentInvalidMaxResultsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5805,7 +6012,7 @@ func awsAwsjson11_deserializeErrorMaximumNumberOfTrailsExceededException(respons return output } -func awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5823,8 +6030,8 @@ func awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response return err } - output := &types.NotOrganizationMasterAccountException{} - err := awsAwsjson11_deserializeDocumentNotOrganizationMasterAccountException(&output, shape) + output := &types.InvalidNextTokenException{} + err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5840,7 +6047,7 @@ func awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response return output } -func awsAwsjson11_deserializeErrorOperationNotPermittedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidParameterCombinationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5858,8 +6065,8 @@ func awsAwsjson11_deserializeErrorOperationNotPermittedException(response *smith return err } - output := &types.OperationNotPermittedException{} - err := awsAwsjson11_deserializeDocumentOperationNotPermittedException(&output, shape) + output := &types.InvalidParameterCombinationException{} + err := awsAwsjson11_deserializeDocumentInvalidParameterCombinationException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5875,7 +6082,7 @@ func awsAwsjson11_deserializeErrorOperationNotPermittedException(response *smith return output } -func awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5893,8 +6100,8 @@ func awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(resp return err } - output := &types.OrganizationNotInAllFeaturesModeException{} - err := awsAwsjson11_deserializeDocumentOrganizationNotInAllFeaturesModeException(&output, shape) + output := &types.InvalidParameterException{} + err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5910,7 +6117,7 @@ func awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(resp return output } -func awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidQueryStatementException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5928,8 +6135,8 @@ func awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response *smith return err } - output := &types.OrganizationsNotInUseException{} - err := awsAwsjson11_deserializeDocumentOrganizationsNotInUseException(&output, shape) + output := &types.InvalidQueryStatementException{} + err := awsAwsjson11_deserializeDocumentInvalidQueryStatementException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5945,7 +6152,7 @@ func awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response *smith return output } -func awsAwsjson11_deserializeErrorQueryIdNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidQueryStatusException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5963,8 +6170,8 @@ func awsAwsjson11_deserializeErrorQueryIdNotFoundException(response *smithyhttp. return err } - output := &types.QueryIdNotFoundException{} - err := awsAwsjson11_deserializeDocumentQueryIdNotFoundException(&output, shape) + output := &types.InvalidQueryStatusException{} + err := awsAwsjson11_deserializeDocumentInvalidQueryStatusException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -5980,7 +6187,7 @@ func awsAwsjson11_deserializeErrorQueryIdNotFoundException(response *smithyhttp. return output } -func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidS3BucketNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -5998,8 +6205,8 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - output := &types.ResourceNotFoundException{} - err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + output := &types.InvalidS3BucketNameException{} + err := awsAwsjson11_deserializeDocumentInvalidS3BucketNameException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6015,7 +6222,7 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidS3PrefixException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6033,8 +6240,8 @@ func awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response *sm return err } - output := &types.ResourceTypeNotSupportedException{} - err := awsAwsjson11_deserializeDocumentResourceTypeNotSupportedException(&output, shape) + output := &types.InvalidS3PrefixException{} + err := awsAwsjson11_deserializeDocumentInvalidS3PrefixException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6050,7 +6257,7 @@ func awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response *sm return output } -func awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidSnsTopicNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6068,8 +6275,8 @@ func awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response *smithy return err } - output := &types.S3BucketDoesNotExistException{} - err := awsAwsjson11_deserializeDocumentS3BucketDoesNotExistException(&output, shape) + output := &types.InvalidSnsTopicNameException{} + err := awsAwsjson11_deserializeDocumentInvalidSnsTopicNameException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6085,7 +6292,7 @@ func awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response *smithy return output } -func awsAwsjson11_deserializeErrorTagsLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidTagParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6103,8 +6310,8 @@ func awsAwsjson11_deserializeErrorTagsLimitExceededException(response *smithyhtt return err } - output := &types.TagsLimitExceededException{} - err := awsAwsjson11_deserializeDocumentTagsLimitExceededException(&output, shape) + output := &types.InvalidTagParameterException{} + err := awsAwsjson11_deserializeDocumentInvalidTagParameterException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6120,7 +6327,7 @@ func awsAwsjson11_deserializeErrorTagsLimitExceededException(response *smithyhtt return output } -func awsAwsjson11_deserializeErrorTrailAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidTimeRangeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6138,8 +6345,8 @@ func awsAwsjson11_deserializeErrorTrailAlreadyExistsException(response *smithyht return err } - output := &types.TrailAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentTrailAlreadyExistsException(&output, shape) + output := &types.InvalidTimeRangeException{} + err := awsAwsjson11_deserializeDocumentInvalidTimeRangeException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6155,7 +6362,7 @@ func awsAwsjson11_deserializeErrorTrailAlreadyExistsException(response *smithyht return output } -func awsAwsjson11_deserializeErrorTrailNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6173,8 +6380,8 @@ func awsAwsjson11_deserializeErrorTrailNotFoundException(response *smithyhttp.Re return err } - output := &types.TrailNotFoundException{} - err := awsAwsjson11_deserializeDocumentTrailNotFoundException(&output, shape) + output := &types.InvalidTokenException{} + err := awsAwsjson11_deserializeDocumentInvalidTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6190,7 +6397,7 @@ func awsAwsjson11_deserializeErrorTrailNotFoundException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorTrailNotProvidedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidTrailNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6208,8 +6415,8 @@ func awsAwsjson11_deserializeErrorTrailNotProvidedException(response *smithyhttp return err } - output := &types.TrailNotProvidedException{} - err := awsAwsjson11_deserializeDocumentTrailNotProvidedException(&output, shape) + output := &types.InvalidTrailNameException{} + err := awsAwsjson11_deserializeDocumentInvalidTrailNameException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6225,7 +6432,7 @@ func awsAwsjson11_deserializeErrorTrailNotProvidedException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorKmsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6243,8 +6450,8 @@ func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithy return err } - output := &types.UnsupportedOperationException{} - err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape) + output := &types.KmsException{} + err := awsAwsjson11_deserializeDocumentKmsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -6260,38 +6467,860 @@ func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithy return output } -func awsAwsjson11_deserializeDocumentAdvancedEventSelector(v **types.AdvancedEventSelector, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } +func awsAwsjson11_deserializeErrorKmsKeyDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + 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 + } + + output := &types.KmsKeyDisabledException{} + err := awsAwsjson11_deserializeDocumentKmsKeyDisabledException(&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 awsAwsjson11_deserializeErrorKmsKeyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.KmsKeyNotFoundException{} + err := awsAwsjson11_deserializeDocumentKmsKeyNotFoundException(&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 awsAwsjson11_deserializeErrorMaxConcurrentQueriesException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.MaxConcurrentQueriesException{} + err := awsAwsjson11_deserializeDocumentMaxConcurrentQueriesException(&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 awsAwsjson11_deserializeErrorMaximumNumberOfTrailsExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.MaximumNumberOfTrailsExceededException{} + err := awsAwsjson11_deserializeDocumentMaximumNumberOfTrailsExceededException(&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 awsAwsjson11_deserializeErrorNotOrganizationMasterAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.NotOrganizationMasterAccountException{} + err := awsAwsjson11_deserializeDocumentNotOrganizationMasterAccountException(&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 awsAwsjson11_deserializeErrorOperationNotPermittedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.OperationNotPermittedException{} + err := awsAwsjson11_deserializeDocumentOperationNotPermittedException(&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 awsAwsjson11_deserializeErrorOrganizationNotInAllFeaturesModeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.OrganizationNotInAllFeaturesModeException{} + err := awsAwsjson11_deserializeDocumentOrganizationNotInAllFeaturesModeException(&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 awsAwsjson11_deserializeErrorOrganizationsNotInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.OrganizationsNotInUseException{} + err := awsAwsjson11_deserializeDocumentOrganizationsNotInUseException(&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 awsAwsjson11_deserializeErrorQueryIdNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.QueryIdNotFoundException{} + err := awsAwsjson11_deserializeDocumentQueryIdNotFoundException(&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 awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&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 awsAwsjson11_deserializeErrorResourceTypeNotSupportedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.ResourceTypeNotSupportedException{} + err := awsAwsjson11_deserializeDocumentResourceTypeNotSupportedException(&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 awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.S3BucketDoesNotExistException{} + err := awsAwsjson11_deserializeDocumentS3BucketDoesNotExistException(&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 awsAwsjson11_deserializeErrorTagsLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.TagsLimitExceededException{} + err := awsAwsjson11_deserializeDocumentTagsLimitExceededException(&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 awsAwsjson11_deserializeErrorTrailAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.TrailAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentTrailAlreadyExistsException(&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 awsAwsjson11_deserializeErrorTrailNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.TrailNotFoundException{} + err := awsAwsjson11_deserializeDocumentTrailNotFoundException(&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 awsAwsjson11_deserializeErrorTrailNotProvidedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.TrailNotProvidedException{} + err := awsAwsjson11_deserializeDocumentTrailNotProvidedException(&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 awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.UnsupportedOperationException{} + err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&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 awsAwsjson11_deserializeDocumentAccountHasOngoingImportException(v **types.AccountHasOngoingImportException, 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.AccountHasOngoingImportException + if *v == nil { + sv = &types.AccountHasOngoingImportException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAdvancedEventSelector(v **types.AdvancedEventSelector, 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.AdvancedEventSelector + if *v == nil { + sv = &types.AdvancedEventSelector{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FieldSelectors": + if err := awsAwsjson11_deserializeDocumentAdvancedFieldSelectors(&sv.FieldSelectors, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SelectorName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } } + *v = sv + return nil +} - var sv *types.AdvancedEventSelector +func awsAwsjson11_deserializeDocumentAdvancedEventSelectors(v *[]types.AdvancedEventSelector, 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.AdvancedEventSelector if *v == nil { - sv = &types.AdvancedEventSelector{} + cv = []types.AdvancedEventSelector{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AdvancedEventSelector + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAdvancedEventSelector(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAdvancedFieldSelector(v **types.AdvancedFieldSelector, 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.AdvancedFieldSelector + if *v == nil { + sv = &types.AdvancedFieldSelector{} } else { sv = *v } for key, value := range shape { switch key { - case "FieldSelectors": - if err := awsAwsjson11_deserializeDocumentAdvancedFieldSelectors(&sv.FieldSelectors, value); err != nil { + case "EndsWith": + if err := awsAwsjson11_deserializeDocumentOperator(&sv.EndsWith, value); err != nil { + return err + } + + case "Equals": + if err := awsAwsjson11_deserializeDocumentOperator(&sv.Equals, value); err != nil { + return err + } + + case "Field": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SelectorField to be of type string, got %T instead", value) + } + sv.Field = ptr.String(jtv) + } + + case "NotEndsWith": + if err := awsAwsjson11_deserializeDocumentOperator(&sv.NotEndsWith, value); err != nil { + return err + } + + case "NotEquals": + if err := awsAwsjson11_deserializeDocumentOperator(&sv.NotEquals, value); err != nil { + return err + } + + case "NotStartsWith": + if err := awsAwsjson11_deserializeDocumentOperator(&sv.NotStartsWith, value); err != nil { + return err + } + + case "StartsWith": + if err := awsAwsjson11_deserializeDocumentOperator(&sv.StartsWith, value); err != nil { return err } + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAdvancedFieldSelectors(v *[]types.AdvancedFieldSelector, 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.AdvancedFieldSelector + if *v == nil { + cv = []types.AdvancedFieldSelector{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AdvancedFieldSelector + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAdvancedFieldSelector(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentChannel(v **types.Channel, 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.Channel + if *v == nil { + sv = &types.Channel{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ChannelArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelArn to be of type string, got %T instead", value) + } + sv.ChannelArn = ptr.String(jtv) + } + case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SelectorName to be of type string, got %T instead", value) + return fmt.Errorf("expected ChannelName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } @@ -6305,7 +7334,87 @@ func awsAwsjson11_deserializeDocumentAdvancedEventSelector(v **types.AdvancedEve return nil } -func awsAwsjson11_deserializeDocumentAdvancedEventSelectors(v *[]types.AdvancedEventSelector, value interface{}) error { +func awsAwsjson11_deserializeDocumentChannelARNInvalidException(v **types.ChannelARNInvalidException, 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.ChannelARNInvalidException + if *v == nil { + sv = &types.ChannelARNInvalidException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentChannelNotFoundException(v **types.ChannelNotFoundException, 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.ChannelNotFoundException + if *v == nil { + sv = &types.ChannelNotFoundException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentChannels(v *[]types.Channel, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6318,17 +7427,17 @@ func awsAwsjson11_deserializeDocumentAdvancedEventSelectors(v *[]types.AdvancedE return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AdvancedEventSelector + var cv []types.Channel if *v == nil { - cv = []types.AdvancedEventSelector{} + cv = []types.Channel{} } else { cv = *v } for _, value := range shape { - var col types.AdvancedEventSelector + var col types.Channel destAddr := &col - if err := awsAwsjson11_deserializeDocumentAdvancedEventSelector(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentChannel(&destAddr, value); err != nil { return err } col = *destAddr @@ -6339,7 +7448,7 @@ func awsAwsjson11_deserializeDocumentAdvancedEventSelectors(v *[]types.AdvancedE return nil } -func awsAwsjson11_deserializeDocumentAdvancedFieldSelector(v **types.AdvancedFieldSelector, value interface{}) error { +func awsAwsjson11_deserializeDocumentCloudTrailAccessNotEnabledException(v **types.CloudTrailAccessNotEnabledException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6352,52 +7461,22 @@ func awsAwsjson11_deserializeDocumentAdvancedFieldSelector(v **types.AdvancedFie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AdvancedFieldSelector + var sv *types.CloudTrailAccessNotEnabledException if *v == nil { - sv = &types.AdvancedFieldSelector{} + sv = &types.CloudTrailAccessNotEnabledException{} } else { sv = *v } for key, value := range shape { switch key { - case "EndsWith": - if err := awsAwsjson11_deserializeDocumentOperator(&sv.EndsWith, value); err != nil { - return err - } - - case "Equals": - if err := awsAwsjson11_deserializeDocumentOperator(&sv.Equals, value); err != nil { - return err - } - - case "Field": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SelectorField to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Field = ptr.String(jtv) - } - - case "NotEndsWith": - if err := awsAwsjson11_deserializeDocumentOperator(&sv.NotEndsWith, value); err != nil { - return err - } - - case "NotEquals": - if err := awsAwsjson11_deserializeDocumentOperator(&sv.NotEquals, value); err != nil { - return err - } - - case "NotStartsWith": - if err := awsAwsjson11_deserializeDocumentOperator(&sv.NotStartsWith, value); err != nil { - return err - } - - case "StartsWith": - if err := awsAwsjson11_deserializeDocumentOperator(&sv.StartsWith, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -6409,7 +7488,7 @@ func awsAwsjson11_deserializeDocumentAdvancedFieldSelector(v **types.AdvancedFie return nil } -func awsAwsjson11_deserializeDocumentAdvancedFieldSelectors(v *[]types.AdvancedFieldSelector, value interface{}) error { +func awsAwsjson11_deserializeDocumentCloudTrailARNInvalidException(v **types.CloudTrailARNInvalidException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6417,33 +7496,39 @@ func awsAwsjson11_deserializeDocumentAdvancedFieldSelectors(v *[]types.AdvancedF return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AdvancedFieldSelector + var sv *types.CloudTrailARNInvalidException if *v == nil { - cv = []types.AdvancedFieldSelector{} + sv = &types.CloudTrailARNInvalidException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.AdvancedFieldSelector - destAddr := &col - if err := awsAwsjson11_deserializeDocumentAdvancedFieldSelector(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentChannel(v **types.Channel, value interface{}) error { +func awsAwsjson11_deserializeDocumentCloudTrailInvalidClientTokenIdException(v **types.CloudTrailInvalidClientTokenIdException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6456,31 +7541,62 @@ func awsAwsjson11_deserializeDocumentChannel(v **types.Channel, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Channel + var sv *types.CloudTrailInvalidClientTokenIdException if *v == nil { - sv = &types.Channel{} + sv = &types.CloudTrailInvalidClientTokenIdException{} } else { sv = *v } for key, value := range shape { switch key { - case "ChannelArn": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ChannelArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.ChannelArn = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "Name": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCloudWatchLogsDeliveryUnavailableException(v **types.CloudWatchLogsDeliveryUnavailableException, 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.CloudWatchLogsDeliveryUnavailableException + if *v == nil { + sv = &types.CloudWatchLogsDeliveryUnavailableException{} + } 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 ChannelName to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -6492,7 +7608,7 @@ func awsAwsjson11_deserializeDocumentChannel(v **types.Channel, value interface{ return nil } -func awsAwsjson11_deserializeDocumentChannelARNInvalidException(v **types.ChannelARNInvalidException, value interface{}) error { +func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6505,9 +7621,9 @@ func awsAwsjson11_deserializeDocumentChannelARNInvalidException(v **types.Channe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ChannelARNInvalidException + var sv *types.ConflictException if *v == nil { - sv = &types.ChannelARNInvalidException{} + sv = &types.ConflictException{} } else { sv = *v } @@ -6532,7 +7648,7 @@ func awsAwsjson11_deserializeDocumentChannelARNInvalidException(v **types.Channe return nil } -func awsAwsjson11_deserializeDocumentChannelNotFoundException(v **types.ChannelNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentDataResource(v **types.DataResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6545,22 +7661,27 @@ func awsAwsjson11_deserializeDocumentChannelNotFoundException(v **types.ChannelN return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ChannelNotFoundException + var sv *types.DataResource if *v == nil { - sv = &types.ChannelNotFoundException{} + sv = &types.DataResource{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "Type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Type = ptr.String(jtv) + } + + case "Values": + if err := awsAwsjson11_deserializeDocumentDataResourceValues(&sv.Values, value); err != nil { + return err } default: @@ -6572,7 +7693,7 @@ func awsAwsjson11_deserializeDocumentChannelNotFoundException(v **types.ChannelN return nil } -func awsAwsjson11_deserializeDocumentChannels(v *[]types.Channel, value interface{}) error { +func awsAwsjson11_deserializeDocumentDataResources(v *[]types.DataResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6585,17 +7706,17 @@ func awsAwsjson11_deserializeDocumentChannels(v *[]types.Channel, value interfac return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Channel + var cv []types.DataResource if *v == nil { - cv = []types.Channel{} + cv = []types.DataResource{} } else { cv = *v } for _, value := range shape { - var col types.Channel + var col types.DataResource destAddr := &col - if err := awsAwsjson11_deserializeDocumentChannel(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentDataResource(&destAddr, value); err != nil { return err } col = *destAddr @@ -6606,7 +7727,43 @@ func awsAwsjson11_deserializeDocumentChannels(v *[]types.Channel, value interfac return nil } -func awsAwsjson11_deserializeDocumentCloudTrailAccessNotEnabledException(v **types.CloudTrailAccessNotEnabledException, value interface{}) error { +func awsAwsjson11_deserializeDocumentDataResourceValues(v *[]string, 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 []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDestination(v **types.Destination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6619,22 +7776,31 @@ func awsAwsjson11_deserializeDocumentCloudTrailAccessNotEnabledException(v **typ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CloudTrailAccessNotEnabledException + var sv *types.Destination if *v == nil { - sv = &types.CloudTrailAccessNotEnabledException{} + sv = &types.Destination{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "Location": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected Location to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Location = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DestinationType to be of type string, got %T instead", value) + } + sv.Type = types.DestinationType(jtv) } default: @@ -6642,11 +7808,45 @@ func awsAwsjson11_deserializeDocumentCloudTrailAccessNotEnabledException(v **typ } } - *v = sv + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDestinations(v *[]types.Destination, 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.Destination + if *v == nil { + cv = []types.Destination{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Destination + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDestination(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv return nil } -func awsAwsjson11_deserializeDocumentCloudTrailARNInvalidException(v **types.CloudTrailARNInvalidException, value interface{}) error { +func awsAwsjson11_deserializeDocumentEvent(v **types.Event, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6659,22 +7859,97 @@ func awsAwsjson11_deserializeDocumentCloudTrailARNInvalidException(v **types.Clo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CloudTrailARNInvalidException + var sv *types.Event if *v == nil { - sv = &types.CloudTrailARNInvalidException{} + sv = &types.Event{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "AccessKeyId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.AccessKeyId = ptr.String(jtv) + } + + case "CloudTrailEvent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CloudTrailEvent = ptr.String(jtv) + } + + case "EventId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EventId = ptr.String(jtv) + } + + case "EventName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EventName = ptr.String(jtv) + } + + case "EventSource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EventSource = ptr.String(jtv) + } + + case "EventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "ReadOnly": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReadOnly = ptr.String(jtv) + } + + case "Resources": + if err := awsAwsjson11_deserializeDocumentResourceList(&sv.Resources, value); err != nil { + return err + } + + case "Username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) } default: @@ -6686,7 +7961,7 @@ func awsAwsjson11_deserializeDocumentCloudTrailARNInvalidException(v **types.Clo return nil } -func awsAwsjson11_deserializeDocumentCloudTrailInvalidClientTokenIdException(v **types.CloudTrailInvalidClientTokenIdException, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStore(v **types.EventDataStore, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6699,22 +7974,117 @@ func awsAwsjson11_deserializeDocumentCloudTrailInvalidClientTokenIdException(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CloudTrailInvalidClientTokenIdException + var sv *types.EventDataStore if *v == nil { - sv = &types.CloudTrailInvalidClientTokenIdException{} + sv = &types.EventDataStore{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "AdvancedEventSelectors": + if err := awsAwsjson11_deserializeDocumentAdvancedEventSelectors(&sv.AdvancedEventSelectors, value); err != nil { + return err + } + + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "EventDataStoreArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected EventDataStoreArn to be of type string, got %T instead", value) + } + sv.EventDataStoreArn = ptr.String(jtv) + } + + case "MultiRegionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.MultiRegionEnabled = ptr.Bool(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventDataStoreName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OrganizationEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.OrganizationEnabled = ptr.Bool(jtv) + } + + case "RetentionPeriod": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RetentionPeriod to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetentionPeriod = ptr.Int32(int32(i64)) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventDataStoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.EventDataStoreStatus(jtv) + } + + case "TerminationProtectionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected TerminationProtectionEnabled to be of type *bool, got %T instead", value) + } + sv.TerminationProtectionEnabled = ptr.Bool(jtv) + } + + case "UpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + } - sv.Message = ptr.String(jtv) } default: @@ -6726,7 +8096,7 @@ func awsAwsjson11_deserializeDocumentCloudTrailInvalidClientTokenIdException(v * return nil } -func awsAwsjson11_deserializeDocumentCloudWatchLogsDeliveryUnavailableException(v **types.CloudWatchLogsDeliveryUnavailableException, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStoreAlreadyExistsException(v **types.EventDataStoreAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6739,9 +8109,9 @@ func awsAwsjson11_deserializeDocumentCloudWatchLogsDeliveryUnavailableException( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CloudWatchLogsDeliveryUnavailableException + var sv *types.EventDataStoreAlreadyExistsException if *v == nil { - sv = &types.CloudWatchLogsDeliveryUnavailableException{} + sv = &types.EventDataStoreAlreadyExistsException{} } else { sv = *v } @@ -6766,7 +8136,7 @@ func awsAwsjson11_deserializeDocumentCloudWatchLogsDeliveryUnavailableException( return nil } -func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStoreARNInvalidException(v **types.EventDataStoreARNInvalidException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6779,9 +8149,9 @@ func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.EventDataStoreARNInvalidException if *v == nil { - sv = &types.ConflictException{} + sv = &types.EventDataStoreARNInvalidException{} } else { sv = *v } @@ -6806,7 +8176,7 @@ func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsAwsjson11_deserializeDocumentDataResource(v **types.DataResource, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStoreHasOngoingImportException(v **types.EventDataStoreHasOngoingImportException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6819,27 +8189,22 @@ func awsAwsjson11_deserializeDocumentDataResource(v **types.DataResource, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataResource + var sv *types.EventDataStoreHasOngoingImportException if *v == nil { - sv = &types.DataResource{} + sv = &types.EventDataStoreHasOngoingImportException{} } else { sv = *v } for key, value := range shape { switch key { - case "Type": + 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) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Type = ptr.String(jtv) - } - - case "Values": - if err := awsAwsjson11_deserializeDocumentDataResourceValues(&sv.Values, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -6851,41 +8216,7 @@ func awsAwsjson11_deserializeDocumentDataResource(v **types.DataResource, value return nil } -func awsAwsjson11_deserializeDocumentDataResources(v *[]types.DataResource, 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.DataResource - if *v == nil { - cv = []types.DataResource{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.DataResource - destAddr := &col - if err := awsAwsjson11_deserializeDocumentDataResource(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentDataResourceValues(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStoreMaxLimitExceededException(v **types.EventDataStoreMaxLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6893,35 +8224,39 @@ func awsAwsjson11_deserializeDocumentDataResourceValues(v *[]string, value inter return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.EventDataStoreMaxLimitExceededException if *v == nil { - cv = []string{} + sv = &types.EventDataStoreMaxLimitExceededException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentDestination(v **types.Destination, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStoreNotFoundException(v **types.EventDataStoreNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6934,31 +8269,22 @@ func awsAwsjson11_deserializeDocumentDestination(v **types.Destination, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Destination + var sv *types.EventDataStoreNotFoundException if *v == nil { - sv = &types.Destination{} + sv = &types.EventDataStoreNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { - case "Location": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Location to be of type string, got %T instead", value) - } - sv.Location = ptr.String(jtv) - } - - case "Type": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DestinationType to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Type = types.DestinationType(jtv) + sv.Message = ptr.String(jtv) } default: @@ -6970,7 +8296,7 @@ func awsAwsjson11_deserializeDocumentDestination(v **types.Destination, value in return nil } -func awsAwsjson11_deserializeDocumentDestinations(v *[]types.Destination, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStores(v *[]types.EventDataStore, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6983,17 +8309,17 @@ func awsAwsjson11_deserializeDocumentDestinations(v *[]types.Destination, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Destination + var cv []types.EventDataStore if *v == nil { - cv = []types.Destination{} + cv = []types.EventDataStore{} } else { cv = *v } for _, value := range shape { - var col types.Destination + var col types.EventDataStore destAddr := &col - if err := awsAwsjson11_deserializeDocumentDestination(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentEventDataStore(&destAddr, value); err != nil { return err } col = *destAddr @@ -7004,7 +8330,7 @@ func awsAwsjson11_deserializeDocumentDestinations(v *[]types.Destination, value return nil } -func awsAwsjson11_deserializeDocumentEvent(v **types.Event, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventDataStoreTerminationProtectedException(v **types.EventDataStoreTerminationProtectedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7017,97 +8343,22 @@ func awsAwsjson11_deserializeDocumentEvent(v **types.Event, value interface{}) e return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Event + var sv *types.EventDataStoreTerminationProtectedException if *v == nil { - sv = &types.Event{} + sv = &types.EventDataStoreTerminationProtectedException{} } else { sv = *v } for key, value := range shape { switch key { - case "AccessKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AccessKeyId = ptr.String(jtv) - } - - case "CloudTrailEvent": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CloudTrailEvent = ptr.String(jtv) - } - - case "EventId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.EventId = ptr.String(jtv) - } - - case "EventName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.EventName = ptr.String(jtv) - } - - case "EventSource": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.EventSource = ptr.String(jtv) - } - - case "EventTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.EventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - - } - } - - case "ReadOnly": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ReadOnly = ptr.String(jtv) - } - - case "Resources": - if err := awsAwsjson11_deserializeDocumentResourceList(&sv.Resources, value); err != nil { - return err - } - - case "Username": + 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) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Username = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -7119,7 +8370,7 @@ func awsAwsjson11_deserializeDocumentEvent(v **types.Event, value interface{}) e return nil } -func awsAwsjson11_deserializeDocumentEventDataStore(v **types.EventDataStore, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventSelector(v **types.EventSelector, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7132,117 +8383,41 @@ func awsAwsjson11_deserializeDocumentEventDataStore(v **types.EventDataStore, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventDataStore + var sv *types.EventSelector if *v == nil { - sv = &types.EventDataStore{} + sv = &types.EventSelector{} } else { sv = *v } for key, value := range shape { switch key { - case "AdvancedEventSelectors": - if err := awsAwsjson11_deserializeDocumentAdvancedEventSelectors(&sv.AdvancedEventSelectors, value); err != nil { + case "DataResources": + if err := awsAwsjson11_deserializeDocumentDataResources(&sv.DataResources, value); err != nil { return err } - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - - } - } - - case "EventDataStoreArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EventDataStoreArn to be of type string, got %T instead", value) - } - sv.EventDataStoreArn = ptr.String(jtv) - } - - case "MultiRegionEnabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.MultiRegionEnabled = ptr.Bool(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EventDataStoreName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "OrganizationEnabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.OrganizationEnabled = ptr.Bool(jtv) - } - - case "RetentionPeriod": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected RetentionPeriod to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RetentionPeriod = ptr.Int32(int32(i64)) - } - - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EventDataStoreStatus to be of type string, got %T instead", value) - } - sv.Status = types.EventDataStoreStatus(jtv) + case "ExcludeManagementEventSources": + if err := awsAwsjson11_deserializeDocumentExcludeManagementEventSources(&sv.ExcludeManagementEventSources, value); err != nil { + return err } - case "TerminationProtectionEnabled": + case "IncludeManagementEvents": if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected TerminationProtectionEnabled to be of type *bool, got %T instead", value) - } - sv.TerminationProtectionEnabled = ptr.Bool(jtv) - } - - case "UpdatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeManagementEvents = ptr.Bool(jtv) + } + case "ReadWriteType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReadWriteType to be of type string, got %T instead", value) } + sv.ReadWriteType = types.ReadWriteType(jtv) } default: @@ -7254,7 +8429,7 @@ func awsAwsjson11_deserializeDocumentEventDataStore(v **types.EventDataStore, va return nil } -func awsAwsjson11_deserializeDocumentEventDataStoreAlreadyExistsException(v **types.EventDataStoreAlreadyExistsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventSelectors(v *[]types.EventSelector, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7262,39 +8437,33 @@ func awsAwsjson11_deserializeDocumentEventDataStoreAlreadyExistsException(v **ty return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventDataStoreAlreadyExistsException + var cv []types.EventSelector if *v == nil { - sv = &types.EventDataStoreAlreadyExistsException{} + cv = []types.EventSelector{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.EventSelector + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEventSelector(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentEventDataStoreARNInvalidException(v **types.EventDataStoreARNInvalidException, value interface{}) error { +func awsAwsjson11_deserializeDocumentEventsList(v *[]types.Event, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7302,39 +8471,33 @@ func awsAwsjson11_deserializeDocumentEventDataStoreARNInvalidException(v **types return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventDataStoreARNInvalidException + var cv []types.Event if *v == nil { - sv = &types.EventDataStoreARNInvalidException{} + cv = []types.Event{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.Event + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEvent(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentEventDataStoreMaxLimitExceededException(v **types.EventDataStoreMaxLimitExceededException, value interface{}) error { +func awsAwsjson11_deserializeDocumentExcludeManagementEventSources(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7342,39 +8505,35 @@ func awsAwsjson11_deserializeDocumentEventDataStoreMaxLimitExceededException(v * return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventDataStoreMaxLimitExceededException + var cv []string if *v == nil { - sv = &types.EventDataStoreMaxLimitExceededException{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentEventDataStoreNotFoundException(v **types.EventDataStoreNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentImportDestinations(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7382,39 +8541,35 @@ func awsAwsjson11_deserializeDocumentEventDataStoreNotFoundException(v **types.E return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventDataStoreNotFoundException + var cv []string if *v == nil { - sv = &types.EventDataStoreNotFoundException{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventDataStoreArn to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentEventDataStores(v *[]types.EventDataStore, value interface{}) error { +func awsAwsjson11_deserializeDocumentImportFailureList(v *[]types.ImportFailureListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7427,17 +8582,17 @@ func awsAwsjson11_deserializeDocumentEventDataStores(v *[]types.EventDataStore, return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EventDataStore + var cv []types.ImportFailureListItem if *v == nil { - cv = []types.EventDataStore{} + cv = []types.ImportFailureListItem{} } else { cv = *v } for _, value := range shape { - var col types.EventDataStore + var col types.ImportFailureListItem destAddr := &col - if err := awsAwsjson11_deserializeDocumentEventDataStore(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentImportFailureListItem(&destAddr, value); err != nil { return err } col = *destAddr @@ -7448,7 +8603,7 @@ func awsAwsjson11_deserializeDocumentEventDataStores(v *[]types.EventDataStore, return nil } -func awsAwsjson11_deserializeDocumentEventDataStoreTerminationProtectedException(v **types.EventDataStoreTerminationProtectedException, value interface{}) error { +func awsAwsjson11_deserializeDocumentImportFailureListItem(v **types.ImportFailureListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7461,9 +8616,92 @@ func awsAwsjson11_deserializeDocumentEventDataStoreTerminationProtectedException return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventDataStoreTerminationProtectedException + var sv *types.ImportFailureListItem if *v == nil { - sv = &types.EventDataStoreTerminationProtectedException{} + sv = &types.ImportFailureListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "ErrorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorType = ptr.String(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "Location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportFailureStatus to be of type string, got %T instead", value) + } + sv.Status = types.ImportFailureStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImportNotFoundException(v **types.ImportNotFoundException, 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.ImportNotFoundException + if *v == nil { + sv = &types.ImportNotFoundException{} } else { sv = *v } @@ -7482,13 +8720,47 @@ func awsAwsjson11_deserializeDocumentEventDataStoreTerminationProtectedException default: _, _ = key, value - } + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImportsList(v *[]types.ImportsListItem, 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.ImportsListItem + if *v == nil { + cv = []types.ImportsListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImportsListItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImportsListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentEventSelector(v **types.EventSelector, value interface{}) error { +func awsAwsjson11_deserializeDocumentImportsListItem(v **types.ImportsListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7501,41 +8773,68 @@ func awsAwsjson11_deserializeDocumentEventSelector(v **types.EventSelector, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventSelector + var sv *types.ImportsListItem if *v == nil { - sv = &types.EventSelector{} + sv = &types.ImportsListItem{} } else { sv = *v } for key, value := range shape { switch key { - case "DataResources": - if err := awsAwsjson11_deserializeDocumentDataResources(&sv.DataResources, value); err != nil { - return err + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } } - case "ExcludeManagementEventSources": - if err := awsAwsjson11_deserializeDocumentExcludeManagementEventSources(&sv.ExcludeManagementEventSources, value); err != nil { + case "Destinations": + if err := awsAwsjson11_deserializeDocumentImportDestinations(&sv.Destinations, value); err != nil { return err } - case "IncludeManagementEvents": + case "ImportId": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) } - sv.IncludeManagementEvents = ptr.Bool(jtv) + sv.ImportId = ptr.String(jtv) } - case "ReadWriteType": + case "ImportStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReadWriteType to be of type string, got %T instead", value) + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.ImportStatus = types.ImportStatus(jtv) + } + + case "UpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + } - sv.ReadWriteType = types.ReadWriteType(jtv) } default: @@ -7547,7 +8846,7 @@ func awsAwsjson11_deserializeDocumentEventSelector(v **types.EventSelector, valu return nil } -func awsAwsjson11_deserializeDocumentEventSelectors(v *[]types.EventSelector, value interface{}) error { +func awsAwsjson11_deserializeDocumentImportSource(v **types.ImportSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7555,33 +8854,35 @@ func awsAwsjson11_deserializeDocumentEventSelectors(v *[]types.EventSelector, va return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EventSelector + var sv *types.ImportSource if *v == nil { - cv = []types.EventSelector{} + sv = &types.ImportSource{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.EventSelector - destAddr := &col - if err := awsAwsjson11_deserializeDocumentEventSelector(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "S3": + if err := awsAwsjson11_deserializeDocumentS3ImportSource(&sv.S3, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentEventsList(v *[]types.Event, value interface{}) error { +func awsAwsjson11_deserializeDocumentImportStatistics(v **types.ImportStatistics, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7589,65 +8890,91 @@ func awsAwsjson11_deserializeDocumentEventsList(v *[]types.Event, value interfac return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Event + var sv *types.ImportStatistics if *v == nil { - cv = []types.Event{} + sv = &types.ImportStatistics{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Event - destAddr := &col - if err := awsAwsjson11_deserializeDocumentEvent(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} + for key, value := range shape { + switch key { + case "EventsCompleted": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EventsCompleted = ptr.Int64(i64) + } -func awsAwsjson11_deserializeDocumentExcludeManagementEventSources(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "FailedEntries": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailedEntries = ptr.Int64(i64) + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "FilesCompleted": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FilesCompleted = ptr.Int64(i64) + } - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } + case "PrefixesCompleted": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PrefixesCompleted = ptr.Int64(i64) + } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + case "PrefixesFound": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PrefixesFound = ptr.Int64(i64) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } @@ -8165,6 +9492,46 @@ func awsAwsjson11_deserializeDocumentInvalidEventCategoryException(v **types.Inv return nil } +func awsAwsjson11_deserializeDocumentInvalidEventDataStoreCategoryException(v **types.InvalidEventDataStoreCategoryException, 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.InvalidEventDataStoreCategoryException + if *v == nil { + sv = &types.InvalidEventDataStoreCategoryException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentInvalidEventDataStoreStatusException(v **types.InvalidEventDataStoreStatusException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8205,7 +9572,47 @@ func awsAwsjson11_deserializeDocumentInvalidEventDataStoreStatusException(v **ty return nil } -func awsAwsjson11_deserializeDocumentInvalidEventSelectorsException(v **types.InvalidEventSelectorsException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidEventSelectorsException(v **types.InvalidEventSelectorsException, 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.InvalidEventSelectorsException + if *v == nil { + sv = &types.InvalidEventSelectorsException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidHomeRegionException(v **types.InvalidHomeRegionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8218,9 +9625,9 @@ func awsAwsjson11_deserializeDocumentInvalidEventSelectorsException(v **types.In return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidEventSelectorsException + var sv *types.InvalidHomeRegionException if *v == nil { - sv = &types.InvalidEventSelectorsException{} + sv = &types.InvalidHomeRegionException{} } else { sv = *v } @@ -8245,7 +9652,7 @@ func awsAwsjson11_deserializeDocumentInvalidEventSelectorsException(v **types.In return nil } -func awsAwsjson11_deserializeDocumentInvalidHomeRegionException(v **types.InvalidHomeRegionException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidImportSourceException(v **types.InvalidImportSourceException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8258,9 +9665,9 @@ func awsAwsjson11_deserializeDocumentInvalidHomeRegionException(v **types.Invali return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidHomeRegionException + var sv *types.InvalidImportSourceException if *v == nil { - sv = &types.InvalidHomeRegionException{} + sv = &types.InvalidImportSourceException{} } else { sv = *v } @@ -10130,6 +11537,64 @@ func awsAwsjson11_deserializeDocumentS3BucketDoesNotExistException(v **types.S3B return nil } +func awsAwsjson11_deserializeDocumentS3ImportSource(v **types.S3ImportSource, 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.S3ImportSource + if *v == nil { + sv = &types.S3ImportSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "S3BucketAccessRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.S3BucketAccessRoleArn = ptr.String(jtv) + } + + case "S3BucketRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.S3BucketRegion = ptr.String(jtv) + } + + case "S3LocationUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.S3LocationUri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentSourceConfig(v **types.SourceConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11550,6 +13015,134 @@ func awsAwsjson11_deserializeOpDocumentGetEventSelectorsOutput(v **GetEventSelec return nil } +func awsAwsjson11_deserializeOpDocumentGetImportOutput(v **GetImportOutput, 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 *GetImportOutput + if *v == nil { + sv = &GetImportOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "Destinations": + if err := awsAwsjson11_deserializeDocumentImportDestinations(&sv.Destinations, value); err != nil { + return err + } + + case "EndEventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndEventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "ImportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.ImportId = ptr.String(jtv) + } + + case "ImportSource": + if err := awsAwsjson11_deserializeDocumentImportSource(&sv.ImportSource, value); err != nil { + return err + } + + case "ImportStatistics": + if err := awsAwsjson11_deserializeDocumentImportStatistics(&sv.ImportStatistics, value); err != nil { + return err + } + + case "ImportStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.ImportStatus = types.ImportStatus(jtv) + } + + case "StartEventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartEventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetInsightSelectorsOutput(v **GetInsightSelectorsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11895,25 +13488,115 @@ func awsAwsjson11_deserializeOpDocumentGetTrailStatusOutput(v **GetTrailStatusOu default: return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - } - } + } + } + + case "TimeLoggingStarted": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TimeLoggingStarted = ptr.String(jtv) + } + + case "TimeLoggingStopped": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TimeLoggingStopped = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, 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 *ListChannelsOutput + if *v == nil { + sv = &ListChannelsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Channels": + if err := awsAwsjson11_deserializeDocumentChannels(&sv.Channels, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListEventDataStoresOutput(v **ListEventDataStoresOutput, 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 *ListEventDataStoresOutput + if *v == nil { + sv = &ListEventDataStoresOutput{} + } else { + sv = *v + } - case "TimeLoggingStarted": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.TimeLoggingStarted = ptr.String(jtv) + for key, value := range shape { + switch key { + case "EventDataStores": + if err := awsAwsjson11_deserializeDocumentEventDataStores(&sv.EventDataStores, value); err != nil { + return err } - case "TimeLoggingStopped": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } - sv.TimeLoggingStopped = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -11925,7 +13608,7 @@ func awsAwsjson11_deserializeOpDocumentGetTrailStatusOutput(v **GetTrailStatusOu return nil } -func awsAwsjson11_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListImportFailuresOutput(v **ListImportFailuresOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11938,17 +13621,17 @@ func awsAwsjson11_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListChannelsOutput + var sv *ListImportFailuresOutput if *v == nil { - sv = &ListChannelsOutput{} + sv = &ListImportFailuresOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Channels": - if err := awsAwsjson11_deserializeDocumentChannels(&sv.Channels, value); err != nil { + case "Failures": + if err := awsAwsjson11_deserializeDocumentImportFailureList(&sv.Failures, value); err != nil { return err } @@ -11970,7 +13653,7 @@ func awsAwsjson11_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput return nil } -func awsAwsjson11_deserializeOpDocumentListEventDataStoresOutput(v **ListEventDataStoresOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListImportsOutput(v **ListImportsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11983,17 +13666,17 @@ func awsAwsjson11_deserializeOpDocumentListEventDataStoresOutput(v **ListEventDa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEventDataStoresOutput + var sv *ListImportsOutput if *v == nil { - sv = &ListEventDataStoresOutput{} + sv = &ListImportsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EventDataStores": - if err := awsAwsjson11_deserializeDocumentEventDataStores(&sv.EventDataStores, value); err != nil { + case "Imports": + if err := awsAwsjson11_deserializeDocumentImportsList(&sv.Imports, value); err != nil { return err } @@ -12501,6 +14184,129 @@ func awsAwsjson11_deserializeOpDocumentRestoreEventDataStoreOutput(v **RestoreEv return nil } +func awsAwsjson11_deserializeOpDocumentStartImportOutput(v **StartImportOutput, 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 *StartImportOutput + if *v == nil { + sv = &StartImportOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "Destinations": + if err := awsAwsjson11_deserializeDocumentImportDestinations(&sv.Destinations, value); err != nil { + return err + } + + case "EndEventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndEventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "ImportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.ImportId = ptr.String(jtv) + } + + case "ImportSource": + if err := awsAwsjson11_deserializeDocumentImportSource(&sv.ImportSource, value); err != nil { + return err + } + + case "ImportStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.ImportStatus = types.ImportStatus(jtv) + } + + case "StartEventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartEventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentStartLoggingOutput(v **StartLoggingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12572,6 +14378,134 @@ func awsAwsjson11_deserializeOpDocumentStartQueryOutput(v **StartQueryOutput, va return nil } +func awsAwsjson11_deserializeOpDocumentStopImportOutput(v **StopImportOutput, 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 *StopImportOutput + if *v == nil { + sv = &StopImportOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "Destinations": + if err := awsAwsjson11_deserializeDocumentImportDestinations(&sv.Destinations, value); err != nil { + return err + } + + case "EndEventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndEventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "ImportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UUID to be of type string, got %T instead", value) + } + sv.ImportId = ptr.String(jtv) + } + + case "ImportSource": + if err := awsAwsjson11_deserializeDocumentImportSource(&sv.ImportSource, value); err != nil { + return err + } + + case "ImportStatistics": + if err := awsAwsjson11_deserializeDocumentImportStatistics(&sv.ImportStatistics, value); err != nil { + return err + } + + case "ImportStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.ImportStatus = types.ImportStatus(jtv) + } + + case "StartEventTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartEventTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "UpdatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentStopLoggingOutput(v **StopLoggingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cloudtrail/generated.json b/service/cloudtrail/generated.json index 7626c965c30..5a39a59cabc 100644 --- a/service/cloudtrail/generated.json +++ b/service/cloudtrail/generated.json @@ -19,12 +19,15 @@ "api_op_GetChannel.go", "api_op_GetEventDataStore.go", "api_op_GetEventSelectors.go", + "api_op_GetImport.go", "api_op_GetInsightSelectors.go", "api_op_GetQueryResults.go", "api_op_GetTrail.go", "api_op_GetTrailStatus.go", "api_op_ListChannels.go", "api_op_ListEventDataStores.go", + "api_op_ListImportFailures.go", + "api_op_ListImports.go", "api_op_ListPublicKeys.go", "api_op_ListQueries.go", "api_op_ListTags.go", @@ -34,8 +37,10 @@ "api_op_PutInsightSelectors.go", "api_op_RemoveTags.go", "api_op_RestoreEventDataStore.go", + "api_op_StartImport.go", "api_op_StartLogging.go", "api_op_StartQuery.go", + "api_op_StopImport.go", "api_op_StopLogging.go", "api_op_UpdateEventDataStore.go", "api_op_UpdateTrail.go", diff --git a/service/cloudtrail/serializers.go b/service/cloudtrail/serializers.go index d3f1a24dc06..67d4d734e1c 100644 --- a/service/cloudtrail/serializers.go +++ b/service/cloudtrail/serializers.go @@ -621,6 +621,61 @@ func (m *awsAwsjson11_serializeOpGetEventSelectors) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetImport struct { +} + +func (*awsAwsjson11_serializeOpGetImport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetImport) 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.(*GetImportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.GetImport") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetImportInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpGetInsightSelectors struct { } @@ -951,6 +1006,116 @@ func (m *awsAwsjson11_serializeOpListEventDataStores) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListImportFailures struct { +} + +func (*awsAwsjson11_serializeOpListImportFailures) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListImportFailures) 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.(*ListImportFailuresInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.ListImportFailures") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListImportFailuresInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListImports struct { +} + +func (*awsAwsjson11_serializeOpListImports) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListImports) 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.(*ListImportsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.ListImports") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListImportsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListPublicKeys struct { } @@ -1446,6 +1611,61 @@ func (m *awsAwsjson11_serializeOpRestoreEventDataStore) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpStartImport struct { +} + +func (*awsAwsjson11_serializeOpStartImport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartImport) 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.(*StartImportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.StartImport") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartImportInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpStartLogging struct { } @@ -1556,6 +1776,61 @@ func (m *awsAwsjson11_serializeOpStartQuery) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpStopImport struct { +} + +func (*awsAwsjson11_serializeOpStopImport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopImport) 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.(*StopImportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CloudTrail_20131101.StopImport") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopImportInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpStopLogging struct { } @@ -1917,6 +2192,31 @@ func awsAwsjson11_serializeDocumentExcludeManagementEventSources(v []string, val return nil } +func awsAwsjson11_serializeDocumentImportDestinations(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentImportSource(v *types.ImportSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3 != nil { + ok := object.Key("S3") + if err := awsAwsjson11_serializeDocumentS3ImportSource(v.S3, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentInsightSelector(v *types.InsightSelector, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1994,6 +2294,28 @@ func awsAwsjson11_serializeDocumentResourceIdList(v []string, value smithyjson.V return nil } +func awsAwsjson11_serializeDocumentS3ImportSource(v *types.S3ImportSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3BucketAccessRoleArn != nil { + ok := object.Key("S3BucketAccessRoleArn") + ok.String(*v.S3BucketAccessRoleArn) + } + + if v.S3BucketRegion != nil { + ok := object.Key("S3BucketRegion") + ok.String(*v.S3BucketRegion) + } + + if v.S3LocationUri != nil { + ok := object.Key("S3LocationUri") + ok.String(*v.S3LocationUri) + } + + return nil +} + func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2282,6 +2604,18 @@ func awsAwsjson11_serializeOpDocumentGetEventSelectorsInput(v *GetEventSelectors return nil } +func awsAwsjson11_serializeOpDocumentGetImportInput(v *GetImportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportId != nil { + ok := object.Key("ImportId") + ok.String(*v.ImportId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetInsightSelectorsInput(v *GetInsightSelectorsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2379,6 +2713,55 @@ func awsAwsjson11_serializeOpDocumentListEventDataStoresInput(v *ListEventDataSt return nil } +func awsAwsjson11_serializeOpDocumentListImportFailuresInput(v *ListImportFailuresInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportId != nil { + ok := object.Key("ImportId") + ok.String(*v.ImportId) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListImportsInput(v *ListImportsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("Destination") + ok.String(*v.Destination) + } + + if len(v.ImportStatus) > 0 { + ok := object.Key("ImportStatus") + ok.String(string(v.ImportStatus)) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListPublicKeysInput(v *ListPublicKeysInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2584,6 +2967,42 @@ func awsAwsjson11_serializeOpDocumentRestoreEventDataStoreInput(v *RestoreEventD return nil } +func awsAwsjson11_serializeOpDocumentStartImportInput(v *StartImportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destinations != nil { + ok := object.Key("Destinations") + if err := awsAwsjson11_serializeDocumentImportDestinations(v.Destinations, ok); err != nil { + return err + } + } + + if v.EndEventTime != nil { + ok := object.Key("EndEventTime") + ok.Double(smithytime.FormatEpochSeconds(*v.EndEventTime)) + } + + if v.ImportId != nil { + ok := object.Key("ImportId") + ok.String(*v.ImportId) + } + + if v.ImportSource != nil { + ok := object.Key("ImportSource") + if err := awsAwsjson11_serializeDocumentImportSource(v.ImportSource, ok); err != nil { + return err + } + } + + if v.StartEventTime != nil { + ok := object.Key("StartEventTime") + ok.Double(smithytime.FormatEpochSeconds(*v.StartEventTime)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentStartLoggingInput(v *StartLoggingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2608,6 +3027,18 @@ func awsAwsjson11_serializeOpDocumentStartQueryInput(v *StartQueryInput, value s return nil } +func awsAwsjson11_serializeOpDocumentStopImportInput(v *StopImportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportId != nil { + ok := object.Key("ImportId") + ok.String(*v.ImportId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentStopLoggingInput(v *StopLoggingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/cloudtrail/types/enums.go b/service/cloudtrail/types/enums.go index 6a91b7d8659..38f5f941107 100644 --- a/service/cloudtrail/types/enums.go +++ b/service/cloudtrail/types/enums.go @@ -56,6 +56,50 @@ func (EventDataStoreStatus) Values() []EventDataStoreStatus { } } +type ImportFailureStatus string + +// Enum values for ImportFailureStatus +const ( + ImportFailureStatusFailed ImportFailureStatus = "FAILED" + ImportFailureStatusRetry ImportFailureStatus = "RETRY" + ImportFailureStatusSucceeded ImportFailureStatus = "SUCCEEDED" +) + +// Values returns all known values for ImportFailureStatus. 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 (ImportFailureStatus) Values() []ImportFailureStatus { + return []ImportFailureStatus{ + "FAILED", + "RETRY", + "SUCCEEDED", + } +} + +type ImportStatus string + +// Enum values for ImportStatus +const ( + ImportStatusInitializing ImportStatus = "INITIALIZING" + ImportStatusInProgress ImportStatus = "IN_PROGRESS" + ImportStatusFailed ImportStatus = "FAILED" + ImportStatusStopped ImportStatus = "STOPPED" + ImportStatusCompleted ImportStatus = "COMPLETED" +) + +// Values returns all known values for ImportStatus. 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 (ImportStatus) Values() []ImportStatus { + return []ImportStatus{ + "INITIALIZING", + "IN_PROGRESS", + "FAILED", + "STOPPED", + "COMPLETED", + } +} + type InsightType string // Enum values for InsightType diff --git a/service/cloudtrail/types/errors.go b/service/cloudtrail/types/errors.go index 50d3e64a63f..5cec43e62d6 100644 --- a/service/cloudtrail/types/errors.go +++ b/service/cloudtrail/types/errors.go @@ -7,6 +7,28 @@ import ( smithy "github.com/aws/smithy-go" ) +// This exception is thrown when you start a new import and a previous import is +// still in progress. +type AccountHasOngoingImportException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccountHasOngoingImportException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccountHasOngoingImportException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccountHasOngoingImportException) ErrorCode() string { + return "AccountHasOngoingImportException" +} +func (e *AccountHasOngoingImportException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The specified channel ARN is not valid or does not map to a channel in your // account. type ChannelARNInvalidException struct { @@ -211,6 +233,30 @@ func (e *EventDataStoreARNInvalidException) ErrorCode() string { } func (e *EventDataStoreARNInvalidException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This exception is thrown when you try to update or delete an event data store +// that currently has an import in progress. +type EventDataStoreHasOngoingImportException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *EventDataStoreHasOngoingImportException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EventDataStoreHasOngoingImportException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EventDataStoreHasOngoingImportException) ErrorCode() string { + return "EventDataStoreHasOngoingImportException" +} +func (e *EventDataStoreHasOngoingImportException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // Your account has used the maximum number of event data stores. type EventDataStoreMaxLimitExceededException struct { Message *string @@ -279,6 +325,25 @@ func (e *EventDataStoreTerminationProtectedException) ErrorFault() smithy.ErrorF return smithy.FaultClient } +// The specified import was not found. +type ImportNotFoundException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ImportNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ImportNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ImportNotFoundException) ErrorCode() string { return "ImportNotFoundException" } +func (e *ImportNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The event data store is inactive. type InactiveEventDataStoreException struct { Message *string @@ -526,6 +591,30 @@ func (e *InvalidEventCategoryException) ErrorMessage() string { func (e *InvalidEventCategoryException) ErrorCode() string { return "InvalidEventCategoryException" } func (e *InvalidEventCategoryException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This exception is thrown when the event data store category is not valid for the +// import. +type InvalidEventDataStoreCategoryException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InvalidEventDataStoreCategoryException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidEventDataStoreCategoryException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidEventDataStoreCategoryException) ErrorCode() string { + return "InvalidEventDataStoreCategoryException" +} +func (e *InvalidEventDataStoreCategoryException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The event data store is not in a status that supports the operation. type InvalidEventDataStoreStatusException struct { Message *string @@ -611,6 +700,26 @@ func (e *InvalidHomeRegionException) ErrorMessage() string { func (e *InvalidHomeRegionException) ErrorCode() string { return "InvalidHomeRegionException" } func (e *InvalidHomeRegionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This exception is thrown when the provided source S3 bucket is not valid for +// import. +type InvalidImportSourceException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InvalidImportSourceException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidImportSourceException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidImportSourceException) ErrorCode() string { return "InvalidImportSourceException" } +func (e *InvalidImportSourceException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The formatting or syntax of the InsightSelectors JSON statement in your // PutInsightSelectors or GetInsightSelectors request is not valid, or the // specified insight type in the InsightSelectors statement is not a valid insight diff --git a/service/cloudtrail/types/types.go b/service/cloudtrail/types/types.go index 7853db61b22..357047b8b90 100644 --- a/service/cloudtrail/types/types.go +++ b/service/cloudtrail/types/types.go @@ -307,7 +307,7 @@ type DataResource struct { // specified objects. // // * To log data events for all objects in all S3 buckets in - // your Amazon Web Services account, specify the prefix as arn:aws:s3:::. This also + // your Amazon Web Services account, specify the prefix as arn:aws:s3. This also // enables logging of data event activity performed by any user or role in your // Amazon Web Services account, even if that activity is performed on a bucket that // belongs to another Amazon Web Services account. @@ -479,7 +479,7 @@ type EventSelector struct { // resources cannot exceed 250 across all event selectors in a trail. This limit // does not apply if you configure resource logging for all data events. For more // information, see Data Events - // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events) + // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) // and Limits in CloudTrail // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) // in the CloudTrail User Guide. @@ -496,7 +496,7 @@ type EventSelector struct { // Specify if you want your event selector to include management events for your // trail. For more information, see Management Events - // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events) + // (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html) // in the CloudTrail User Guide. By default, the value is true. The first copy of // management events is free. You are charged for additional copies of management // events that you are logging on any subsequent trail in the same region. For more @@ -512,6 +512,80 @@ type EventSelector struct { noSmithyDocumentSerde } +// Provides information about an import failure. +type ImportFailureListItem struct { + + // Provides the reason the import failed. + ErrorMessage *string + + // The type of import error. + ErrorType *string + + // When the import was last updated. + LastUpdatedTime *time.Time + + // The location of the failure in the S3 bucket. + Location *string + + // The status of the import. + Status ImportFailureStatus + + noSmithyDocumentSerde +} + +// Contains information about an import that was returned by a lookup request. +type ImportsListItem struct { + + // The timestamp of the import's creation. + CreatedTimestamp *time.Time + + // The destination event data store. + Destinations []string + + // The ID of the import. + ImportId *string + + // The status of the import. + ImportStatus ImportStatus + + // The timestamp of the import's last update. + UpdatedTimestamp *time.Time + + noSmithyDocumentSerde +} + +// The import source. +type ImportSource struct { + + // The source S3 bucket. + // + // This member is required. + S3 *S3ImportSource + + noSmithyDocumentSerde +} + +// Provides statistics for the specified ImportID. +type ImportStatistics struct { + + // The number of trail events imported. + EventsCompleted *int64 + + // The number of failed entries. + FailedEntries *int64 + + // The number of files that completed import. + FilesCompleted *int64 + + // The number of S3 prefixes that completed import. + PrefixesCompleted *int64 + + // The number of S3 prefixes found for the import. + PrefixesFound *int64 + + noSmithyDocumentSerde +} + // A JSON string that contains a list of insight types that are logged on a trail. type InsightSelector struct { @@ -647,6 +721,27 @@ type ResourceTag struct { noSmithyDocumentSerde } +// The settings for the source S3 bucket. +type S3ImportSource struct { + + // The IAM ARN role used to access the source S3 bucket. + // + // This member is required. + S3BucketAccessRoleArn *string + + // The region associated with the source S3 bucket. + // + // This member is required. + S3BucketRegion *string + + // The URI for the source S3 bucket. + // + // This member is required. + S3LocationUri *string + + noSmithyDocumentSerde +} + // Contains configuration information about the service-linked channel. type SourceConfig struct { diff --git a/service/cloudtrail/validators.go b/service/cloudtrail/validators.go index a2d9b940490..3ef5009c3be 100644 --- a/service/cloudtrail/validators.go +++ b/service/cloudtrail/validators.go @@ -210,6 +210,26 @@ func (m *validateOpGetEventSelectors) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpGetImport struct { +} + +func (*validateOpGetImport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetImport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetImportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetImportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetInsightSelectors struct { } @@ -290,6 +310,26 @@ func (m *validateOpGetTrailStatus) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpListImportFailures struct { +} + +func (*validateOpListImportFailures) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListImportFailures) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListImportFailuresInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListImportFailuresInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListQueries struct { } @@ -430,6 +470,26 @@ func (m *validateOpRestoreEventDataStore) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpStartImport struct { +} + +func (*validateOpStartImport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartImport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartImportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartImportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartLogging struct { } @@ -470,6 +530,26 @@ func (m *validateOpStartQuery) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpStopImport struct { +} + +func (*validateOpStopImport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopImport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopImportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopImportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStopLogging struct { } @@ -570,6 +650,10 @@ func addOpGetEventSelectorsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetEventSelectors{}, middleware.After) } +func addOpGetImportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetImport{}, middleware.After) +} + func addOpGetInsightSelectorsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetInsightSelectors{}, middleware.After) } @@ -586,6 +670,10 @@ func addOpGetTrailStatusValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTrailStatus{}, middleware.After) } +func addOpListImportFailuresValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListImportFailures{}, middleware.After) +} + func addOpListQueriesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListQueries{}, middleware.After) } @@ -614,6 +702,10 @@ func addOpRestoreEventDataStoreValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpRestoreEventDataStore{}, middleware.After) } +func addOpStartImportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartImport{}, middleware.After) +} + func addOpStartLoggingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartLogging{}, middleware.After) } @@ -622,6 +714,10 @@ func addOpStartQueryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartQuery{}, middleware.After) } +func addOpStopImportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopImport{}, middleware.After) +} + func addOpStopLoggingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopLogging{}, middleware.After) } @@ -702,6 +798,25 @@ func validateAdvancedFieldSelectors(v []types.AdvancedFieldSelector) error { } } +func validateImportSource(v *types.ImportSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImportSource"} + if v.S3 == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3")) + } else if v.S3 != nil { + if err := validateS3ImportSource(v.S3); err != nil { + invalidParams.AddNested("S3", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateLookupAttribute(v *types.LookupAttribute) error { if v == nil { return nil @@ -737,6 +852,27 @@ func validateLookupAttributesList(v []types.LookupAttribute) error { } } +func validateS3ImportSource(v *types.S3ImportSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3ImportSource"} + if v.S3LocationUri == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3LocationUri")) + } + if v.S3BucketRegion == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3BucketRegion")) + } + if v.S3BucketAccessRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3BucketAccessRoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -950,6 +1086,21 @@ func validateOpGetEventSelectorsInput(v *GetEventSelectorsInput) error { } } +func validateOpGetImportInput(v *GetImportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetImportInput"} + if v.ImportId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetInsightSelectorsInput(v *GetInsightSelectorsInput) error { if v == nil { return nil @@ -1013,6 +1164,21 @@ func validateOpGetTrailStatusInput(v *GetTrailStatusInput) error { } } +func validateOpListImportFailuresInput(v *ListImportFailuresInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListImportFailuresInput"} + if v.ImportId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListQueriesInput(v *ListQueriesInput) error { if v == nil { return nil @@ -1135,6 +1301,23 @@ func validateOpRestoreEventDataStoreInput(v *RestoreEventDataStoreInput) error { } } +func validateOpStartImportInput(v *StartImportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartImportInput"} + if v.ImportSource != nil { + if err := validateImportSource(v.ImportSource); err != nil { + invalidParams.AddNested("ImportSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartLoggingInput(v *StartLoggingInput) error { if v == nil { return nil @@ -1165,6 +1348,21 @@ func validateOpStartQueryInput(v *StartQueryInput) error { } } +func validateOpStopImportInput(v *StopImportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopImportInput"} + if v.ImportId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStopLoggingInput(v *StopLoggingInput) error { if v == nil { return nil diff --git a/service/ec2/api_op_DescribeInstances.go b/service/ec2/api_op_DescribeInstances.go index d8315cac468..7858516d936 100644 --- a/service/ec2/api_op_DescribeInstances.go +++ b/service/ec2/api_op_DescribeInstances.go @@ -32,11 +32,7 @@ import ( // rare case where an Availability Zone is experiencing a service disruption and // you specify instance IDs that are in the affected zone, or do not specify any // instance IDs at all, the call fails. If you describe instances and specify only -// instance IDs that are in an unaffected zone, the call works normally. We are -// retiring EC2-Classic on August 15, 2022. We recommend that you migrate from -// EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a -// VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in -// the Amazon EC2 User Guide. +// instance IDs that are in an unaffected zone, the call works normally. func (c *Client) DescribeInstances(ctx context.Context, params *DescribeInstancesInput, optFns ...func(*Options)) (*DescribeInstancesOutput, error) { if params == nil { params = &DescribeInstancesInput{} diff --git a/service/ec2/api_op_DescribeReservedInstances.go b/service/ec2/api_op_DescribeReservedInstances.go index eae249e5c6f..3506743c25e 100644 --- a/service/ec2/api_op_DescribeReservedInstances.go +++ b/service/ec2/api_op_DescribeReservedInstances.go @@ -14,11 +14,7 @@ import ( // Describes one or more of the Reserved Instances that you purchased. For more // information about Reserved Instances, see Reserved Instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) -// in the Amazon EC2 User Guide. We are retiring EC2-Classic on August 15, 2022. We -// recommend that you migrate from EC2-Classic to a VPC. For more information, see -// Migrate from EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. func (c *Client) DescribeReservedInstances(ctx context.Context, params *DescribeReservedInstancesInput, optFns ...func(*Options)) (*DescribeReservedInstancesOutput, error) { if params == nil { params = &DescribeReservedInstancesInput{} diff --git a/service/ec2/api_op_DescribeReservedInstancesModifications.go b/service/ec2/api_op_DescribeReservedInstancesModifications.go index 81737b49c55..e7ca28048e6 100644 --- a/service/ec2/api_op_DescribeReservedInstancesModifications.go +++ b/service/ec2/api_op_DescribeReservedInstancesModifications.go @@ -18,11 +18,7 @@ import ( // specific modification is returned. For more information, see Modifying Reserved // Instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) in the -// Amazon EC2 User Guide. We are retiring EC2-Classic on August 15, 2022. We -// recommend that you migrate from EC2-Classic to a VPC. For more information, see -// Migrate from EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon Elastic Compute Cloud User Guide. +// Amazon EC2 User Guide. func (c *Client) DescribeReservedInstancesModifications(ctx context.Context, params *DescribeReservedInstancesModificationsInput, optFns ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) { if params == nil { params = &DescribeReservedInstancesModificationsInput{} diff --git a/service/ec2/api_op_DescribeReservedInstancesOfferings.go b/service/ec2/api_op_DescribeReservedInstancesOfferings.go index 24ec995d6fd..e52eabdaff0 100644 --- a/service/ec2/api_op_DescribeReservedInstancesOfferings.go +++ b/service/ec2/api_op_DescribeReservedInstancesOfferings.go @@ -21,11 +21,7 @@ import ( // This is to ensure that you do not purchase your own Reserved Instances. For more // information, see Reserved Instance Marketplace // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) in -// the Amazon EC2 User Guide. We are retiring EC2-Classic on August 15, 2022. We -// recommend that you migrate from EC2-Classic to a VPC. For more information, see -// Migrate from EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon Elastic Compute Cloud User Guide. +// the Amazon EC2 User Guide. func (c *Client) DescribeReservedInstancesOfferings(ctx context.Context, params *DescribeReservedInstancesOfferingsInput, optFns ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error) { if params == nil { params = &DescribeReservedInstancesOfferingsInput{} diff --git a/service/ec2/api_op_DescribeScheduledInstanceAvailability.go b/service/ec2/api_op_DescribeScheduledInstanceAvailability.go index b0ea1132a1f..0c13269735a 100644 --- a/service/ec2/api_op_DescribeScheduledInstanceAvailability.go +++ b/service/ec2/api_op_DescribeScheduledInstanceAvailability.go @@ -18,11 +18,7 @@ import ( // daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the // minimum monthly schedule is 100 hours. After you find a schedule that meets your // needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that -// schedule. We are retiring EC2-Classic on August 15, 2022. We recommend that you -// migrate from EC2-Classic to a VPC. For more information, see Migrate from -// EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon Elastic Compute Cloud User Guide. +// schedule. func (c *Client) DescribeScheduledInstanceAvailability(ctx context.Context, params *DescribeScheduledInstanceAvailabilityInput, optFns ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error) { if params == nil { params = &DescribeScheduledInstanceAvailabilityInput{} diff --git a/service/ec2/api_op_DescribeScheduledInstances.go b/service/ec2/api_op_DescribeScheduledInstances.go index cb701615c02..e51c8c09015 100644 --- a/service/ec2/api_op_DescribeScheduledInstances.go +++ b/service/ec2/api_op_DescribeScheduledInstances.go @@ -12,11 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Describes the specified Scheduled Instances or all your Scheduled Instances. We -// are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from -// EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a -// VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in -// the Amazon Elastic Compute Cloud User Guide. +// Describes the specified Scheduled Instances or all your Scheduled Instances. func (c *Client) DescribeScheduledInstances(ctx context.Context, params *DescribeScheduledInstancesInput, optFns ...func(*Options)) (*DescribeScheduledInstancesOutput, error) { if params == nil { params = &DescribeScheduledInstancesInput{} diff --git a/service/ec2/api_op_ModifyInstanceMetadataOptions.go b/service/ec2/api_op_ModifyInstanceMetadataOptions.go index 2c662f063d2..00f9897cd67 100644 --- a/service/ec2/api_op_ModifyInstanceMetadataOptions.go +++ b/service/ec2/api_op_ModifyInstanceMetadataOptions.go @@ -65,13 +65,13 @@ type ModifyInstanceMetadataOptionsInput struct { // The state of token usage for your instance metadata requests. If the parameter // is not specified in the request, the default state is optional. If the state is - // optional, you can choose to retrieve instance metadata with or without a signed - // token header on your request. If you retrieve the IAM role credentials without a - // token, the version 1.0 role credentials are returned. If you retrieve the IAM - // role credentials using a valid signed token, the version 2.0 role credentials - // are returned. If the state is required, you must send a signed token header with - // any instance metadata retrieval requests. In this state, retrieving the IAM role - // credential always returns the version 2.0 credentials; the version 1.0 + // optional, you can choose to retrieve instance metadata with or without a session + // token on your request. If you retrieve the IAM role credentials without a token, + // the version 1.0 role credentials are returned. If you retrieve the IAM role + // credentials using a valid session token, the version 2.0 role credentials are + // returned. If the state is required, you must send a session token with any + // instance metadata retrieval requests. In this state, retrieving the IAM role + // credentials always returns the version 2.0 credentials; the version 1.0 // credentials are not available. HttpTokens types.HttpTokensState diff --git a/service/ec2/api_op_ModifyReservedInstances.go b/service/ec2/api_op_ModifyReservedInstances.go index 28d74ccb2b7..d6fe557e757 100644 --- a/service/ec2/api_op_ModifyReservedInstances.go +++ b/service/ec2/api_op_ModifyReservedInstances.go @@ -11,15 +11,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Modifies the Availability Zone, instance count, instance type, or network -// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved -// Instances to be modified must be identical, except for Availability Zone, -// network platform, and instance type. For more information, see Modifying -// Reserved Instances +// Modifies the configuration of your Reserved Instances, such as the Availability +// Zone, instance count, or instance type. The Reserved Instances to be modified +// must be identical, except for Availability Zone, network platform, and instance +// type. For more information, see Modifying Reserved Instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) in the -// Amazon EC2 User Guide. We are retiring EC2-Classic on August 15, 2022. We -// recommend that you migrate from EC2-Classic to a VPC. For more information, see -// Migrate from EC2-Classic to a VPC +// Amazon EC2 User Guide. We are retiring EC2-Classic. We recommend that you +// migrate from EC2-Classic to a VPC. For more information, see Migrate from +// EC2-Classic to a VPC // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the // Amazon Elastic Compute Cloud User Guide. func (c *Client) ModifyReservedInstances(ctx context.Context, params *ModifyReservedInstancesInput, optFns ...func(*Options)) (*ModifyReservedInstancesOutput, error) { diff --git a/service/ec2/api_op_PurchaseReservedInstancesOffering.go b/service/ec2/api_op_PurchaseReservedInstancesOffering.go index 02c4c0c09a1..d667a6d1745 100644 --- a/service/ec2/api_op_PurchaseReservedInstancesOffering.go +++ b/service/ec2/api_op_PurchaseReservedInstancesOffering.go @@ -23,7 +23,11 @@ import ( // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) // and Reserved Instance Marketplace // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) in -// the Amazon EC2 User Guide. +// the Amazon EC2 User Guide. We are retiring EC2-Classic. We recommend that you +// migrate from EC2-Classic to a VPC. For more information, see Migrate from +// EC2-Classic to a VPC +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the +// Amazon Elastic Compute Cloud User Guide. func (c *Client) PurchaseReservedInstancesOffering(ctx context.Context, params *PurchaseReservedInstancesOfferingInput, optFns ...func(*Options)) (*PurchaseReservedInstancesOfferingOutput, error) { if params == nil { params = &PurchaseReservedInstancesOfferingInput{} diff --git a/service/ec2/api_op_PurchaseScheduledInstances.go b/service/ec2/api_op_PurchaseScheduledInstances.go index 3e4ebb7398f..5959b2a65f7 100644 --- a/service/ec2/api_op_PurchaseScheduledInstances.go +++ b/service/ec2/api_op_PurchaseScheduledInstances.go @@ -12,9 +12,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Purchases the Scheduled Instances with the specified schedule. Scheduled -// Instances enable you to purchase Amazon EC2 compute capacity by the hour for a -// one-year term. Before you can purchase a Scheduled Instance, you must call +// You can no longer purchase Scheduled Instances. Purchases the Scheduled +// Instances with the specified schedule. Scheduled Instances enable you to +// purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you +// can purchase a Scheduled Instance, you must call // DescribeScheduledInstanceAvailability to check for available schedules and // obtain a purchase token. After you purchase a Scheduled Instance, you must call // RunScheduledInstances during each scheduled time period. After you purchase a diff --git a/service/ec2/api_op_RequestSpotInstances.go b/service/ec2/api_op_RequestSpotInstances.go index 1d945dc0ce3..3514b37f4b8 100644 --- a/service/ec2/api_op_RequestSpotInstances.go +++ b/service/ec2/api_op_RequestSpotInstances.go @@ -20,9 +20,9 @@ import ( // For options for requesting Spot Instances, see Which is the best Spot request // method to use? // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) -// in the Amazon EC2 User Guide for Linux Instances. We are retiring EC2-Classic on -// August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For -// more information, see Migrate from EC2-Classic to a VPC +// in the Amazon EC2 User Guide for Linux Instances. We are retiring EC2-Classic. +// We recommend that you migrate from EC2-Classic to a VPC. For more information, +// see Migrate from EC2-Classic to a VPC // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the // Amazon EC2 User Guide for Linux Instances. func (c *Client) RequestSpotInstances(ctx context.Context, params *RequestSpotInstancesInput, optFns ...func(*Options)) (*RequestSpotInstancesOutput, error) { diff --git a/service/ec2/api_op_RunInstances.go b/service/ec2/api_op_RunInstances.go index 4ea2de78ef6..21018af6ce7 100644 --- a/service/ec2/api_op_RunInstances.go +++ b/service/ec2/api_op_RunInstances.go @@ -68,10 +68,10 @@ import ( // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html), // and Troubleshooting connecting to your instance // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html). -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to -// a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in -// the Amazon EC2 User Guide. +// We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a +// VPC. For more information, see Migrate from EC2-Classic to a VPC +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the +// Amazon EC2 User Guide. func (c *Client) RunInstances(ctx context.Context, params *RunInstancesInput, optFns ...func(*Options)) (*RunInstancesOutput, error) { if params == nil { params = &RunInstancesInput{} @@ -360,11 +360,7 @@ type RunInstancesInput struct { // Describes a launch request for one or more instances, and includes owner, // requester, and security group information that applies to all instances in the -// launch request. We are retiring EC2-Classic on August 15, 2022. We recommend -// that you migrate from EC2-Classic to a VPC. For more information, see Migrate -// from EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon EC2 User Guide. +// launch request. type RunInstancesOutput struct { // [EC2-Classic only] The security groups. diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index bb307c79c88..8d8dfb27e19 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -53489,6 +53489,140 @@ func awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessSetUnwrapped(v *v = sv return nil } +func awsEc2query_deserializeDocumentCapacityAllocation(v **types.CapacityAllocation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.CapacityAllocation + if *v == nil { + sv = &types.CapacityAllocation{} + } 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("allocationType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.AllocationType = types.AllocationType(xtv) + } + + case strings.EqualFold("count", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Count = ptr.Int32(int32(i64)) + } + + 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_deserializeDocumentCapacityAllocations(v *[]types.CapacityAllocation, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.CapacityAllocation + if *v == nil { + sv = make([]types.CapacityAllocation, 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.CapacityAllocation + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentCapacityAllocation(&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_deserializeDocumentCapacityAllocationsUnwrapped(v *[]types.CapacityAllocation, decoder smithyxml.NodeDecoder) error { + var sv []types.CapacityAllocation + if *v == nil { + sv = make([]types.CapacityAllocation, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.CapacityAllocation + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentCapacityAllocation(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentCapacityReservation(v **types.CapacityReservation, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -53554,6 +53688,12 @@ func awsEc2query_deserializeDocumentCapacityReservation(v **types.CapacityReserv sv.AvailableInstanceCount = ptr.Int32(int32(i64)) } + case strings.EqualFold("capacityAllocationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentCapacityAllocations(&sv.CapacityAllocations, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("capacityReservationArn", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 84e5c731fdf..98301b9ab88 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -216,6 +216,22 @@ func (AllocationStrategy) Values() []AllocationStrategy { } } +type AllocationType string + +// Enum values for AllocationType +const ( + AllocationTypeUsed AllocationType = "used" +) + +// 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{ + "used", + } +} + type AllowsMultipleInstanceTypes string // Enum values for AllowsMultipleInstanceTypes diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index c97ee03e4f3..58c81b0d824 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -871,6 +871,20 @@ type CancelSpotFleetRequestsSuccessItem struct { noSmithyDocumentSerde } +// Information about instance capacity usage for a Capacity Reservation. +type CapacityAllocation struct { + + // The usage type. used indicates that the instance capacity is in use by instances + // that are running in the Capacity Reservation. + AllocationType AllocationType + + // The amount of instance capacity associated with the usage. For example a value + // of 4 indicates that instance capacity for 4 instances is currently in use. + Count *int32 + + noSmithyDocumentSerde +} + // Describes a Capacity Reservation. type CapacityReservation struct { @@ -884,6 +898,9 @@ type CapacityReservation struct { // in the Capacity Reservation. AvailableInstanceCount *int32 + // Information about instance capacity usage. + CapacityAllocations []CapacityAllocation + // The Amazon Resource Name (ARN) of the Capacity Reservation. CapacityReservationArn *string @@ -3839,10 +3856,10 @@ type FleetLaunchTemplateOverrides struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with those attributes. If you specify - // InstanceRequirements, you can't specify InstanceTypes. + // InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirements - // The instance type. If you specify InstanceTypes, you can't specify + // The instance type. If you specify InstanceType, you can't specify // InstanceRequirements. InstanceType InstanceType @@ -3885,10 +3902,10 @@ type FleetLaunchTemplateOverridesRequest struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with those attributes. If you specify - // InstanceRequirements, you can't specify InstanceTypes. + // InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirementsRequest - // The instance type. If you specify InstanceTypes, you can't specify + // The instance type. If you specify InstanceType, you can't specify // InstanceRequirements. InstanceType InstanceType @@ -5588,12 +5605,12 @@ type InstanceMetadataOptionsRequest struct { HttpPutResponseHopLimit *int32 // The state of token usage for your instance metadata requests. If the state is - // optional, you can choose to retrieve instance metadata with or without a signed - // token header on your request. If you retrieve the IAM role credentials without a - // token, the version 1.0 role credentials are returned. If you retrieve the IAM - // role credentials using a valid signed token, the version 2.0 role credentials - // are returned. If the state is required, you must send a signed token header with - // any instance metadata retrieval requests. In this state, retrieving the IAM role + // optional, you can choose to retrieve instance metadata with or without a session + // token on your request. If you retrieve the IAM role credentials without a token, + // the version 1.0 role credentials are returned. If you retrieve the IAM role + // credentials using a valid session token, the version 2.0 role credentials are + // returned. If the state is required, you must send a session token with any + // instance metadata retrieval requests. In this state, retrieving the IAM role // credentials always returns the version 2.0 credentials; the version 1.0 // credentials are not available. Default: optional HttpTokens HttpTokensState @@ -5625,13 +5642,13 @@ type InstanceMetadataOptionsResponse struct { HttpPutResponseHopLimit *int32 // The state of token usage for your instance metadata requests. If the state is - // optional, you can choose to retrieve instance metadata with or without a signed - // token header on your request. If you retrieve the IAM role credentials without a - // token, the version 1.0 role credentials are returned. If you retrieve the IAM - // role credentials using a valid signed token, the version 2.0 role credentials - // are returned. If the state is required, you must send a signed token header with - // any instance metadata retrieval requests. In this state, retrieving the IAM role - // credential always returns the version 2.0 credentials; the version 1.0 + // optional, you can choose to retrieve instance metadata with or without a session + // token on your request. If you retrieve the IAM role credentials without a token, + // the version 1.0 role credentials are returned. If you retrieve the IAM role + // credentials using a valid session token, the version 2.0 role credentials are + // returned. If the state is required, you must send a session token with any + // instance metadata retrieval requests. In this state, retrieving the IAM role + // credentials always returns the version 2.0 credentials; the version 1.0 // credentials are not available. Default: optional HttpTokens HttpTokensState @@ -5902,10 +5919,10 @@ type InstancePrivateIpAddress struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with these attributes. When you specify -// multiple parameters, you get instance types that satisfy all of the specified -// parameters. If you specify multiple values for a parameter, you get instance +// multiple attributes, you get instance types that satisfy all of the specified +// attributes. If you specify multiple values for an attribute, you get instance // types that satisfy any of the specified values. You must specify VCpuCount and -// MemoryMiB. All other parameters are optional. Any unspecified optional parameter +// MemoryMiB. All other attributes are optional. Any unspecified optional attribute // is set to its default. For more information, see Attribute-based instance type // selection for EC2 Fleet // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html), @@ -5960,6 +5977,12 @@ type InstanceRequirements struct { // * For instance types with Xilinx VU9P FPGAs, // specify vu9p. // + // * For instance types with Amazon Web Services Inferentia GPUs, + // specify inferentia. + // + // * For instance types with NVIDIA GRID K520 GPUs, specify + // k520. + // // Default: Any accelerator AcceleratorNames []AcceleratorName @@ -6141,10 +6164,10 @@ type InstanceRequirements struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with these attributes. When you specify -// multiple parameters, you get instance types that satisfy all of the specified -// parameters. If you specify multiple values for a parameter, you get instance +// multiple attributes, you get instance types that satisfy all of the specified +// attributes. If you specify multiple values for an attribute, you get instance // types that satisfy any of the specified values. You must specify VCpuCount and -// MemoryMiB. All other parameters are optional. Any unspecified optional parameter +// MemoryMiB. All other attributes are optional. Any unspecified optional attribute // is set to its default. For more information, see Attribute-based instance type // selection for EC2 Fleet // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html), @@ -6209,6 +6232,12 @@ type InstanceRequirementsRequest struct { // * For instance types with Xilinx VU9P FPGAs, // specify vu9p. // + // * For instance types with Amazon Web Services Inferentia GPUs, + // specify inferentia. + // + // * For instance types with NVIDIA GRID K520 GPUs, specify + // k520. + // // Default: Any accelerator AcceleratorNames []AcceleratorName @@ -7460,11 +7489,7 @@ type LaunchPermissionModifications struct { noSmithyDocumentSerde } -// Describes the launch specification for an instance. We are retiring EC2-Classic -// on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For -// more information, see Migrate from EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon EC2 User Guide for Linux Instances. +// Describes the launch specification for an instance. type LaunchSpecification struct { // Deprecated. @@ -8199,7 +8224,7 @@ type LaunchTemplateOverrides struct { // will identify instance types with the provided requirements, and then use your // On-Demand and Spot allocation strategies to launch instances from these instance // types, in the same way as when you specify a list of instance types. If you - // specify InstanceRequirements, you can't specify InstanceTypes. + // specify InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirements // The instance type. @@ -10909,7 +10934,7 @@ type RequestLaunchTemplateData struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with these attributes. If you specify - // InstanceRequirements, you can't specify InstanceTypes. + // InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirementsRequest // The instance type. For more information, see Instance types @@ -11083,11 +11108,7 @@ type RequestSpotLaunchSpecification struct { // Describes a launch request for one or more instances, and includes owner, // requester, and security group information that applies to all instances in the -// launch request. We are retiring EC2-Classic on August 15, 2022. We recommend -// that you migrate from EC2-Classic to a VPC. For more information, see Migrate -// from EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon EC2 User Guide. +// launch request. type Reservation struct { // [EC2-Classic only] The security groups. @@ -11261,11 +11282,7 @@ type ReservedInstances struct { noSmithyDocumentSerde } -// Describes the configuration settings for the modified Reserved Instances. We are -// retiring EC2-Classic on August 15, 2022. We recommend that you migrate from -// EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a -// VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in -// the Amazon Elastic Compute Cloud User Guide. +// Describes the configuration settings for the modified Reserved Instances. type ReservedInstancesConfiguration struct { // The Availability Zone for the modified Reserved Instances. @@ -11785,11 +11802,7 @@ type S3Storage struct { noSmithyDocumentSerde } -// Describes a Scheduled Instance. We are retiring EC2-Classic on August 15, 2022. -// We recommend that you migrate from EC2-Classic to a VPC. For more information, -// see Migrate from EC2-Classic to a VPC -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the -// Amazon Elastic Compute Cloud User Guide. +// Describes a Scheduled Instance. type ScheduledInstance struct { // The Availability Zone. @@ -11840,11 +11853,7 @@ type ScheduledInstance struct { noSmithyDocumentSerde } -// Describes a schedule that is available for your Scheduled Instances. We are -// retiring EC2-Classic on August 15, 2022. We recommend that you migrate from -// EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a -// VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in -// the Amazon Elastic Compute Cloud User Guide. +// Describes a schedule that is available for your Scheduled Instances. type ScheduledInstanceAvailability struct { // The Availability Zone. @@ -12836,10 +12845,6 @@ type SpotDatafeedSubscription struct { // network device, you can't use SpotFleetLaunchSpecification; you must use // LaunchTemplateConfig // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html). -// We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate -// from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to -// a VPC (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in -// the Amazon EC2 User Guide for Linux Instances. type SpotFleetLaunchSpecification struct { // Deprecated. @@ -12867,7 +12872,7 @@ type SpotFleetLaunchSpecification struct { // The attributes for the instance types. When you specify instance attributes, // Amazon EC2 will identify instance types with those attributes. If you specify - // InstanceRequirements, you can't specify InstanceTypes. + // InstanceRequirements, you can't specify InstanceType. InstanceRequirements *InstanceRequirements // The instance type. @@ -12995,22 +13000,29 @@ type SpotFleetRequestConfigData struct { // This member is required. TargetCapacity *int32 - // Indicates how to allocate the target Spot Instance capacity across the Spot - // Instance pools specified by the Spot Fleet request. If the allocation strategy - // is lowestPrice, Spot Fleet launches instances from the Spot Instance pools with - // the lowest price. This is the default allocation strategy. If the allocation - // strategy is diversified, Spot Fleet launches instances from all the Spot - // Instance pools that you specify. If the allocation strategy is capacityOptimized - // (recommended), Spot Fleet launches instances from Spot Instance pools with - // optimal capacity for the number of instances that are launching. To give certain - // instance types a higher chance of launching first, use - // capacityOptimizedPrioritized. Set a priority for each instance type by using the - // Priority parameter for LaunchTemplateOverrides. You can assign the same priority - // to different LaunchTemplateOverrides. EC2 implements the priorities on a - // best-effort basis, but optimizes for capacity first. - // capacityOptimizedPrioritized is supported only if your Spot Fleet uses a launch - // template. Note that if the OnDemandAllocationStrategy is set to prioritized, the - // same priority is applied when fulfilling On-Demand capacity. + // The strategy that determines how to allocate the target Spot Instance capacity + // across the Spot Instance pools specified by the Spot Fleet launch configuration. + // For more information, see Allocation strategies for Spot Instances + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html) + // in the Amazon EC2 User Guide for Linux Instances. lowestPrice - Spot Fleet + // launches instances from the lowest-price Spot Instance pool that has available + // capacity. If the cheapest pool doesn't have available capacity, the Spot + // Instances come from the next cheapest pool that has available capacity. If a + // pool runs out of capacity before fulfilling your desired capacity, Spot Fleet + // will continue to fulfill your request by drawing from the next cheapest pool. To + // ensure that your desired capacity is met, you might receive Spot Instances from + // several pools. diversified - Spot Fleet launches instances from all of the Spot + // Instance pools that you specify. capacityOptimized (recommended) - Spot Fleet + // launches instances from Spot Instance pools with optimal capacity for the number + // of instances that are launching. To give certain instance types a higher chance + // of launching first, use capacityOptimizedPrioritized. Set a priority for each + // instance type by using the Priority parameter for LaunchTemplateOverrides. You + // can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacityOptimizedPrioritized is supported only if your Spot Fleet uses a + // launch template. Note that if the OnDemandAllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. + // Default: lowestPrice AllocationStrategy AllocationStrategy // A unique, case-sensitive identifier that you provide to ensure the idempotency @@ -13344,8 +13356,16 @@ type SpotMarketOptions struct { type SpotOptions struct { // The strategy that determines how to allocate the target Spot Instance capacity - // across the Spot Instance pools specified by the EC2 Fleet. lowest-price - EC2 - // Fleet launches instances from the Spot Instance pools with the lowest price. + // across the Spot Instance pools specified by the EC2 Fleet launch configuration. + // For more information, see Allocation strategies for Spot Instances + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) + // in the Amazon EC2 User Guide. lowest-price - EC2 Fleet launches instances from + // the lowest-price Spot Instance pool that has available capacity. If the cheapest + // pool doesn't have available capacity, the Spot Instances come from the next + // cheapest pool that has available capacity. If a pool runs out of capacity before + // fulfilling your desired capacity, EC2 Fleet will continue to fulfill your + // request by drawing from the next cheapest pool. To ensure that your desired + // capacity is met, you might receive Spot Instances from several pools. // diversified - EC2 Fleet launches instances from all of the Spot Instance pools // that you specify. capacity-optimized (recommended) - EC2 Fleet launches // instances from Spot Instance pools with optimal capacity for the number of @@ -13408,8 +13428,16 @@ type SpotOptions struct { type SpotOptionsRequest struct { // The strategy that determines how to allocate the target Spot Instance capacity - // across the Spot Instance pools specified by the EC2 Fleet. lowest-price - EC2 - // Fleet launches instances from the Spot Instance pools with the lowest price. + // across the Spot Instance pools specified by the EC2 Fleet launch configuration. + // For more information, see Allocation strategies for Spot Instances + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) + // in the Amazon EC2 User Guide. lowest-price - EC2 Fleet launches instances from + // the lowest-price Spot Instance pool that has available capacity. If the cheapest + // pool doesn't have available capacity, the Spot Instances come from the next + // cheapest pool that has available capacity. If a pool runs out of capacity before + // fulfilling your desired capacity, EC2 Fleet will continue to fulfill your + // request by drawing from the next cheapest pool. To ensure that your desired + // capacity is met, you might receive Spot Instances from several pools. // diversified - EC2 Fleet launches instances from all of the Spot Instance pools // that you specify. capacity-optimized (recommended) - EC2 Fleet launches // instances from Spot Instance pools with optimal capacity for the number of diff --git a/service/fsx/internal/endpoints/endpoints.go b/service/fsx/internal/endpoints/endpoints.go index c1b2d8f29ce..707312c1532 100644 --- a/service/fsx/internal/endpoints/endpoints.go +++ b/service/fsx/internal/endpoints/endpoints.go @@ -135,24 +135,9 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "af-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-east-1", - }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-south-1", - }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -171,21 +156,12 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-south-1", - }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-3", - }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "fips-ca-central-1", }: endpoints.Endpoint{ @@ -222,15 +198,6 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, - endpoints.EndpointKey{ - Region: "fips-prod-us-west-1", - }: endpoints.Endpoint{ - Hostname: "fsx-fips.us-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "fips-prod-us-west-2", }: endpoints.Endpoint{ @@ -258,15 +225,6 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, - endpoints.EndpointKey{ - Region: "fips-us-west-1", - }: endpoints.Endpoint{ - Hostname: "fsx-fips.us-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "fips-us-west-2", }: endpoints.Endpoint{ @@ -276,9 +234,6 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, - endpoints.EndpointKey{ - Region: "me-south-1", - }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "prod-ca-central-1", }: endpoints.Endpoint{ @@ -333,24 +288,6 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, - endpoints.EndpointKey{ - Region: "prod-us-west-1", - }: endpoints.Endpoint{ - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "prod-us-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "fsx-fips.us-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "prod-us-west-2", }: endpoints.Endpoint{ @@ -369,9 +306,6 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, - endpoints.EndpointKey{ - Region: "sa-east-1", - }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, @@ -390,15 +324,6 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "fsx-fips.us-east-2.amazonaws.com", }, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "fsx-fips.us-west-1.amazonaws.com", - }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, diff --git a/service/mediaconnect/api_op_UpdateFlowSource.go b/service/mediaconnect/api_op_UpdateFlowSource.go index ce7335491e7..efee6443c81 100644 --- a/service/mediaconnect/api_op_UpdateFlowSource.go +++ b/service/mediaconnect/api_op_UpdateFlowSource.go @@ -87,6 +87,12 @@ type UpdateFlowSourceInput struct { // sender. SenderIpAddress *string + // Source IP or domain name for SRT-caller protocol. + SourceListenerAddress *string + + // Source port for SRT-caller protocol. + SourceListenerPort int32 + // The stream ID that you want to use for this transport. This parameter applies // only to Zixi-based streams. StreamId *string diff --git a/service/mediaconnect/deserializers.go b/service/mediaconnect/deserializers.go index 0d96f913422..515897a99cb 100644 --- a/service/mediaconnect/deserializers.go +++ b/service/mediaconnect/deserializers.go @@ -8166,6 +8166,28 @@ func awsRestjson1_deserializeDocumentTransport(v **types.Transport, value interf sv.SmoothingLatency = int32(i64) } + case "sourceListenerAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SourceListenerAddress = ptr.String(jtv) + } + + case "sourceListenerPort": + 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.SourceListenerPort = int32(i64) + } + case "streamId": if value != nil { jtv, ok := value.(string) diff --git a/service/mediaconnect/serializers.go b/service/mediaconnect/serializers.go index ef9a0a77d15..fb06ed38d03 100644 --- a/service/mediaconnect/serializers.go +++ b/service/mediaconnect/serializers.go @@ -2386,6 +2386,16 @@ func awsRestjson1_serializeOpDocumentUpdateFlowSourceInput(v *UpdateFlowSourceIn ok.String(*v.SenderIpAddress) } + if v.SourceListenerAddress != nil { + ok := object.Key("sourceListenerAddress") + ok.String(*v.SourceListenerAddress) + } + + if v.SourceListenerPort != 0 { + ok := object.Key("sourceListenerPort") + ok.Integer(v.SourceListenerPort) + } + if v.StreamId != nil { ok := object.Key("streamId") ok.String(*v.StreamId) @@ -3090,6 +3100,16 @@ func awsRestjson1_serializeDocumentSetSourceRequest(v *types.SetSourceRequest, v ok.String(*v.SenderIpAddress) } + if v.SourceListenerAddress != nil { + ok := object.Key("sourceListenerAddress") + ok.String(*v.SourceListenerAddress) + } + + if v.SourceListenerPort != 0 { + ok := object.Key("sourceListenerPort") + ok.Integer(v.SourceListenerPort) + } + if v.StreamId != nil { ok := object.Key("streamId") ok.String(*v.StreamId) diff --git a/service/mediaconnect/types/enums.go b/service/mediaconnect/types/enums.go index ce508e10fd7..60e6abd31c0 100644 --- a/service/mediaconnect/types/enums.go +++ b/service/mediaconnect/types/enums.go @@ -256,6 +256,7 @@ const ( ProtocolSt2110Jpegxs Protocol = "st2110-jpegxs" ProtocolCdi Protocol = "cdi" ProtocolSrtListener Protocol = "srt-listener" + ProtocolSrtCaller Protocol = "srt-caller" ProtocolFujitsuQos Protocol = "fujitsu-qos" ) @@ -272,6 +273,7 @@ func (Protocol) Values() []Protocol { "st2110-jpegxs", "cdi", "srt-listener", + "srt-caller", "fujitsu-qos", } } diff --git a/service/mediaconnect/types/types.go b/service/mediaconnect/types/types.go index 28d745b750e..7d5e07f2955 100644 --- a/service/mediaconnect/types/types.go +++ b/service/mediaconnect/types/types.go @@ -1073,6 +1073,12 @@ type SetSourceRequest struct { // sender. SenderIpAddress *string + // Source IP or domain name for SRT-caller protocol. + SourceListenerAddress *string + + // Source port for SRT-caller protocol. + SourceListenerPort int32 + // The stream ID that you want to use for this transport. This parameter applies // only to Zixi-based streams. StreamId *string @@ -1202,6 +1208,12 @@ type Transport struct { // The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams. SmoothingLatency int32 + // Source IP or domain name for SRT-caller protocol. + SourceListenerAddress *string + + // Source port for SRT-caller protocol. + SourceListenerPort int32 + // The stream ID that you want to use for this transport. This parameter applies // only to Zixi-based streams. StreamId *string diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index 2d45e47f9b7..7b90a001609 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -121,7 +121,7 @@ type CreateDBClusterInput struct { CopyTagsToSnapshot *bool // The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, - // for example db.m6g.xlarge. Not all DB instance classes are available in all + // for example db.m6gd.xlarge. Not all DB instance classes are available in all // Amazon Web Services Regions, or for all database engines. For the full list of // DB instance classes and availability for your engine, see DB instance class // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index b10ad790c7b..6d58a27ddc4 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -363,11 +363,11 @@ type CreateDBInstanceInput struct { // * It must contain 1 to 63 alphanumeric // characters. // - // * It must begin with a letter or an underscore. Subsequent - // characters can be letters, underscores, or digits (0 to 9). + // * It must begin with a letter. Subsequent characters can be + // letters, underscores, or digits (0 to 9). // - // * It can't be a - // word reserved by the database engine. + // * It can't be a word reserved by the + // database engine. DBName *string // The name of the DB parameter group to associate with this DB instance. If you do @@ -375,13 +375,13 @@ type CreateDBInstanceInput struct { // engine and version is used. This setting doesn't apply to RDS Custom. // Constraints: // - // * Must be 1 to 255 letters, numbers, or hyphens. + // * It must be 1 to 255 letters, numbers, or hyphens. // - // * First - // character must be a letter + // * The first + // character must be a letter. // - // * Can't end with a hyphen or contain two consecutive - // hyphens + // * It can't end with a hyphen or contain two + // consecutive hyphens. DBParameterGroupName *string // A list of DB security groups to associate with this DB instance. This setting diff --git a/service/rds/api_op_CreateDBProxy.go b/service/rds/api_op_CreateDBProxy.go index 700d44d0150..8df879f0944 100644 --- a/service/rds/api_op_CreateDBProxy.go +++ b/service/rds/api_op_CreateDBProxy.go @@ -46,7 +46,8 @@ type CreateDBProxyInput struct { // which database network protocol the proxy recognizes when it interprets network // traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for // MySQL databases, specify MYSQL. For Aurora PostgreSQL and RDS for PostgreSQL - // databases, specify POSTGRESQL. + // databases, specify POSTGRESQL. For RDS for Microsoft SQL Server, specify + // SQLSERVER. // // This member is required. EngineFamily types.EngineFamily diff --git a/service/rds/api_op_CreateDBProxyEndpoint.go b/service/rds/api_op_CreateDBProxyEndpoint.go index dd08f80dbb8..51994b89c0b 100644 --- a/service/rds/api_op_CreateDBProxyEndpoint.go +++ b/service/rds/api_op_CreateDBProxyEndpoint.go @@ -54,7 +54,8 @@ type CreateDBProxyEndpointInput struct { Tags []types.Tag // A value that indicates whether the DB proxy endpoint can be used for read/write - // or read-only operations. The default is READ_WRITE. + // or read-only operations. The default is READ_WRITE. The only role that proxies + // for RDS for Microsoft SQL Server support is READ_WRITE. TargetRole types.DBProxyEndpointTargetRole // The VPC security group IDs for the DB proxy endpoint that you create. You can diff --git a/service/rds/api_op_DescribeSourceRegions.go b/service/rds/api_op_DescribeSourceRegions.go index 018e89dd323..be3c7700a3f 100644 --- a/service/rds/api_op_DescribeSourceRegions.go +++ b/service/rds/api_op_DescribeSourceRegions.go @@ -14,7 +14,13 @@ import ( // Returns a list of the source Amazon Web Services Regions where the current // Amazon Web Services Region can create a read replica, copy a DB snapshot from, -// or replicate automated backups from. This API action supports pagination. +// or replicate automated backups from. Use this operation to determine whether +// cross-Region features are supported between other Regions and your current +// Region. This operation supports pagination. To return information about the +// Regions that are enabled for your account, or all Regions, use the EC2 operation +// DescribeRegions. For more information, see DescribeRegions +// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeRegions.html) +// in the Amazon EC2 API Reference. func (c *Client) DescribeSourceRegions(ctx context.Context, params *DescribeSourceRegionsInput, optFns ...func(*Options)) (*DescribeSourceRegionsOutput, error) { if params == nil { params = &DescribeSourceRegionsInput{} diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index 7648a3ee354..f9b4c73bc19 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -113,7 +113,7 @@ type ModifyDBClusterInput struct { CopyTagsToSnapshot *bool // The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, - // for example db.m6g.xlarge. Not all DB instance classes are available in all + // for example db.m6gd.xlarge. Not all DB instance classes are available in all // Amazon Web Services Regions, or for all database engines. For the full list of // DB instance classes and availability for your engine, see DB Instance Class // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) diff --git a/service/rds/api_op_RestoreDBClusterFromSnapshot.go b/service/rds/api_op_RestoreDBClusterFromSnapshot.go index 8b4f3b76332..fb69e519cdb 100644 --- a/service/rds/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/rds/api_op_RestoreDBClusterFromSnapshot.go @@ -100,9 +100,10 @@ type RestoreDBClusterFromSnapshotInput struct { CopyTagsToSnapshot *bool // The compute and memory capacity of the each DB instance in the Multi-AZ DB - // cluster, for example db.m6g.xlarge. Not all DB instance classes are available in - // all Amazon Web Services Regions, or for all database engines. For the full list - // of DB instance classes, and availability for your engine, see DB Instance Class + // cluster, for example db.m6gd.xlarge. Not all DB instance classes are available + // in all Amazon Web Services Regions, or for all database engines. For the full + // list of DB instance classes, and availability for your engine, see DB Instance + // Class // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) // in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only DBClusterInstanceClass *string diff --git a/service/rds/api_op_RestoreDBClusterToPointInTime.go b/service/rds/api_op_RestoreDBClusterToPointInTime.go index 4a4fce7be30..101546f8f13 100644 --- a/service/rds/api_op_RestoreDBClusterToPointInTime.go +++ b/service/rds/api_op_RestoreDBClusterToPointInTime.go @@ -88,9 +88,10 @@ type RestoreDBClusterToPointInTimeInput struct { CopyTagsToSnapshot *bool // The compute and memory capacity of the each DB instance in the Multi-AZ DB - // cluster, for example db.m6g.xlarge. Not all DB instance classes are available in - // all Amazon Web Services Regions, or for all database engines. For the full list - // of DB instance classes, and availability for your engine, see DB instance class + // cluster, for example db.m6gd.xlarge. Not all DB instance classes are available + // in all Amazon Web Services Regions, or for all database engines. For the full + // list of DB instance classes, and availability for your engine, see DB instance + // class // (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) // in the Amazon RDS User Guide. Valid for: Multi-AZ DB clusters only DBClusterInstanceClass *string diff --git a/service/rds/types/enums.go b/service/rds/types/enums.go index bd399fad553..8db237132b5 100644 --- a/service/rds/types/enums.go +++ b/service/rds/types/enums.go @@ -236,6 +236,7 @@ type EngineFamily string const ( EngineFamilyMysql EngineFamily = "MYSQL" EngineFamilyPostgresql EngineFamily = "POSTGRESQL" + EngineFamilySqlserver EngineFamily = "SQLSERVER" ) // Values returns all known values for EngineFamily. Note that this can be expanded @@ -245,6 +246,7 @@ func (EngineFamily) Values() []EngineFamily { return []EngineFamily{ "MYSQL", "POSTGRESQL", + "SQLSERVER", } } @@ -274,6 +276,7 @@ type IAMAuthMode string const ( IAMAuthModeDisabled IAMAuthMode = "DISABLED" IAMAuthModeRequired IAMAuthMode = "REQUIRED" + IAMAuthModeEnabled IAMAuthMode = "ENABLED" ) // Values returns all known values for IAMAuthMode. Note that this can be expanded @@ -283,6 +286,7 @@ func (IAMAuthMode) Values() []IAMAuthMode { return []IAMAuthMode{ "DISABLED", "REQUIRED", + "ENABLED", } } diff --git a/service/rds/types/types.go b/service/rds/types/types.go index 050845e6646..8c67993e395 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -251,8 +251,9 @@ type ConnectionPoolConfiguration struct { // The maximum size of the connection pool for each target in a target group. The // value is expressed as a percentage of the max_connections setting for the RDS DB - // instance or Aurora DB cluster used by the target group. Default: 100 - // Constraints: between 1 and 100 + // instance or Aurora DB cluster used by the target group. Default: 10 for RDS for + // Microsoft SQL Server, and 100 for all other engines Constraints: Must be between + // 1 and 100. MaxConnectionsPercent *int32 // Controls how actively the proxy closes idle database connections in the @@ -260,8 +261,12 @@ type ConnectionPoolConfiguration struct { // setting for the RDS DB instance or Aurora DB cluster used by the target group. // With a high value, the proxy leaves a high percentage of idle database // connections open. A low value causes the proxy to close more idle connections - // and return them to the database. Default: 50 Constraints: between 0 and - // MaxConnectionsPercent + // and return them to the database. Default: The default value is half of the value + // of MaxConnectionsPercent. For example, if MaxConnectionsPercent is 80, then the + // default value of MaxIdleConnectionsPercent is 40. If the value of + // MaxConnectionsPercent isn't specified, then for SQL Server, + // MaxIdleConnectionsPercent is 5, and for all other engines, the default is 50. + // Constraints: Must be between 0 and the value of MaxConnectionsPercent. MaxIdleConnectionsPercent *int32 // Each item in the list represents a class of SQL operations that normally cause @@ -306,8 +311,9 @@ type ConnectionPoolConfigurationInfo struct { // Each item in the list represents a class of SQL operations that normally cause // all later statements in a session using a proxy to be pinned to the same // underlying database connection. Including an item in the list exempts that class - // of SQL operations from the pinning behavior. Currently, the only allowed value - // is EXCLUDE_VARIABLE_SETS. + // of SQL operations from the pinning behavior. This setting is only supported for + // MySQL engine family databases. Currently, the only allowed value is + // EXCLUDE_VARIABLE_SETS. SessionPinningFilters []string noSmithyDocumentSerde @@ -1747,7 +1753,7 @@ type DBProxy struct { // which database network protocol the proxy recognizes when it interprets network // traffic to and from the database. MYSQL supports Aurora MySQL, RDS for MariaDB, // and RDS for MySQL databases. POSTGRESQL supports Aurora PostgreSQL and RDS for - // PostgreSQL databases. + // PostgreSQL databases. SQLSERVER supports RDS for Microsoft SQL Server databases. EngineFamily *string // The number of seconds a connection to the proxy can have no activity before the @@ -3641,7 +3647,8 @@ type UserAuthConfig struct { Description *string // Whether to require or disallow Amazon Web Services Identity and Access - // Management (IAM) authentication for connections to the proxy. + // Management (IAM) authentication for connections to the proxy. The ENABLED value + // is valid only for proxies with RDS for Microsoft SQL Server. IAMAuth IAMAuthMode // The Amazon Resource Name (ARN) representing the secret that the proxy uses to @@ -3668,7 +3675,8 @@ type UserAuthConfigInfo struct { Description *string // Whether to require or disallow Amazon Web Services Identity and Access - // Management (IAM) authentication for connections to the proxy. + // Management (IAM) authentication for connections to the proxy. The ENABLED value + // is valid only for proxies with RDS for Microsoft SQL Server. IAMAuth IAMAuthMode // The Amazon Resource Name (ARN) representing the secret that the proxy uses to