diff --git a/.changelog/03fd2da6a344437a9c851a6777d7b215.json b/.changelog/03fd2da6a344437a9c851a6777d7b215.json new file mode 100644 index 00000000000..7070158aff6 --- /dev/null +++ b/.changelog/03fd2da6a344437a9c851a6777d7b215.json @@ -0,0 +1,8 @@ +{ + "id": "03fd2da6-a344-437a-9c85-1a6777d7b215", + "type": "feature", + "description": "Amazon MSK has introduced new versions of ListClusterOperations and DescribeClusterOperation APIs. These v2 APIs provide information and insights into the ongoing operations of both MSK Provisioned and MSK Serverless clusters.", + "modules": [ + "service/kafka" + ] +} \ No newline at end of file diff --git a/.changelog/a7a088c92f8b44568892b203a3ac3986.json b/.changelog/a7a088c92f8b44568892b203a3ac3986.json new file mode 100644 index 00000000000..5291fbeb212 --- /dev/null +++ b/.changelog/a7a088c92f8b44568892b203a3ac3986.json @@ -0,0 +1,8 @@ +{ + "id": "a7a088c9-2f8b-4456-8892-b203a3ac3986", + "type": "feature", + "description": "Added support for sending push notifications using the FCM v1 API with json credentials. Amazon Pinpoint customers can now deliver messages to Android devices using both FCM v1 API and the legacy FCM/GCM API", + "modules": [ + "service/pinpoint" + ] +} \ No newline at end of file diff --git a/.changelog/b19e1e6247424d4a8379bda49ac7615f.json b/.changelog/b19e1e6247424d4a8379bda49ac7615f.json new file mode 100644 index 00000000000..81720e772f0 --- /dev/null +++ b/.changelog/b19e1e6247424d4a8379bda49ac7615f.json @@ -0,0 +1,8 @@ +{ + "id": "b19e1e62-4742-4d4a-8379-bda49ac7615f", + "type": "feature", + "description": "This release adds support for new number types.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/bbccb70e138642078106b9f7386b661d.json b/.changelog/bbccb70e138642078106b9f7386b661d.json new file mode 100644 index 00000000000..578da90fa70 --- /dev/null +++ b/.changelog/bbccb70e138642078106b9f7386b661d.json @@ -0,0 +1,8 @@ +{ + "id": "bbccb70e-1386-4207-8106-b9f7386b661d", + "type": "feature", + "description": "Add a new JavaScript runtime version for CloudFront Functions.", + "modules": [ + "service/cloudfront" + ] +} \ No newline at end of file diff --git a/.changelog/d7e500f0097247bb8645350533ad120f.json b/.changelog/d7e500f0097247bb8645350533ad120f.json new file mode 100644 index 00000000000..b50d85ebfef --- /dev/null +++ b/.changelog/d7e500f0097247bb8645350533ad120f.json @@ -0,0 +1,8 @@ +{ + "id": "d7e500f0-0972-47bb-8645-350533ad120f", + "type": "feature", + "description": "This SDK release is for the feature launch of AWS CloudFormation RetainExceptOnCreate. It adds a new parameter retainExceptOnCreate in the following APIs: CreateStack, UpdateStack, RollbackStack, ExecuteChangeSet.", + "modules": [ + "service/cloudformation" + ] +} \ No newline at end of file diff --git a/.changelog/dadc7591c8c4437ca5764e6a56a7cf35.json b/.changelog/dadc7591c8c4437ca5764e6a56a7cf35.json new file mode 100644 index 00000000000..aa227d0244f --- /dev/null +++ b/.changelog/dadc7591c8c4437ca5764e6a56a7cf35.json @@ -0,0 +1,8 @@ +{ + "id": "dadc7591-c8c4-437c-a576-4e6a56a7cf35", + "type": "feature", + "description": "This release enable customer to add/remove/update more than one workload for a component", + "modules": [ + "service/applicationinsights" + ] +} \ No newline at end of file diff --git a/service/applicationinsights/api_op_AddWorkload.go b/service/applicationinsights/api_op_AddWorkload.go new file mode 100644 index 00000000000..0efa38c3d95 --- /dev/null +++ b/service/applicationinsights/api_op_AddWorkload.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package applicationinsights + +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/applicationinsights/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a workload to a component. Each component can have at most five workloads. +func (c *Client) AddWorkload(ctx context.Context, params *AddWorkloadInput, optFns ...func(*Options)) (*AddWorkloadOutput, error) { + if params == nil { + params = &AddWorkloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddWorkload", params, optFns, c.addOperationAddWorkloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddWorkloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddWorkloadInput struct { + + // The name of the component. + // + // This member is required. + ComponentName *string + + // The name of the resource group. + // + // This member is required. + ResourceGroupName *string + + // The configuration settings of the workload. The value is the escaped JSON of + // the configuration. + // + // This member is required. + WorkloadConfiguration *types.WorkloadConfiguration + + noSmithyDocumentSerde +} + +type AddWorkloadOutput struct { + + // The configuration settings of the workload. The value is the escaped JSON of + // the configuration. + WorkloadConfiguration *types.WorkloadConfiguration + + // The ID of the workload. + WorkloadId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddWorkloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAddWorkload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAddWorkload{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAddWorkloadValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddWorkload(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAddWorkload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "applicationinsights", + OperationName: "AddWorkload", + } +} diff --git a/service/applicationinsights/api_op_DescribeApplication.go b/service/applicationinsights/api_op_DescribeApplication.go index aedd8ea4ed8..bf9b5542c05 100644 --- a/service/applicationinsights/api_op_DescribeApplication.go +++ b/service/applicationinsights/api_op_DescribeApplication.go @@ -34,6 +34,9 @@ type DescribeApplicationInput struct { // This member is required. ResourceGroupName *string + // The AWS account ID for the resource group owner. + AccountId *string + noSmithyDocumentSerde } diff --git a/service/applicationinsights/api_op_DescribeComponent.go b/service/applicationinsights/api_op_DescribeComponent.go index 175a0218c16..4cb47868cf0 100644 --- a/service/applicationinsights/api_op_DescribeComponent.go +++ b/service/applicationinsights/api_op_DescribeComponent.go @@ -40,6 +40,9 @@ type DescribeComponentInput struct { // This member is required. ResourceGroupName *string + // The AWS account ID for the resource group owner. + AccountId *string + noSmithyDocumentSerde } diff --git a/service/applicationinsights/api_op_DescribeComponentConfiguration.go b/service/applicationinsights/api_op_DescribeComponentConfiguration.go index 742633bbded..813d265c3aa 100644 --- a/service/applicationinsights/api_op_DescribeComponentConfiguration.go +++ b/service/applicationinsights/api_op_DescribeComponentConfiguration.go @@ -39,6 +39,9 @@ type DescribeComponentConfigurationInput struct { // This member is required. ResourceGroupName *string + // The AWS account ID for the resource group owner. + AccountId *string + noSmithyDocumentSerde } diff --git a/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go b/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go index 7753f2dd9b1..e7d537b7bc4 100644 --- a/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go +++ b/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go @@ -44,6 +44,9 @@ type DescribeComponentConfigurationRecommendationInput struct { // This member is required. Tier types.Tier + // The recommended configuration type. + RecommendationType types.RecommendationType + noSmithyDocumentSerde } diff --git a/service/applicationinsights/api_op_DescribeLogPattern.go b/service/applicationinsights/api_op_DescribeLogPattern.go index 0c2a20dbff9..a2207e6d711 100644 --- a/service/applicationinsights/api_op_DescribeLogPattern.go +++ b/service/applicationinsights/api_op_DescribeLogPattern.go @@ -44,11 +44,17 @@ type DescribeLogPatternInput struct { // This member is required. ResourceGroupName *string + // The AWS account ID for the resource group owner. + AccountId *string + noSmithyDocumentSerde } type DescribeLogPatternOutput struct { + // The AWS account ID for the resource group owner. + AccountId *string + // The successfully created log pattern. LogPattern *types.LogPattern diff --git a/service/applicationinsights/api_op_DescribeObservation.go b/service/applicationinsights/api_op_DescribeObservation.go index abef290f3d0..cd35ee397d5 100644 --- a/service/applicationinsights/api_op_DescribeObservation.go +++ b/service/applicationinsights/api_op_DescribeObservation.go @@ -34,6 +34,9 @@ type DescribeObservationInput struct { // This member is required. ObservationId *string + // The AWS account ID for the resource group owner. + AccountId *string + noSmithyDocumentSerde } diff --git a/service/applicationinsights/api_op_DescribeProblem.go b/service/applicationinsights/api_op_DescribeProblem.go index eba9e623f7a..545bb7ba520 100644 --- a/service/applicationinsights/api_op_DescribeProblem.go +++ b/service/applicationinsights/api_op_DescribeProblem.go @@ -34,6 +34,9 @@ type DescribeProblemInput struct { // This member is required. ProblemId *string + // The AWS account ID for the owner of the resource group affected by the problem. + AccountId *string + noSmithyDocumentSerde } diff --git a/service/applicationinsights/api_op_DescribeProblemObservations.go b/service/applicationinsights/api_op_DescribeProblemObservations.go index 974d9f4bf1a..b23d5775fa5 100644 --- a/service/applicationinsights/api_op_DescribeProblemObservations.go +++ b/service/applicationinsights/api_op_DescribeProblemObservations.go @@ -34,6 +34,9 @@ type DescribeProblemObservationsInput struct { // This member is required. ProblemId *string + // The AWS account ID for the resource group owner. + AccountId *string + noSmithyDocumentSerde } diff --git a/service/applicationinsights/api_op_DescribeWorkload.go b/service/applicationinsights/api_op_DescribeWorkload.go new file mode 100644 index 00000000000..3b71ccae818 --- /dev/null +++ b/service/applicationinsights/api_op_DescribeWorkload.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package applicationinsights + +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/applicationinsights/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes a workload and its configuration. +func (c *Client) DescribeWorkload(ctx context.Context, params *DescribeWorkloadInput, optFns ...func(*Options)) (*DescribeWorkloadOutput, error) { + if params == nil { + params = &DescribeWorkloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeWorkload", params, optFns, c.addOperationDescribeWorkloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeWorkloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeWorkloadInput struct { + + // The name of the component. + // + // This member is required. + ComponentName *string + + // The name of the resource group. + // + // This member is required. + ResourceGroupName *string + + // The ID of the workload. + // + // This member is required. + WorkloadId *string + + // The AWS account ID for the workload owner. + AccountId *string + + noSmithyDocumentSerde +} + +type DescribeWorkloadOutput struct { + + // The configuration settings of the workload. The value is the escaped JSON of + // the configuration. + WorkloadConfiguration *types.WorkloadConfiguration + + // The ID of the workload. + WorkloadId *string + + // If logging is supported for the resource type, shows whether the component has + // configured logs to be monitored. + WorkloadRemarks *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeWorkloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeWorkload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeWorkload{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeWorkloadValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkload(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeWorkload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "applicationinsights", + OperationName: "DescribeWorkload", + } +} diff --git a/service/applicationinsights/api_op_ListApplications.go b/service/applicationinsights/api_op_ListApplications.go index 19d52eebfc1..1534e89063f 100644 --- a/service/applicationinsights/api_op_ListApplications.go +++ b/service/applicationinsights/api_op_ListApplications.go @@ -30,6 +30,9 @@ func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsI type ListApplicationsInput struct { + // The AWS account ID for the resource group owner. + AccountId *string + // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. MaxResults *int32 diff --git a/service/applicationinsights/api_op_ListComponents.go b/service/applicationinsights/api_op_ListComponents.go index bac9e2a3cec..6304125c52a 100644 --- a/service/applicationinsights/api_op_ListComponents.go +++ b/service/applicationinsights/api_op_ListComponents.go @@ -35,6 +35,9 @@ type ListComponentsInput struct { // This member is required. ResourceGroupName *string + // The AWS account ID for the resource group owner. + AccountId *string + // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. MaxResults *int32 diff --git a/service/applicationinsights/api_op_ListConfigurationHistory.go b/service/applicationinsights/api_op_ListConfigurationHistory.go index 617c874324e..88b90c44928 100644 --- a/service/applicationinsights/api_op_ListConfigurationHistory.go +++ b/service/applicationinsights/api_op_ListConfigurationHistory.go @@ -36,6 +36,9 @@ func (c *Client) ListConfigurationHistory(ctx context.Context, params *ListConfi type ListConfigurationHistoryInput struct { + // The AWS account ID for the resource group owner. + AccountId *string + // The end time of the event. EndTime *time.Time diff --git a/service/applicationinsights/api_op_ListLogPatternSets.go b/service/applicationinsights/api_op_ListLogPatternSets.go index 1ee41eaa6ab..152900a9df2 100644 --- a/service/applicationinsights/api_op_ListLogPatternSets.go +++ b/service/applicationinsights/api_op_ListLogPatternSets.go @@ -34,6 +34,9 @@ type ListLogPatternSetsInput struct { // This member is required. ResourceGroupName *string + // The AWS account ID for the resource group owner. + AccountId *string + // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. MaxResults *int32 @@ -46,6 +49,9 @@ type ListLogPatternSetsInput struct { type ListLogPatternSetsOutput struct { + // The AWS account ID for the resource group owner. + AccountId *string + // The list of log pattern sets. LogPatternSets []string diff --git a/service/applicationinsights/api_op_ListLogPatterns.go b/service/applicationinsights/api_op_ListLogPatterns.go index aff51622392..e234d2bb640 100644 --- a/service/applicationinsights/api_op_ListLogPatterns.go +++ b/service/applicationinsights/api_op_ListLogPatterns.go @@ -35,6 +35,9 @@ type ListLogPatternsInput struct { // This member is required. ResourceGroupName *string + // The AWS account ID for the resource group owner. + AccountId *string + // The maximum number of results to return in a single call. To retrieve the // remaining results, make another call with the returned NextToken value. MaxResults *int32 @@ -50,6 +53,9 @@ type ListLogPatternsInput struct { type ListLogPatternsOutput struct { + // The AWS account ID for the resource group owner. + AccountId *string + // The list of log patterns. LogPatterns []types.LogPattern diff --git a/service/applicationinsights/api_op_ListProblems.go b/service/applicationinsights/api_op_ListProblems.go index 5e4d7242c62..32a372158df 100644 --- a/service/applicationinsights/api_op_ListProblems.go +++ b/service/applicationinsights/api_op_ListProblems.go @@ -31,6 +31,9 @@ func (c *Client) ListProblems(ctx context.Context, params *ListProblemsInput, op type ListProblemsInput struct { + // The AWS account ID for the resource group owner. + AccountId *string + // The name of the component. ComponentName *string @@ -52,11 +55,18 @@ type ListProblemsInput struct { // a time frame for the request, problems within the past seven days are returned. StartTime *time.Time + // Specifies whether or not you can view the problem. If not specified, visible + // and ignored problems are returned. + Visibility types.Visibility + noSmithyDocumentSerde } type ListProblemsOutput struct { + // The AWS account ID for the resource group owner. + AccountId *string + // The token used to retrieve the next page of results. This value is null when // there are no more results to return. NextToken *string diff --git a/service/applicationinsights/api_op_ListWorkloads.go b/service/applicationinsights/api_op_ListWorkloads.go new file mode 100644 index 00000000000..d26ba866545 --- /dev/null +++ b/service/applicationinsights/api_op_ListWorkloads.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package applicationinsights + +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/applicationinsights/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the workloads that are configured on a given component. +func (c *Client) ListWorkloads(ctx context.Context, params *ListWorkloadsInput, optFns ...func(*Options)) (*ListWorkloadsOutput, error) { + if params == nil { + params = &ListWorkloadsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListWorkloads", params, optFns, c.addOperationListWorkloadsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListWorkloadsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListWorkloadsInput struct { + + // The name of the component. + // + // This member is required. + ComponentName *string + + // The name of the resource group. + // + // This member is required. + ResourceGroupName *string + + // The AWS account ID of the owner of the workload. + AccountId *string + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. + MaxResults *int32 + + // The token to request the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListWorkloadsOutput struct { + + // The token to request the next page of results. + NextToken *string + + // The list of workloads. + WorkloadList []types.Workload + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListWorkloadsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListWorkloads{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListWorkloads{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListWorkloadsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkloads(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListWorkloadsAPIClient is a client that implements the ListWorkloads operation. +type ListWorkloadsAPIClient interface { + ListWorkloads(context.Context, *ListWorkloadsInput, ...func(*Options)) (*ListWorkloadsOutput, error) +} + +var _ ListWorkloadsAPIClient = (*Client)(nil) + +// ListWorkloadsPaginatorOptions is the paginator options for ListWorkloads +type ListWorkloadsPaginatorOptions struct { + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. + 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 +} + +// ListWorkloadsPaginator is a paginator for ListWorkloads +type ListWorkloadsPaginator struct { + options ListWorkloadsPaginatorOptions + client ListWorkloadsAPIClient + params *ListWorkloadsInput + nextToken *string + firstPage bool +} + +// NewListWorkloadsPaginator returns a new ListWorkloadsPaginator +func NewListWorkloadsPaginator(client ListWorkloadsAPIClient, params *ListWorkloadsInput, optFns ...func(*ListWorkloadsPaginatorOptions)) *ListWorkloadsPaginator { + if params == nil { + params = &ListWorkloadsInput{} + } + + options := ListWorkloadsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListWorkloadsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListWorkloadsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListWorkloads page. +func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListWorkloadsOutput, 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.ListWorkloads(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_opListWorkloads(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "applicationinsights", + OperationName: "ListWorkloads", + } +} diff --git a/service/applicationinsights/api_op_RemoveWorkload.go b/service/applicationinsights/api_op_RemoveWorkload.go new file mode 100644 index 00000000000..042de69ce95 --- /dev/null +++ b/service/applicationinsights/api_op_RemoveWorkload.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package applicationinsights + +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/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Remove workload from a component. +func (c *Client) RemoveWorkload(ctx context.Context, params *RemoveWorkloadInput, optFns ...func(*Options)) (*RemoveWorkloadOutput, error) { + if params == nil { + params = &RemoveWorkloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveWorkload", params, optFns, c.addOperationRemoveWorkloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveWorkloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveWorkloadInput struct { + + // The name of the component. + // + // This member is required. + ComponentName *string + + // The name of the resource group. + // + // This member is required. + ResourceGroupName *string + + // The ID of the workload. + // + // This member is required. + WorkloadId *string + + noSmithyDocumentSerde +} + +type RemoveWorkloadOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveWorkloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRemoveWorkload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRemoveWorkload{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRemoveWorkloadValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveWorkload(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveWorkload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "applicationinsights", + OperationName: "RemoveWorkload", + } +} diff --git a/service/applicationinsights/api_op_UpdateProblem.go b/service/applicationinsights/api_op_UpdateProblem.go new file mode 100644 index 00000000000..7831202cc3a --- /dev/null +++ b/service/applicationinsights/api_op_UpdateProblem.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package applicationinsights + +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/applicationinsights/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the visibility of the problem or specifies the problem as RESOLVED . +func (c *Client) UpdateProblem(ctx context.Context, params *UpdateProblemInput, optFns ...func(*Options)) (*UpdateProblemOutput, error) { + if params == nil { + params = &UpdateProblemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProblem", params, optFns, c.addOperationUpdateProblemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProblemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProblemInput struct { + + // The ID of the problem. + // + // This member is required. + ProblemId *string + + // The status of the problem. Arguments can be passed for only problems that show + // a status of RECOVERING . + UpdateStatus types.UpdateStatus + + // The visibility of a problem. When you pass a value of IGNORED , the problem is + // removed from the default view, and all notifications for the problem are + // suspended. When VISIBLE is passed, the IGNORED action is reversed. + Visibility types.Visibility + + noSmithyDocumentSerde +} + +type UpdateProblemOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProblemMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateProblem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateProblem{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateProblemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProblem(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProblem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "applicationinsights", + OperationName: "UpdateProblem", + } +} diff --git a/service/applicationinsights/api_op_UpdateWorkload.go b/service/applicationinsights/api_op_UpdateWorkload.go new file mode 100644 index 00000000000..dde3bab5e69 --- /dev/null +++ b/service/applicationinsights/api_op_UpdateWorkload.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package applicationinsights + +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/applicationinsights/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a workload to a component. Each component can have at most five workloads. +func (c *Client) UpdateWorkload(ctx context.Context, params *UpdateWorkloadInput, optFns ...func(*Options)) (*UpdateWorkloadOutput, error) { + if params == nil { + params = &UpdateWorkloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateWorkload", params, optFns, c.addOperationUpdateWorkloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateWorkloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateWorkloadInput struct { + + // The name of the component. + // + // This member is required. + ComponentName *string + + // The name of the resource group. + // + // This member is required. + ResourceGroupName *string + + // The configuration settings of the workload. The value is the escaped JSON of + // the configuration. + // + // This member is required. + WorkloadConfiguration *types.WorkloadConfiguration + + // The ID of the workload. + WorkloadId *string + + noSmithyDocumentSerde +} + +type UpdateWorkloadOutput struct { + + // The configuration settings of the workload. The value is the escaped JSON of + // the configuration. + WorkloadConfiguration *types.WorkloadConfiguration + + // The ID of the workload. + WorkloadId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateWorkloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateWorkload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateWorkload{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateWorkloadValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateWorkload(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateWorkload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "applicationinsights", + OperationName: "UpdateWorkload", + } +} diff --git a/service/applicationinsights/deserializers.go b/service/applicationinsights/deserializers.go index 8d91aa18198..e4acbc25f0a 100644 --- a/service/applicationinsights/deserializers.go +++ b/service/applicationinsights/deserializers.go @@ -20,6 +20,126 @@ import ( "strings" ) +type awsAwsjson11_deserializeOpAddWorkload struct { +} + +func (*awsAwsjson11_deserializeOpAddWorkload) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAddWorkload) 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_deserializeOpErrorAddWorkload(response, &metadata) + } + output := &AddWorkloadOutput{} + 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_deserializeOpDocumentAddWorkloadOutput(&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_deserializeOpErrorAddWorkload(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateApplication struct { } @@ -1679,14 +1799,14 @@ func awsAwsjson11_deserializeOpErrorDescribeProblemObservations(response *smithy } } -type awsAwsjson11_deserializeOpListApplications struct { +type awsAwsjson11_deserializeOpDescribeWorkload struct { } -func (*awsAwsjson11_deserializeOpListApplications) ID() string { +func (*awsAwsjson11_deserializeOpDescribeWorkload) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListApplications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeWorkload) 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) @@ -1700,9 +1820,9 @@ func (m *awsAwsjson11_deserializeOpListApplications) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListApplications(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeWorkload(response, &metadata) } - output := &ListApplicationsOutput{} + output := &DescribeWorkloadOutput{} out.Result = output var buff [1024]byte @@ -1722,7 +1842,7 @@ func (m *awsAwsjson11_deserializeOpListApplications) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListApplicationsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeWorkloadOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1736,7 +1856,7 @@ func (m *awsAwsjson11_deserializeOpListApplications) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListApplications(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeWorkload(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)} @@ -1780,6 +1900,9 @@ func awsAwsjson11_deserializeOpErrorListApplications(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -1793,14 +1916,14 @@ func awsAwsjson11_deserializeOpErrorListApplications(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpListComponents struct { +type awsAwsjson11_deserializeOpListApplications struct { } -func (*awsAwsjson11_deserializeOpListComponents) ID() string { +func (*awsAwsjson11_deserializeOpListApplications) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListComponents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListApplications) 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) @@ -1814,9 +1937,9 @@ func (m *awsAwsjson11_deserializeOpListComponents) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListComponents(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListApplications(response, &metadata) } - output := &ListComponentsOutput{} + output := &ListApplicationsOutput{} out.Result = output var buff [1024]byte @@ -1836,7 +1959,7 @@ func (m *awsAwsjson11_deserializeOpListComponents) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListComponentsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListApplicationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1850,7 +1973,7 @@ func (m *awsAwsjson11_deserializeOpListComponents) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListComponents(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListApplications(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)} @@ -1894,9 +2017,6 @@ func awsAwsjson11_deserializeOpErrorListComponents(response *smithyhttp.Response case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -1910,14 +2030,14 @@ func awsAwsjson11_deserializeOpErrorListComponents(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpListConfigurationHistory struct { +type awsAwsjson11_deserializeOpListComponents struct { } -func (*awsAwsjson11_deserializeOpListConfigurationHistory) ID() string { +func (*awsAwsjson11_deserializeOpListComponents) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListConfigurationHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListComponents) 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) @@ -1931,9 +2051,9 @@ func (m *awsAwsjson11_deserializeOpListConfigurationHistory) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListConfigurationHistory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListComponents(response, &metadata) } - output := &ListConfigurationHistoryOutput{} + output := &ListComponentsOutput{} out.Result = output var buff [1024]byte @@ -1953,7 +2073,7 @@ func (m *awsAwsjson11_deserializeOpListConfigurationHistory) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListConfigurationHistoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListComponentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1967,7 +2087,7 @@ func (m *awsAwsjson11_deserializeOpListConfigurationHistory) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListConfigurationHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListComponents(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)} @@ -2027,14 +2147,14 @@ func awsAwsjson11_deserializeOpErrorListConfigurationHistory(response *smithyhtt } } -type awsAwsjson11_deserializeOpListLogPatterns struct { +type awsAwsjson11_deserializeOpListConfigurationHistory struct { } -func (*awsAwsjson11_deserializeOpListLogPatterns) ID() string { +func (*awsAwsjson11_deserializeOpListConfigurationHistory) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListLogPatterns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListConfigurationHistory) 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) @@ -2048,9 +2168,9 @@ func (m *awsAwsjson11_deserializeOpListLogPatterns) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListLogPatterns(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListConfigurationHistory(response, &metadata) } - output := &ListLogPatternsOutput{} + output := &ListConfigurationHistoryOutput{} out.Result = output var buff [1024]byte @@ -2070,7 +2190,7 @@ func (m *awsAwsjson11_deserializeOpListLogPatterns) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListLogPatternsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListConfigurationHistoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2084,7 +2204,7 @@ func (m *awsAwsjson11_deserializeOpListLogPatterns) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListLogPatterns(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListConfigurationHistory(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)} @@ -2144,14 +2264,14 @@ func awsAwsjson11_deserializeOpErrorListLogPatterns(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpListLogPatternSets struct { +type awsAwsjson11_deserializeOpListLogPatterns struct { } -func (*awsAwsjson11_deserializeOpListLogPatternSets) ID() string { +func (*awsAwsjson11_deserializeOpListLogPatterns) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListLogPatternSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListLogPatterns) 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) @@ -2165,9 +2285,9 @@ func (m *awsAwsjson11_deserializeOpListLogPatternSets) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListLogPatternSets(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListLogPatterns(response, &metadata) } - output := &ListLogPatternSetsOutput{} + output := &ListLogPatternsOutput{} out.Result = output var buff [1024]byte @@ -2187,7 +2307,7 @@ func (m *awsAwsjson11_deserializeOpListLogPatternSets) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListLogPatternSetsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListLogPatternsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2201,7 +2321,7 @@ func (m *awsAwsjson11_deserializeOpListLogPatternSets) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListLogPatternSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListLogPatterns(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)} @@ -2261,14 +2381,14 @@ func awsAwsjson11_deserializeOpErrorListLogPatternSets(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpListProblems struct { +type awsAwsjson11_deserializeOpListLogPatternSets struct { } -func (*awsAwsjson11_deserializeOpListProblems) ID() string { +func (*awsAwsjson11_deserializeOpListLogPatternSets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListProblems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListLogPatternSets) 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) @@ -2282,9 +2402,9 @@ func (m *awsAwsjson11_deserializeOpListProblems) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListProblems(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListLogPatternSets(response, &metadata) } - output := &ListProblemsOutput{} + output := &ListLogPatternSetsOutput{} out.Result = output var buff [1024]byte @@ -2304,7 +2424,7 @@ func (m *awsAwsjson11_deserializeOpListProblems) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListProblemsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListLogPatternSetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2318,7 +2438,7 @@ func (m *awsAwsjson11_deserializeOpListProblems) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListProblems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListLogPatternSets(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)} @@ -2378,14 +2498,14 @@ func awsAwsjson11_deserializeOpErrorListProblems(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListProblems struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListProblems) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListProblems) 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) @@ -2399,9 +2519,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListProblems(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListProblemsOutput{} out.Result = output var buff [1024]byte @@ -2421,7 +2541,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListProblemsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2435,7 +2555,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListProblems(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)} @@ -2476,6 +2596,9 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2492,14 +2615,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpTagResource struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpTagResource) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTagsForResource) 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) @@ -2513,9 +2636,9 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &TagResourceOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -2535,7 +2658,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2549,7 +2672,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTagsForResource(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)} @@ -2593,9 +2716,6 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -2609,14 +2729,14 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUntagResource struct { +type awsAwsjson11_deserializeOpListWorkloads struct { } -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { +func (*awsAwsjson11_deserializeOpListWorkloads) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListWorkloads) 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) @@ -2630,9 +2750,9 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListWorkloads(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListWorkloadsOutput{} out.Result = output var buff [1024]byte @@ -2652,7 +2772,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListWorkloadsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2666,7 +2786,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListWorkloads(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)} @@ -2707,6 +2827,9 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2723,14 +2846,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateApplication struct { +type awsAwsjson11_deserializeOpRemoveWorkload struct { } -func (*awsAwsjson11_deserializeOpUpdateApplication) ID() string { +func (*awsAwsjson11_deserializeOpRemoveWorkload) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRemoveWorkload) 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) @@ -2744,9 +2867,9 @@ func (m *awsAwsjson11_deserializeOpUpdateApplication) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateApplication(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRemoveWorkload(response, &metadata) } - output := &UpdateApplicationOutput{} + output := &RemoveWorkloadOutput{} out.Result = output var buff [1024]byte @@ -2766,7 +2889,7 @@ func (m *awsAwsjson11_deserializeOpUpdateApplication) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateApplicationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRemoveWorkloadOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2780,7 +2903,7 @@ func (m *awsAwsjson11_deserializeOpUpdateApplication) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRemoveWorkload(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)} @@ -2840,14 +2963,14 @@ func awsAwsjson11_deserializeOpErrorUpdateApplication(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpUpdateComponent struct { +type awsAwsjson11_deserializeOpTagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateComponent) ID() string { +func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpTagResource) 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) @@ -2861,9 +2984,594 @@ func (m *awsAwsjson11_deserializeOpUpdateComponent) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateComponent(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateComponentOutput{} + output := &TagResourceOutput{} + 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_deserializeOpDocumentTagResourceOutput(&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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUntagResource struct { +} + +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUntagResource) 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_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + 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_deserializeOpDocumentUntagResourceOutput(&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_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateApplication struct { +} + +func (*awsAwsjson11_deserializeOpUpdateApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateApplication) 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_deserializeOpErrorUpdateApplication(response, &metadata) + } + output := &UpdateApplicationOutput{} + 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_deserializeOpDocumentUpdateApplicationOutput(&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_deserializeOpErrorUpdateApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateComponent struct { +} + +func (*awsAwsjson11_deserializeOpUpdateComponent) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateComponent) 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_deserializeOpErrorUpdateComponent(response, &metadata) + } + output := &UpdateComponentOutput{} + 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_deserializeOpDocumentUpdateComponentOutput(&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_deserializeOpErrorUpdateComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateComponentConfiguration struct { +} + +func (*awsAwsjson11_deserializeOpUpdateComponentConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateComponentConfiguration) 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_deserializeOpErrorUpdateComponentConfiguration(response, &metadata) + } + output := &UpdateComponentConfigurationOutput{} + 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_deserializeOpDocumentUpdateComponentConfigurationOutput(&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_deserializeOpErrorUpdateComponentConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLogPattern struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLogPattern) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLogPattern) 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_deserializeOpErrorUpdateLogPattern(response, &metadata) + } + output := &UpdateLogPatternOutput{} out.Result = output var buff [1024]byte @@ -2883,7 +3591,7 @@ func (m *awsAwsjson11_deserializeOpUpdateComponent) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateComponentOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateLogPatternOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2897,7 +3605,7 @@ func (m *awsAwsjson11_deserializeOpUpdateComponent) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateLogPattern(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)} @@ -2960,14 +3668,14 @@ func awsAwsjson11_deserializeOpErrorUpdateComponent(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpUpdateComponentConfiguration struct { +type awsAwsjson11_deserializeOpUpdateProblem struct { } -func (*awsAwsjson11_deserializeOpUpdateComponentConfiguration) ID() string { +func (*awsAwsjson11_deserializeOpUpdateProblem) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateComponentConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateProblem) 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) @@ -2981,9 +3689,9 @@ func (m *awsAwsjson11_deserializeOpUpdateComponentConfiguration) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateComponentConfiguration(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateProblem(response, &metadata) } - output := &UpdateComponentConfigurationOutput{} + output := &UpdateProblemOutput{} out.Result = output var buff [1024]byte @@ -3003,7 +3711,7 @@ func (m *awsAwsjson11_deserializeOpUpdateComponentConfiguration) HandleDeseriali return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateComponentConfigurationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateProblemOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3017,7 +3725,7 @@ func (m *awsAwsjson11_deserializeOpUpdateComponentConfiguration) HandleDeseriali return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateComponentConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateProblem(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)} @@ -3077,14 +3785,14 @@ func awsAwsjson11_deserializeOpErrorUpdateComponentConfiguration(response *smith } } -type awsAwsjson11_deserializeOpUpdateLogPattern struct { +type awsAwsjson11_deserializeOpUpdateWorkload struct { } -func (*awsAwsjson11_deserializeOpUpdateLogPattern) ID() string { +func (*awsAwsjson11_deserializeOpUpdateWorkload) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateLogPattern) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateWorkload) 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) @@ -3098,9 +3806,9 @@ func (m *awsAwsjson11_deserializeOpUpdateLogPattern) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLogPattern(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateWorkload(response, &metadata) } - output := &UpdateLogPatternOutput{} + output := &UpdateWorkloadOutput{} out.Result = output var buff [1024]byte @@ -3120,7 +3828,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLogPattern) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateLogPatternOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateWorkloadOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3134,7 +3842,7 @@ func (m *awsAwsjson11_deserializeOpUpdateLogPattern) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateLogPattern(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateWorkload(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)} @@ -3178,9 +3886,6 @@ func awsAwsjson11_deserializeOpErrorUpdateLogPattern(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3663,6 +4368,15 @@ func awsAwsjson11_deserializeDocumentApplicationInfo(v **types.ApplicationInfo, for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "AutoConfigEnabled": if value != nil { jtv, ok := value.(bool) @@ -3840,6 +4554,15 @@ func awsAwsjson11_deserializeDocumentConfigurationEvent(v **types.ConfigurationE for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "EventDetail": if value != nil { jtv, ok := value.(string) @@ -3901,6 +4624,15 @@ func awsAwsjson11_deserializeDocumentConfigurationEvent(v **types.ConfigurationE sv.MonitoredResourceARN = ptr.String(jtv) } + case "ResourceGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceGroupName to be of type string, got %T instead", value) + } + sv.ResourceGroupName = ptr.String(jtv) + } + default: _, _ = key, value @@ -4753,6 +5485,15 @@ func awsAwsjson11_deserializeDocumentProblem(v **types.Problem, value interface{ for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "AffectedResource": if value != nil { jtv, ok := value.(string) @@ -4830,6 +5571,15 @@ func awsAwsjson11_deserializeDocumentProblem(v **types.Problem, value interface{ sv.RecurringCount = ptr.Int64(i64) } + case "ResolutionMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResolutionMethod to be of type string, got %T instead", value) + } + sv.ResolutionMethod = types.ResolutionMethod(jtv) + } + case "ResourceGroupName": if value != nil { jtv, ok := value.(string) @@ -4882,6 +5632,15 @@ func awsAwsjson11_deserializeDocumentProblem(v **types.Problem, value interface{ sv.Title = ptr.String(jtv) } + case "Visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.Visibility = types.Visibility(jtv) + } + default: _, _ = key, value @@ -5262,34 +6021,238 @@ func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ValidationException + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } 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 ErrorMsg to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWorkload(v **types.Workload, 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.Workload + if *v == nil { + sv = &types.Workload{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComponentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComponentName to be of type string, got %T instead", value) + } + sv.ComponentName = ptr.String(jtv) + } + + case "Tier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Tier to be of type string, got %T instead", value) + } + sv.Tier = types.Tier(jtv) + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + case "WorkloadName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadName to be of type string, got %T instead", value) + } + sv.WorkloadName = ptr.String(jtv) + } + + case "WorkloadRemarks": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Remarks to be of type string, got %T instead", value) + } + sv.WorkloadRemarks = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWorkloadConfiguration(v **types.WorkloadConfiguration, 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.WorkloadConfiguration + if *v == nil { + sv = &types.WorkloadConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Configuration": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComponentConfiguration to be of type string, got %T instead", value) + } + sv.Configuration = ptr.String(jtv) + } + + case "Tier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Tier to be of type string, got %T instead", value) + } + sv.Tier = types.Tier(jtv) + } + + case "WorkloadName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadName to be of type string, got %T instead", value) + } + sv.WorkloadName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWorkloadList(v *[]types.Workload, 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.Workload + if *v == nil { + cv = []types.Workload{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Workload + destAddr := &col + if err := awsAwsjson11_deserializeDocumentWorkload(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentWorkloadMetaData(v *map[string]string, 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 mv map[string]string if *v == nil { - sv = &types.ValidationException{} + mv = map[string]string{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMsg to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetaDataValue to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + parsedVal = jtv } + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } -func awsAwsjson11_deserializeDocumentWorkloadMetaData(v *map[string]string, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentAddWorkloadOutput(v **AddWorkloadOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5302,26 +6265,35 @@ func awsAwsjson11_deserializeDocumentWorkloadMetaData(v *map[string]string, valu return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var sv *AddWorkloadOutput if *v == nil { - mv = map[string]string{} + sv = &AddWorkloadOutput{} } else { - mv = *v + sv = *v } for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MetaDataValue to be of type string, got %T instead", value) + switch key { + case "WorkloadConfiguration": + if err := awsAwsjson11_deserializeDocumentWorkloadConfiguration(&sv.WorkloadConfiguration, value); err != nil { + return err } - parsedVal = jtv - } - mv[key] = parsedVal + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } } - *v = mv + *v = sv return nil } @@ -5727,6 +6699,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeLogPatternOutput(v **DescribeLogP for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "LogPattern": if err := awsAwsjson11_deserializeDocumentLogPattern(&sv.LogPattern, value); err != nil { return err @@ -5858,6 +6839,60 @@ func awsAwsjson11_deserializeOpDocumentDescribeProblemOutput(v **DescribeProblem return nil } +func awsAwsjson11_deserializeOpDocumentDescribeWorkloadOutput(v **DescribeWorkloadOutput, 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 *DescribeWorkloadOutput + if *v == nil { + sv = &DescribeWorkloadOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WorkloadConfiguration": + if err := awsAwsjson11_deserializeDocumentWorkloadConfiguration(&sv.WorkloadConfiguration, value); err != nil { + return err + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + case "WorkloadRemarks": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Remarks to be of type string, got %T instead", value) + } + sv.WorkloadRemarks = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListApplicationsOutput(v **ListApplicationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6015,6 +7050,15 @@ func awsAwsjson11_deserializeOpDocumentListLogPatternSetsOutput(v **ListLogPatte for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "LogPatternSets": if err := awsAwsjson11_deserializeDocumentLogPatternSetList(&sv.LogPatternSets, value); err != nil { return err @@ -6069,6 +7113,15 @@ func awsAwsjson11_deserializeOpDocumentListLogPatternsOutput(v **ListLogPatterns for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "LogPatterns": if err := awsAwsjson11_deserializeDocumentLogPatternList(&sv.LogPatterns, value); err != nil { return err @@ -6123,6 +7176,15 @@ func awsAwsjson11_deserializeOpDocumentListProblemsOutput(v **ListProblemsOutput for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -6191,6 +7253,82 @@ func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } +func awsAwsjson11_deserializeOpDocumentListWorkloadsOutput(v **ListWorkloadsOutput, 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 *ListWorkloadsOutput + if *v == nil { + sv = &ListWorkloadsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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) + } + + case "WorkloadList": + if err := awsAwsjson11_deserializeDocumentWorkloadList(&sv.WorkloadList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRemoveWorkloadOutput(v **RemoveWorkloadOutput, 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 *RemoveWorkloadOutput + if *v == nil { + sv = &RemoveWorkloadOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6395,3 +7533,79 @@ func awsAwsjson11_deserializeOpDocumentUpdateLogPatternOutput(v **UpdateLogPatte *v = sv return nil } + +func awsAwsjson11_deserializeOpDocumentUpdateProblemOutput(v **UpdateProblemOutput, 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 *UpdateProblemOutput + if *v == nil { + sv = &UpdateProblemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateWorkloadOutput(v **UpdateWorkloadOutput, 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 *UpdateWorkloadOutput + if *v == nil { + sv = &UpdateWorkloadOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WorkloadConfiguration": + if err := awsAwsjson11_deserializeDocumentWorkloadConfiguration(&sv.WorkloadConfiguration, value); err != nil { + return err + } + + case "WorkloadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkloadId to be of type string, got %T instead", value) + } + sv.WorkloadId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/applicationinsights/generated.json b/service/applicationinsights/generated.json index f2970381ae8..5f764f2508b 100644 --- a/service/applicationinsights/generated.json +++ b/service/applicationinsights/generated.json @@ -8,6 +8,7 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AddWorkload.go", "api_op_CreateApplication.go", "api_op_CreateComponent.go", "api_op_CreateLogPattern.go", @@ -22,6 +23,7 @@ "api_op_DescribeObservation.go", "api_op_DescribeProblem.go", "api_op_DescribeProblemObservations.go", + "api_op_DescribeWorkload.go", "api_op_ListApplications.go", "api_op_ListComponents.go", "api_op_ListConfigurationHistory.go", @@ -29,12 +31,16 @@ "api_op_ListLogPatterns.go", "api_op_ListProblems.go", "api_op_ListTagsForResource.go", + "api_op_ListWorkloads.go", + "api_op_RemoveWorkload.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateApplication.go", "api_op_UpdateComponent.go", "api_op_UpdateComponentConfiguration.go", "api_op_UpdateLogPattern.go", + "api_op_UpdateProblem.go", + "api_op_UpdateWorkload.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/applicationinsights/serializers.go b/service/applicationinsights/serializers.go index 776080a08b1..23770d9885c 100644 --- a/service/applicationinsights/serializers.go +++ b/service/applicationinsights/serializers.go @@ -16,6 +16,61 @@ import ( "path" ) +type awsAwsjson11_serializeOpAddWorkload struct { +} + +func (*awsAwsjson11_serializeOpAddWorkload) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAddWorkload) 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.(*AddWorkloadInput) + _ = 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("EC2WindowsBarleyService.AddWorkload") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAddWorkloadInput(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_serializeOpCreateApplication struct { } @@ -786,6 +841,61 @@ func (m *awsAwsjson11_serializeOpDescribeProblemObservations) HandleSerialize(ct return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeWorkload struct { +} + +func (*awsAwsjson11_serializeOpDescribeWorkload) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeWorkload) 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.(*DescribeWorkloadInput) + _ = 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("EC2WindowsBarleyService.DescribeWorkload") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeWorkloadInput(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_serializeOpListApplications struct { } @@ -1171,6 +1281,116 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListWorkloads struct { +} + +func (*awsAwsjson11_serializeOpListWorkloads) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListWorkloads) 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.(*ListWorkloadsInput) + _ = 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("EC2WindowsBarleyService.ListWorkloads") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListWorkloadsInput(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_serializeOpRemoveWorkload struct { +} + +func (*awsAwsjson11_serializeOpRemoveWorkload) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRemoveWorkload) 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.(*RemoveWorkloadInput) + _ = 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("EC2WindowsBarleyService.RemoveWorkload") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRemoveWorkloadInput(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_serializeOpTagResource struct { } @@ -1500,6 +1720,116 @@ func (m *awsAwsjson11_serializeOpUpdateLogPattern) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } + +type awsAwsjson11_serializeOpUpdateProblem struct { +} + +func (*awsAwsjson11_serializeOpUpdateProblem) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateProblem) 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.(*UpdateProblemInput) + _ = 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("EC2WindowsBarleyService.UpdateProblem") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateProblemInput(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_serializeOpUpdateWorkload struct { +} + +func (*awsAwsjson11_serializeOpUpdateWorkload) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateWorkload) 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.(*UpdateWorkloadInput) + _ = 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("EC2WindowsBarleyService.UpdateWorkload") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateWorkloadInput(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) +} func awsAwsjson11_serializeDocumentResourceList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1552,6 +1882,52 @@ func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value return nil } +func awsAwsjson11_serializeDocumentWorkloadConfiguration(v *types.WorkloadConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Configuration != nil { + ok := object.Key("Configuration") + ok.String(*v.Configuration) + } + + if len(v.Tier) > 0 { + ok := object.Key("Tier") + ok.String(string(v.Tier)) + } + + if v.WorkloadName != nil { + ok := object.Key("WorkloadName") + ok.String(*v.WorkloadName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentAddWorkloadInput(v *AddWorkloadInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ComponentName != nil { + ok := object.Key("ComponentName") + ok.String(*v.ComponentName) + } + + if v.ResourceGroupName != nil { + ok := object.Key("ResourceGroupName") + ok.String(*v.ResourceGroupName) + } + + if v.WorkloadConfiguration != nil { + ok := object.Key("WorkloadConfiguration") + if err := awsAwsjson11_serializeDocumentWorkloadConfiguration(v.WorkloadConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateApplicationInput(v *CreateApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1712,6 +2088,11 @@ func awsAwsjson11_serializeOpDocumentDescribeApplicationInput(v *DescribeApplica object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ResourceGroupName != nil { ok := object.Key("ResourceGroupName") ok.String(*v.ResourceGroupName) @@ -1724,6 +2105,11 @@ func awsAwsjson11_serializeOpDocumentDescribeComponentConfigurationInput(v *Desc object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ComponentName != nil { ok := object.Key("ComponentName") ok.String(*v.ComponentName) @@ -1746,6 +2132,11 @@ func awsAwsjson11_serializeOpDocumentDescribeComponentConfigurationRecommendatio ok.String(*v.ComponentName) } + if len(v.RecommendationType) > 0 { + ok := object.Key("RecommendationType") + ok.String(string(v.RecommendationType)) + } + if v.ResourceGroupName != nil { ok := object.Key("ResourceGroupName") ok.String(*v.ResourceGroupName) @@ -1763,6 +2154,11 @@ func awsAwsjson11_serializeOpDocumentDescribeComponentInput(v *DescribeComponent object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ComponentName != nil { ok := object.Key("ComponentName") ok.String(*v.ComponentName) @@ -1780,6 +2176,11 @@ func awsAwsjson11_serializeOpDocumentDescribeLogPatternInput(v *DescribeLogPatte object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.PatternName != nil { ok := object.Key("PatternName") ok.String(*v.PatternName) @@ -1802,6 +2203,11 @@ func awsAwsjson11_serializeOpDocumentDescribeObservationInput(v *DescribeObserva object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ObservationId != nil { ok := object.Key("ObservationId") ok.String(*v.ObservationId) @@ -1814,6 +2220,11 @@ func awsAwsjson11_serializeOpDocumentDescribeProblemInput(v *DescribeProblemInpu object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ProblemId != nil { ok := object.Key("ProblemId") ok.String(*v.ProblemId) @@ -1826,6 +2237,11 @@ func awsAwsjson11_serializeOpDocumentDescribeProblemObservationsInput(v *Describ object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ProblemId != nil { ok := object.Key("ProblemId") ok.String(*v.ProblemId) @@ -1834,10 +2250,42 @@ func awsAwsjson11_serializeOpDocumentDescribeProblemObservationsInput(v *Describ return nil } +func awsAwsjson11_serializeOpDocumentDescribeWorkloadInput(v *DescribeWorkloadInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + + if v.ComponentName != nil { + ok := object.Key("ComponentName") + ok.String(*v.ComponentName) + } + + if v.ResourceGroupName != nil { + ok := object.Key("ResourceGroupName") + ok.String(*v.ResourceGroupName) + } + + if v.WorkloadId != nil { + ok := object.Key("WorkloadId") + ok.String(*v.WorkloadId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListApplicationsInput(v *ListApplicationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -1855,6 +2303,11 @@ func awsAwsjson11_serializeOpDocumentListComponentsInput(v *ListComponentsInput, object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -1877,6 +2330,11 @@ func awsAwsjson11_serializeOpDocumentListConfigurationHistoryInput(v *ListConfig object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.EndTime != nil { ok := object.Key("EndTime") ok.Double(smithytime.FormatEpochSeconds(*v.EndTime)) @@ -1914,6 +2372,11 @@ func awsAwsjson11_serializeOpDocumentListLogPatternSetsInput(v *ListLogPatternSe object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -1936,6 +2399,11 @@ func awsAwsjson11_serializeOpDocumentListLogPatternsInput(v *ListLogPatternsInpu object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) @@ -1963,6 +2431,11 @@ func awsAwsjson11_serializeOpDocumentListProblemsInput(v *ListProblemsInput, val object := value.Object() defer object.Close() + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + if v.ComponentName != nil { ok := object.Key("ComponentName") ok.String(*v.ComponentName) @@ -1993,6 +2466,11 @@ func awsAwsjson11_serializeOpDocumentListProblemsInput(v *ListProblemsInput, val ok.Double(smithytime.FormatEpochSeconds(*v.StartTime)) } + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + return nil } @@ -2008,6 +2486,60 @@ func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForReso return nil } +func awsAwsjson11_serializeOpDocumentListWorkloadsInput(v *ListWorkloadsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("AccountId") + ok.String(*v.AccountId) + } + + if v.ComponentName != nil { + ok := object.Key("ComponentName") + ok.String(*v.ComponentName) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.ResourceGroupName != nil { + ok := object.Key("ResourceGroupName") + ok.String(*v.ResourceGroupName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRemoveWorkloadInput(v *RemoveWorkloadInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ComponentName != nil { + ok := object.Key("ComponentName") + ok.String(*v.ComponentName) + } + + if v.ResourceGroupName != nil { + ok := object.Key("ResourceGroupName") + ok.String(*v.ResourceGroupName) + } + + if v.WorkloadId != nil { + ok := object.Key("WorkloadId") + ok.String(*v.WorkloadId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2180,3 +2712,54 @@ func awsAwsjson11_serializeOpDocumentUpdateLogPatternInput(v *UpdateLogPatternIn return nil } + +func awsAwsjson11_serializeOpDocumentUpdateProblemInput(v *UpdateProblemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProblemId != nil { + ok := object.Key("ProblemId") + ok.String(*v.ProblemId) + } + + if len(v.UpdateStatus) > 0 { + ok := object.Key("UpdateStatus") + ok.String(string(v.UpdateStatus)) + } + + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateWorkloadInput(v *UpdateWorkloadInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ComponentName != nil { + ok := object.Key("ComponentName") + ok.String(*v.ComponentName) + } + + if v.ResourceGroupName != nil { + ok := object.Key("ResourceGroupName") + ok.String(*v.ResourceGroupName) + } + + if v.WorkloadConfiguration != nil { + ok := object.Key("WorkloadConfiguration") + if err := awsAwsjson11_serializeDocumentWorkloadConfiguration(v.WorkloadConfiguration, ok); err != nil { + return err + } + } + + if v.WorkloadId != nil { + ok := object.Key("WorkloadId") + ok.String(*v.WorkloadId) + } + + return nil +} diff --git a/service/applicationinsights/types/enums.go b/service/applicationinsights/types/enums.go index 16de3ef1b4f..935b47c9885 100644 --- a/service/applicationinsights/types/enums.go +++ b/service/applicationinsights/types/enums.go @@ -175,6 +175,46 @@ func (OsType) Values() []OsType { } } +type RecommendationType string + +// Enum values for RecommendationType +const ( + RecommendationTypeInfraOnly RecommendationType = "INFRA_ONLY" + RecommendationTypeWorkloadOnly RecommendationType = "WORKLOAD_ONLY" + RecommendationTypeAll RecommendationType = "ALL" +) + +// Values returns all known values for RecommendationType. 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 (RecommendationType) Values() []RecommendationType { + return []RecommendationType{ + "INFRA_ONLY", + "WORKLOAD_ONLY", + "ALL", + } +} + +type ResolutionMethod string + +// Enum values for ResolutionMethod +const ( + ResolutionMethodManual ResolutionMethod = "MANUAL" + ResolutionMethodAutomatic ResolutionMethod = "AUTOMATIC" + ResolutionMethodUnresolved ResolutionMethod = "UNRESOLVED" +) + +// Values returns all known values for ResolutionMethod. 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 (ResolutionMethod) Values() []ResolutionMethod { + return []ResolutionMethod{ + "MANUAL", + "AUTOMATIC", + "UNRESOLVED", + } +} + type SeverityLevel string // Enum values for SeverityLevel @@ -201,10 +241,11 @@ type Status string // Enum values for Status const ( - StatusIgnore Status = "IGNORE" - StatusResolved Status = "RESOLVED" - StatusPending Status = "PENDING" - StatusRecurring Status = "RECURRING" + StatusIgnore Status = "IGNORE" + StatusResolved Status = "RESOLVED" + StatusPending Status = "PENDING" + StatusRecurring Status = "RECURRING" + StatusRecovering Status = "RECOVERING" ) // Values returns all known values for Status. Note that this can be expanded in @@ -216,6 +257,7 @@ func (Status) Values() []Status { "RESOLVED", "PENDING", "RECURRING", + "RECOVERING", } } @@ -241,6 +283,9 @@ const ( TierSqlServerFailoverClusterInstance Tier = "SQL_SERVER_FAILOVER_CLUSTER_INSTANCE" TierSharepoint Tier = "SHAREPOINT" TierActiveDirectory Tier = "ACTIVE_DIRECTORY" + TierSapNetweaverStandard Tier = "SAP_NETWEAVER_STANDARD" + TierSapNetweaverDistributed Tier = "SAP_NETWEAVER_DISTRIBUTED" + TierSapNetweaverHighAvailability Tier = "SAP_NETWEAVER_HIGH_AVAILABILITY" ) // Values returns all known values for Tier. Note that this can be expanded in the @@ -266,5 +311,42 @@ func (Tier) Values() []Tier { "SQL_SERVER_FAILOVER_CLUSTER_INSTANCE", "SHAREPOINT", "ACTIVE_DIRECTORY", + "SAP_NETWEAVER_STANDARD", + "SAP_NETWEAVER_DISTRIBUTED", + "SAP_NETWEAVER_HIGH_AVAILABILITY", + } +} + +type UpdateStatus string + +// Enum values for UpdateStatus +const ( + UpdateStatusResolved UpdateStatus = "RESOLVED" +) + +// Values returns all known values for UpdateStatus. 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 (UpdateStatus) Values() []UpdateStatus { + return []UpdateStatus{ + "RESOLVED", + } +} + +type Visibility string + +// Enum values for Visibility +const ( + VisibilityIgnored Visibility = "IGNORED" + VisibilityVisible Visibility = "VISIBLE" +) + +// Values returns all known values for Visibility. 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 (Visibility) Values() []Visibility { + return []Visibility{ + "IGNORED", + "VISIBLE", } } diff --git a/service/applicationinsights/types/types.go b/service/applicationinsights/types/types.go index e3d209206ac..bf272a703a6 100644 --- a/service/applicationinsights/types/types.go +++ b/service/applicationinsights/types/types.go @@ -40,6 +40,9 @@ type ApplicationComponent struct { // Describes the status of the application. type ApplicationInfo struct { + // The AWS account ID for the owner of the application. + AccountId *string + // Indicates whether auto-configuration is turned on for this application. AutoConfigEnabled *bool @@ -77,6 +80,10 @@ type ApplicationInfo struct { // The event information. type ConfigurationEvent struct { + // The AWS account ID for the owner of the application to which the configuration + // event belongs. + AccountId *string + // The details of the event in plain text. EventDetail *string @@ -97,6 +104,10 @@ type ConfigurationEvent struct { // The resource monitored by Application Insights. MonitoredResourceARN *string + // The name of the resource group of the application to which the configuration + // event belongs. + ResourceGroupName *string + noSmithyDocumentSerde } @@ -282,6 +293,9 @@ type Observation struct { // Describes a problem that is detected by correlating observations. type Problem struct { + // The AWS account ID for the owner of the resource group affected by the problem. + AccountId *string + // The resource affected by the problem. AffectedResource *string @@ -304,6 +318,11 @@ type Problem struct { // was resolved. RecurringCount *int64 + // Specifies how the problem was resolved. If the value is AUTOMATIC , the system + // resolved the problem. If the value is MANUAL , the user resolved the problem. If + // the value is UNRESOLVED , then the problem is not resolved. + ResolutionMethod ResolutionMethod + // The name of the resource group affected by the problem. ResourceGroupName *string @@ -319,6 +338,10 @@ type Problem struct { // The name of the problem. Title *string + // Specifies whether or not you can view the problem. Updates to ignored problems + // do not generate notifications. + Visibility Visibility + noSmithyDocumentSerde } @@ -366,4 +389,41 @@ type Tag struct { noSmithyDocumentSerde } +// Describes the workloads on a component. +type Workload struct { + + // The name of the component. + ComponentName *string + + // The tier of the workload. + Tier Tier + + // The ID of the workload. + WorkloadId *string + + // The name of the workload. + WorkloadName *string + + // If logging is supported for the resource type, shows whether the component has + // configured logs to be monitored. + WorkloadRemarks *string + + noSmithyDocumentSerde +} + +// The configuration of the workload. +type WorkloadConfiguration struct { + + // The configuration settings of the workload. + Configuration *string + + // The configuration of the workload tier. + Tier Tier + + // The name of the workload. + WorkloadName *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/applicationinsights/validators.go b/service/applicationinsights/validators.go index c1c379ebcee..94177df796d 100644 --- a/service/applicationinsights/validators.go +++ b/service/applicationinsights/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAddWorkload struct { +} + +func (*validateOpAddWorkload) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddWorkload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddWorkloadInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddWorkloadInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateApplication struct { } @@ -290,6 +310,26 @@ func (m *validateOpDescribeProblemObservations) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpDescribeWorkload struct { +} + +func (*validateOpDescribeWorkload) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeWorkload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeWorkloadInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeWorkloadInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListComponents struct { } @@ -370,6 +410,46 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListWorkloads struct { +} + +func (*validateOpListWorkloads) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListWorkloads) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListWorkloadsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListWorkloadsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveWorkload struct { +} + +func (*validateOpRemoveWorkload) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveWorkload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveWorkloadInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveWorkloadInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpTagResource struct { } @@ -490,6 +570,50 @@ func (m *validateOpUpdateLogPattern) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpUpdateProblem struct { +} + +func (*validateOpUpdateProblem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProblem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProblemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProblemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateWorkload struct { +} + +func (*validateOpUpdateWorkload) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateWorkload) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateWorkloadInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateWorkloadInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAddWorkloadValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddWorkload{}, middleware.After) +} + func addOpCreateApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateApplication{}, middleware.After) } @@ -546,6 +670,10 @@ func addOpDescribeProblemObservationsValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpDescribeProblemObservations{}, middleware.After) } +func addOpDescribeWorkloadValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeWorkload{}, middleware.After) +} + func addOpListComponentsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListComponents{}, middleware.After) } @@ -562,6 +690,14 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpListWorkloadsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListWorkloads{}, middleware.After) +} + +func addOpRemoveWorkloadValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveWorkload{}, middleware.After) +} + func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } @@ -586,6 +722,14 @@ func addOpUpdateLogPatternValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateLogPattern{}, middleware.After) } +func addOpUpdateProblemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProblem{}, middleware.After) +} + +func addOpUpdateWorkloadValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateWorkload{}, middleware.After) +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -621,6 +765,27 @@ func validateTagList(v []types.Tag) error { } } +func validateOpAddWorkloadInput(v *AddWorkloadInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddWorkloadInput"} + if v.ResourceGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceGroupName")) + } + if v.ComponentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentName")) + } + if v.WorkloadConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadConfiguration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateApplicationInput(v *CreateApplicationInput) error { if v == nil { return nil @@ -875,6 +1040,27 @@ func validateOpDescribeProblemObservationsInput(v *DescribeProblemObservationsIn } } +func validateOpDescribeWorkloadInput(v *DescribeWorkloadInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeWorkloadInput"} + if v.ResourceGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceGroupName")) + } + if v.ComponentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentName")) + } + if v.WorkloadId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListComponentsInput(v *ListComponentsInput) error { if v == nil { return nil @@ -935,6 +1121,45 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpListWorkloadsInput(v *ListWorkloadsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListWorkloadsInput"} + if v.ResourceGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceGroupName")) + } + if v.ComponentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveWorkloadInput(v *RemoveWorkloadInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveWorkloadInput"} + if v.ResourceGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceGroupName")) + } + if v.ComponentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentName")) + } + if v.WorkloadId == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil @@ -1046,3 +1271,39 @@ func validateOpUpdateLogPatternInput(v *UpdateLogPatternInput) error { return nil } } + +func validateOpUpdateProblemInput(v *UpdateProblemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProblemInput"} + if v.ProblemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProblemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateWorkloadInput(v *UpdateWorkloadInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateWorkloadInput"} + if v.ResourceGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceGroupName")) + } + if v.ComponentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentName")) + } + if v.WorkloadConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkloadConfiguration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/cloudformation/api_op_CreateStack.go b/service/cloudformation/api_op_CreateStack.go index 820a78902ee..3ae50528059 100644 --- a/service/cloudformation/api_op_CreateStack.go +++ b/service/cloudformation/api_op_CreateStack.go @@ -146,6 +146,14 @@ type CreateStackInput struct { // . ResourceTypes []string + // This deletion policy deletes newly created resources, but retains existing + // resources, when a stack operation is rolled back. This ensures new, empty, and + // unused resources are deleted, while critical resources and their data are + // retained. RetainExceptOnCreate can be specified for any resource that supports + // the DeletionPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) + // attribute. + RetainExceptOnCreate *bool + // The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role // that CloudFormation assumes to create the stack. CloudFormation uses the role's // credentials to make calls on your behalf. CloudFormation always uses this role diff --git a/service/cloudformation/api_op_ExecuteChangeSet.go b/service/cloudformation/api_op_ExecuteChangeSet.go index 65a0a1c1704..6aa46e8730e 100644 --- a/service/cloudformation/api_op_ExecuteChangeSet.go +++ b/service/cloudformation/api_op_ExecuteChangeSet.go @@ -63,6 +63,14 @@ type ExecuteChangeSetInput struct { // Default: True DisableRollback *bool + // This deletion policy deletes newly created resources, but retains existing + // resources, when a stack operation is rolled back. This ensures new, empty, and + // unused resources are deleted, while critical resources and their data are + // retained. RetainExceptOnCreate can be specified for any resource that supports + // the DeletionPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) + // attribute. + RetainExceptOnCreate *bool + // If you specified the name of a change set, specify the stack name or Amazon // Resource Name (ARN) that's associated with the change set you want to execute. StackName *string diff --git a/service/cloudformation/api_op_RollbackStack.go b/service/cloudformation/api_op_RollbackStack.go index 857602b99d4..5dfe3116910 100644 --- a/service/cloudformation/api_op_RollbackStack.go +++ b/service/cloudformation/api_op_RollbackStack.go @@ -47,6 +47,14 @@ type RollbackStackInput struct { // A unique identifier for this RollbackStack request. ClientRequestToken *string + // This deletion policy deletes newly created resources, but retains existing + // resources, when a stack operation is rolled back. This ensures new, empty, and + // unused resources are deleted, while critical resources and their data are + // retained. RetainExceptOnCreate can be specified for any resource that supports + // the DeletionPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) + // attribute. + RetainExceptOnCreate *bool + // The Amazon Resource Name (ARN) of an Identity and Access Management role that // CloudFormation assumes to rollback the stack. RoleARN *string diff --git a/service/cloudformation/api_op_UpdateStack.go b/service/cloudformation/api_op_UpdateStack.go index d552653a276..7e54dff0b2c 100644 --- a/service/cloudformation/api_op_UpdateStack.go +++ b/service/cloudformation/api_op_UpdateStack.go @@ -128,6 +128,14 @@ type UpdateStackInput struct { // . ResourceTypes []string + // This deletion policy deletes newly created resources, but retains existing + // resources, when a stack operation is rolled back. This ensures new, empty, and + // unused resources are deleted, while critical resources and their data are + // retained. RetainExceptOnCreate can be specified for any resource that supports + // the DeletionPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) + // attribute. + RetainExceptOnCreate *bool + // The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role // that CloudFormation assumes to update the stack. CloudFormation uses the role's // credentials to make calls on your behalf. CloudFormation always uses this role diff --git a/service/cloudformation/deserializers.go b/service/cloudformation/deserializers.go index 65c7b41d470..c29f22c40b8 100644 --- a/service/cloudformation/deserializers.go +++ b/service/cloudformation/deserializers.go @@ -13494,6 +13494,22 @@ func awsAwsquery_deserializeDocumentStack(v **types.Stack, decoder smithyxml.Nod sv.ParentId = ptr.String(xtv) } + case strings.EqualFold("RetainExceptOnCreate", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected RetainExceptOnCreate to be of type *bool, got %T instead", val) + } + sv.RetainExceptOnCreate = ptr.Bool(xtv) + } + case strings.EqualFold("RoleARN", t.Name.Local): val, err := decoder.Value() if err != nil { diff --git a/service/cloudformation/serializers.go b/service/cloudformation/serializers.go index fc411c1dafc..97b7466494a 100644 --- a/service/cloudformation/serializers.go +++ b/service/cloudformation/serializers.go @@ -5319,6 +5319,11 @@ func awsAwsquery_serializeOpDocumentCreateStackInput(v *CreateStackInput, value } } + if v.RetainExceptOnCreate != nil { + objectKey := object.Key("RetainExceptOnCreate") + objectKey.Boolean(*v.RetainExceptOnCreate) + } + if v.RoleARN != nil { objectKey := object.Key("RoleARN") objectKey.String(*v.RoleARN) @@ -6116,6 +6121,11 @@ func awsAwsquery_serializeOpDocumentExecuteChangeSetInput(v *ExecuteChangeSetInp objectKey.Boolean(*v.DisableRollback) } + if v.RetainExceptOnCreate != nil { + objectKey := object.Key("RetainExceptOnCreate") + objectKey.Boolean(*v.RetainExceptOnCreate) + } + if v.StackName != nil { objectKey := object.Key("StackName") objectKey.String(*v.StackName) @@ -6770,6 +6780,11 @@ func awsAwsquery_serializeOpDocumentRollbackStackInput(v *RollbackStackInput, va objectKey.String(*v.ClientRequestToken) } + if v.RetainExceptOnCreate != nil { + objectKey := object.Key("RetainExceptOnCreate") + objectKey.Boolean(*v.RetainExceptOnCreate) + } + if v.RoleARN != nil { objectKey := object.Key("RoleARN") objectKey.String(*v.RoleARN) @@ -6987,6 +7002,11 @@ func awsAwsquery_serializeOpDocumentUpdateStackInput(v *UpdateStackInput, value } } + if v.RetainExceptOnCreate != nil { + objectKey := object.Key("RetainExceptOnCreate") + objectKey.Boolean(*v.RetainExceptOnCreate) + } + if v.RoleARN != nil { objectKey := object.Key("RoleARN") objectKey.String(*v.RoleARN) diff --git a/service/cloudformation/types/types.go b/service/cloudformation/types/types.go index 57f96f98710..f0f10ab94a4 100644 --- a/service/cloudformation/types/types.go +++ b/service/cloudformation/types/types.go @@ -835,6 +835,14 @@ type Stack struct { // in the CloudFormation User Guide. ParentId *string + // This deletion policy deletes newly created resources, but retains existing + // resources, when a stack operation is rolled back. This ensures new, empty, and + // unused resources are deleted, while critical resources and their data are + // retained. RetainExceptOnCreate can be specified for any resource that supports + // the DeletionPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) + // attribute. + RetainExceptOnCreate *bool + // The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role // that's associated with the stack. During a stack operation, CloudFormation uses // this role's credentials to make calls on your behalf. diff --git a/service/cloudfront/api_op_CopyDistribution.go b/service/cloudfront/api_op_CopyDistribution.go index b62464df939..337204e4064 100644 --- a/service/cloudfront/api_op_CopyDistribution.go +++ b/service/cloudfront/api_op_CopyDistribution.go @@ -17,7 +17,11 @@ import ( // workflow. After you create a staging distribution, you can use // UpdateDistribution to modify the staging distribution's configuration. Then you // can use CreateContinuousDeploymentPolicy to incrementally move traffic to the -// staging distribution. +// staging distribution. This API operation requires the following IAM permissions: +// +// - GetDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html) +// - CreateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html) +// - CopyDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CopyDistribution.html) func (c *Client) CopyDistribution(ctx context.Context, params *CopyDistributionInput, optFns ...func(*Options)) (*CopyDistributionOutput, error) { if params == nil { params = &CopyDistributionInput{} @@ -48,6 +52,12 @@ type CopyDistributionInput struct { // This member is required. PrimaryDistributionId *string + // A Boolean flag to specify the state of the staging distribution when it's + // created. When you set this value to True , the staging distribution is enabled. + // When you set this value to False , the staging distribution is disabled. If you + // omit this field, the default value is True . + Enabled *bool + // The version identifier of the primary distribution whose configuration you are // copying. This is the ETag value returned in the response to GetDistribution and // GetDistributionConfig . diff --git a/service/cloudfront/api_op_CreateDistributionWithTags.go b/service/cloudfront/api_op_CreateDistributionWithTags.go index 10c2a0f090d..62c020ab1bd 100644 --- a/service/cloudfront/api_op_CreateDistributionWithTags.go +++ b/service/cloudfront/api_op_CreateDistributionWithTags.go @@ -11,7 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Create a new distribution with tags. +// Create a new distribution with tags. This API operation requires the following +// IAM permissions: +// - CreateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateDistribution.html) +// - TagResource (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_TagResource.html) func (c *Client) CreateDistributionWithTags(ctx context.Context, params *CreateDistributionWithTagsInput, optFns ...func(*Options)) (*CreateDistributionWithTagsOutput, error) { if params == nil { params = &CreateDistributionWithTagsInput{} diff --git a/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go b/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go index 9e2ef91f9e5..9fba823f6bb 100644 --- a/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go +++ b/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go @@ -21,7 +21,10 @@ import ( // the staging distribution and verifying that it works as intended, you can use // this operation to copy the staging distribution's configuration to the primary // distribution. This action will disable the continuous deployment policy and move -// your domain's traffic back to the primary distribution. +// your domain's traffic back to the primary distribution. This API operation +// requires the following IAM permissions: +// - GetDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_GetDistribution.html) +// - UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html) func (c *Client) UpdateDistributionWithStagingConfig(ctx context.Context, params *UpdateDistributionWithStagingConfigInput, optFns ...func(*Options)) (*UpdateDistributionWithStagingConfigOutput, error) { if params == nil { params = &UpdateDistributionWithStagingConfigInput{} diff --git a/service/cloudfront/deserializers.go b/service/cloudfront/deserializers.go index ff49b394f81..40937d96eae 100644 --- a/service/cloudfront/deserializers.go +++ b/service/cloudfront/deserializers.go @@ -336,6 +336,9 @@ func awsRestxml_deserializeOpErrorCopyDistribution(response *smithyhttp.Response case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) @@ -1431,6 +1434,9 @@ func awsRestxml_deserializeOpErrorCreateDistributionWithTags(response *smithyhtt case strings.EqualFold("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior", errorCode): return awsRestxml_deserializeErrorIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(response, errorBody) + case strings.EqualFold("IllegalOriginAccessConfiguration", errorCode): + return awsRestxml_deserializeErrorIllegalOriginAccessConfiguration(response, errorBody) + case strings.EqualFold("InconsistentQuantities", errorCode): return awsRestxml_deserializeErrorInconsistentQuantities(response, errorBody) @@ -1560,6 +1566,9 @@ func awsRestxml_deserializeOpErrorCreateDistributionWithTags(response *smithyhtt case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) @@ -14117,6 +14126,9 @@ func awsRestxml_deserializeOpErrorUpdateDistribution(response *smithyhttp.Respon case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) @@ -14448,6 +14460,9 @@ func awsRestxml_deserializeOpErrorUpdateDistributionWithStagingConfig(response * case strings.EqualFold("TooManyDistributionsAssociatedToKeyGroup", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToKeyGroup(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginAccessControl", errorCode): + return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginAccessControl(response, errorBody) + case strings.EqualFold("TooManyDistributionsAssociatedToOriginRequestPolicy", errorCode): return awsRestxml_deserializeErrorTooManyDistributionsAssociatedToOriginRequestPolicy(response, errorBody) diff --git a/service/cloudfront/serializers.go b/service/cloudfront/serializers.go index 5613ca404da..9133c82c5b0 100644 --- a/service/cloudfront/serializers.go +++ b/service/cloudfront/serializers.go @@ -176,6 +176,17 @@ func awsRestxml_serializeOpDocumentCopyDistributionInput(v *CopyDistributionInpu el := value.MemberElement(root) el.String(*v.CallerReference) } + if v.Enabled != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "Enabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(*v.Enabled) + } return nil } diff --git a/service/cloudfront/types/enums.go b/service/cloudfront/types/enums.go index 4463e086520..25e3bbb686d 100644 --- a/service/cloudfront/types/enums.go +++ b/service/cloudfront/types/enums.go @@ -183,6 +183,7 @@ type FunctionRuntime string // Enum values for FunctionRuntime const ( FunctionRuntimeCloudfrontJs10 FunctionRuntime = "cloudfront-js-1.0" + FunctionRuntimeCloudfrontJs20 FunctionRuntime = "cloudfront-js-2.0" ) // Values returns all known values for FunctionRuntime. Note that this can be @@ -191,6 +192,7 @@ const ( func (FunctionRuntime) Values() []FunctionRuntime { return []FunctionRuntime{ "cloudfront-js-1.0", + "cloudfront-js-2.0", } } diff --git a/service/cloudfront/types/types.go b/service/cloudfront/types/types.go index 809453c1ebc..39d155f97c0 100644 --- a/service/cloudfront/types/types.go +++ b/service/cloudfront/types/types.go @@ -36,9 +36,8 @@ type ActiveTrustedKeyGroups struct { // signed cookies. type ActiveTrustedSigners struct { - // This field is true if any of the Amazon Web Services accounts in the list have - // active CloudFront key pairs that CloudFront can use to verify the signatures of - // signed URLs and signed cookies. If not, this field is false . + // This field is true if any of the Amazon Web Services accounts in the list are + // configured as trusted signers. If not, this field is false . // // This member is required. Enabled *bool @@ -2218,7 +2217,7 @@ type FunctionConfig struct { // This member is required. Comment *string - // The function's runtime environment. The only valid value is cloudfront-js-1.0 . + // The function's runtime environment verion. // // This member is required. Runtime FunctionRuntime @@ -4774,9 +4773,8 @@ type TrustedKeyGroups struct { // verify the signatures of signed URLs and signed cookies. type TrustedSigners struct { - // This field is true if any of the Amazon Web Services accounts have public keys - // that CloudFront can use to verify the signatures of signed URLs and signed - // cookies. If not, this field is false . + // This field is true if any of the Amazon Web Services accounts in the list are + // configured as trusted signers. If not, this field is false . // // This member is required. Enabled *bool diff --git a/service/connect/types/enums.go b/service/connect/types/enums.go index 6cc97a20e4a..3c931b732b8 100644 --- a/service/connect/types/enums.go +++ b/service/connect/types/enums.go @@ -1372,8 +1372,12 @@ type PhoneNumberType string // Enum values for PhoneNumberType const ( - PhoneNumberTypeTollFree PhoneNumberType = "TOLL_FREE" - PhoneNumberTypeDid PhoneNumberType = "DID" + PhoneNumberTypeTollFree PhoneNumberType = "TOLL_FREE" + PhoneNumberTypeDid PhoneNumberType = "DID" + PhoneNumberTypeUifn PhoneNumberType = "UIFN" + PhoneNumberTypeShared PhoneNumberType = "SHARED" + PhoneNumberTypeThirdPartyTf PhoneNumberType = "THIRD_PARTY_TF" + PhoneNumberTypeThirdPartyDid PhoneNumberType = "THIRD_PARTY_DID" ) // Values returns all known values for PhoneNumberType. Note that this can be @@ -1383,6 +1387,10 @@ func (PhoneNumberType) Values() []PhoneNumberType { return []PhoneNumberType{ "TOLL_FREE", "DID", + "UIFN", + "SHARED", + "THIRD_PARTY_TF", + "THIRD_PARTY_DID", } } diff --git a/service/drs/internal/endpoints/endpoints.go b/service/drs/internal/endpoints/endpoints.go index 05f7b08f933..041562daf6f 100644 --- a/service/drs/internal/endpoints/endpoints.go +++ b/service/drs/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -166,18 +169,27 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, @@ -187,6 +199,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/glue/internal/endpoints/endpoints.go b/service/glue/internal/endpoints/endpoints.go index fa36a0c2e6e..b800890e8d2 100644 --- a/service/glue/internal/endpoints/endpoints.go +++ b/service/glue/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -166,6 +169,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/kafka/api_op_DescribeClusterOperationV2.go b/service/kafka/api_op_DescribeClusterOperationV2.go new file mode 100644 index 00000000000..fc003b0ac95 --- /dev/null +++ b/service/kafka/api_op_DescribeClusterOperationV2.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package kafka + +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/kafka/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a description of the cluster operation specified by the ARN. +func (c *Client) DescribeClusterOperationV2(ctx context.Context, params *DescribeClusterOperationV2Input, optFns ...func(*Options)) (*DescribeClusterOperationV2Output, error) { + if params == nil { + params = &DescribeClusterOperationV2Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeClusterOperationV2", params, optFns, c.addOperationDescribeClusterOperationV2Middlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeClusterOperationV2Output) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeClusterOperationV2Input struct { + + // ARN of the cluster operation to describe. + // + // This member is required. + ClusterOperationArn *string + + noSmithyDocumentSerde +} + +type DescribeClusterOperationV2Output struct { + + // Cluster operation information + ClusterOperationInfo *types.ClusterOperationV2 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeClusterOperationV2Middlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeClusterOperationV2{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeClusterOperationV2{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeClusterOperationV2ValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterOperationV2(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeClusterOperationV2(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "kafka", + OperationName: "DescribeClusterOperationV2", + } +} diff --git a/service/kafka/api_op_ListClusterOperationsV2.go b/service/kafka/api_op_ListClusterOperationsV2.go new file mode 100644 index 00000000000..6fa40a67430 --- /dev/null +++ b/service/kafka/api_op_ListClusterOperationsV2.go @@ -0,0 +1,225 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package kafka + +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/kafka/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all the operations that have been performed on the specified +// MSK cluster. +func (c *Client) ListClusterOperationsV2(ctx context.Context, params *ListClusterOperationsV2Input, optFns ...func(*Options)) (*ListClusterOperationsV2Output, error) { + if params == nil { + params = &ListClusterOperationsV2Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListClusterOperationsV2", params, optFns, c.addOperationListClusterOperationsV2Middlewares) + if err != nil { + return nil, err + } + + out := result.(*ListClusterOperationsV2Output) + out.ResultMetadata = metadata + return out, nil +} + +type ListClusterOperationsV2Input struct { + + // The arn of the cluster whose operations are being requested. + // + // This member is required. + ClusterArn *string + + // The maxResults of the query. + MaxResults int32 + + // The nextToken of the query. + NextToken *string + + noSmithyDocumentSerde +} + +type ListClusterOperationsV2Output struct { + + // An array of cluster operation information objects. + ClusterOperationInfoList []types.ClusterOperationV2Summary + + // If the response of ListClusterOperationsV2 is truncated, it returns a NextToken + // in the response. This NextToken should be sent in the subsequent request to + // ListClusterOperationsV2. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListClusterOperationsV2Middlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListClusterOperationsV2{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListClusterOperationsV2{}, 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, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListClusterOperationsV2ValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusterOperationsV2(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListClusterOperationsV2APIClient is a client that implements the +// ListClusterOperationsV2 operation. +type ListClusterOperationsV2APIClient interface { + ListClusterOperationsV2(context.Context, *ListClusterOperationsV2Input, ...func(*Options)) (*ListClusterOperationsV2Output, error) +} + +var _ ListClusterOperationsV2APIClient = (*Client)(nil) + +// ListClusterOperationsV2PaginatorOptions is the paginator options for +// ListClusterOperationsV2 +type ListClusterOperationsV2PaginatorOptions struct { + // The maxResults of the query. + 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 +} + +// ListClusterOperationsV2Paginator is a paginator for ListClusterOperationsV2 +type ListClusterOperationsV2Paginator struct { + options ListClusterOperationsV2PaginatorOptions + client ListClusterOperationsV2APIClient + params *ListClusterOperationsV2Input + nextToken *string + firstPage bool +} + +// NewListClusterOperationsV2Paginator returns a new +// ListClusterOperationsV2Paginator +func NewListClusterOperationsV2Paginator(client ListClusterOperationsV2APIClient, params *ListClusterOperationsV2Input, optFns ...func(*ListClusterOperationsV2PaginatorOptions)) *ListClusterOperationsV2Paginator { + if params == nil { + params = &ListClusterOperationsV2Input{} + } + + options := ListClusterOperationsV2PaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListClusterOperationsV2Paginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListClusterOperationsV2Paginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListClusterOperationsV2 page. +func (p *ListClusterOperationsV2Paginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListClusterOperationsV2Output, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListClusterOperationsV2(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_opListClusterOperationsV2(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "kafka", + OperationName: "ListClusterOperationsV2", + } +} diff --git a/service/kafka/deserializers.go b/service/kafka/deserializers.go index 6264416987d..27cfe3b1b19 100644 --- a/service/kafka/deserializers.go +++ b/service/kafka/deserializers.go @@ -2096,6 +2096,171 @@ func awsRestjson1_deserializeOpDocumentDescribeClusterOperationOutput(v **Descri return nil } +type awsRestjson1_deserializeOpDescribeClusterOperationV2 struct { +} + +func (*awsRestjson1_deserializeOpDescribeClusterOperationV2) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeClusterOperationV2) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeClusterOperationV2(response, &metadata) + } + output := &DescribeClusterOperationV2Output{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeClusterOperationV2Output(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeClusterOperationV2(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeClusterOperationV2Output(v **DescribeClusterOperationV2Output, 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 *DescribeClusterOperationV2Output + if *v == nil { + sv = &DescribeClusterOperationV2Output{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clusterOperationInfo": + if err := awsRestjson1_deserializeDocumentClusterOperationV2(&sv.ClusterOperationInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDescribeClusterV2 struct { } @@ -3493,14 +3658,182 @@ func awsRestjson1_deserializeOpDocumentGetCompatibleKafkaVersionsOutput(v **GetC return nil } -type awsRestjson1_deserializeOpListClientVpcConnections struct { +type awsRestjson1_deserializeOpListClientVpcConnections struct { +} + +func (*awsRestjson1_deserializeOpListClientVpcConnections) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListClientVpcConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListClientVpcConnections(response, &metadata) + } + output := &ListClientVpcConnectionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListClientVpcConnectionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListClientVpcConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListClientVpcConnectionsOutput(v **ListClientVpcConnectionsOutput, 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 *ListClientVpcConnectionsOutput + if *v == nil { + sv = &ListClientVpcConnectionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientVpcConnections": + if err := awsRestjson1_deserializeDocument__listOfClientVpcConnection(&sv.ClientVpcConnections, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListClusterOperations struct { } -func (*awsRestjson1_deserializeOpListClientVpcConnections) ID() string { +func (*awsRestjson1_deserializeOpListClusterOperations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListClientVpcConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListClusterOperations) 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) @@ -3514,9 +3847,9 @@ func (m *awsRestjson1_deserializeOpListClientVpcConnections) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListClientVpcConnections(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListClusterOperations(response, &metadata) } - output := &ListClientVpcConnectionsOutput{} + output := &ListClusterOperationsOutput{} out.Result = output var buff [1024]byte @@ -3537,7 +3870,7 @@ func (m *awsRestjson1_deserializeOpListClientVpcConnections) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListClientVpcConnectionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListClusterOperationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3550,7 +3883,7 @@ func (m *awsRestjson1_deserializeOpListClientVpcConnections) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListClientVpcConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListClusterOperations(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)} @@ -3600,9 +3933,6 @@ func awsRestjson1_deserializeOpErrorListClientVpcConnections(response *smithyhtt case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) @@ -3616,7 +3946,7 @@ func awsRestjson1_deserializeOpErrorListClientVpcConnections(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentListClientVpcConnectionsOutput(v **ListClientVpcConnectionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListClusterOperationsOutput(v **ListClusterOperationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3629,17 +3959,17 @@ func awsRestjson1_deserializeOpDocumentListClientVpcConnectionsOutput(v **ListCl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListClientVpcConnectionsOutput + var sv *ListClusterOperationsOutput if *v == nil { - sv = &ListClientVpcConnectionsOutput{} + sv = &ListClusterOperationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "clientVpcConnections": - if err := awsRestjson1_deserializeDocument__listOfClientVpcConnection(&sv.ClientVpcConnections, value); err != nil { + case "clusterOperationInfoList": + if err := awsRestjson1_deserializeDocument__listOfClusterOperationInfo(&sv.ClusterOperationInfoList, value); err != nil { return err } @@ -3661,14 +3991,14 @@ func awsRestjson1_deserializeOpDocumentListClientVpcConnectionsOutput(v **ListCl return nil } -type awsRestjson1_deserializeOpListClusterOperations struct { +type awsRestjson1_deserializeOpListClusterOperationsV2 struct { } -func (*awsRestjson1_deserializeOpListClusterOperations) ID() string { +func (*awsRestjson1_deserializeOpListClusterOperationsV2) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListClusterOperations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListClusterOperationsV2) 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) @@ -3682,9 +4012,9 @@ func (m *awsRestjson1_deserializeOpListClusterOperations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListClusterOperations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListClusterOperationsV2(response, &metadata) } - output := &ListClusterOperationsOutput{} + output := &ListClusterOperationsV2Output{} out.Result = output var buff [1024]byte @@ -3705,7 +4035,7 @@ func (m *awsRestjson1_deserializeOpListClusterOperations) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListClusterOperationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListClusterOperationsV2Output(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3718,7 +4048,7 @@ func (m *awsRestjson1_deserializeOpListClusterOperations) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListClusterOperations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListClusterOperationsV2(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)} @@ -3768,6 +4098,15 @@ func awsRestjson1_deserializeOpErrorListClusterOperations(response *smithyhttp.R case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) @@ -3781,7 +4120,7 @@ func awsRestjson1_deserializeOpErrorListClusterOperations(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListClusterOperationsOutput(v **ListClusterOperationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListClusterOperationsV2Output(v **ListClusterOperationsV2Output, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3794,9 +4133,9 @@ func awsRestjson1_deserializeOpDocumentListClusterOperationsOutput(v **ListClust return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListClusterOperationsOutput + var sv *ListClusterOperationsV2Output if *v == nil { - sv = &ListClusterOperationsOutput{} + sv = &ListClusterOperationsV2Output{} } else { sv = *v } @@ -3804,7 +4143,7 @@ func awsRestjson1_deserializeOpDocumentListClusterOperationsOutput(v **ListClust for key, value := range shape { switch key { case "clusterOperationInfoList": - if err := awsRestjson1_deserializeDocument__listOfClusterOperationInfo(&sv.ClusterOperationInfoList, value); err != nil { + if err := awsRestjson1_deserializeDocument__listOfClusterOperationV2Summary(&sv.ClusterOperationInfoList, value); err != nil { return err } @@ -8217,6 +8556,40 @@ func awsRestjson1_deserializeDocument__listOfClusterOperationStep(v *[]types.Clu return nil } +func awsRestjson1_deserializeDocument__listOfClusterOperationV2Summary(v *[]types.ClusterOperationV2Summary, 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.ClusterOperationV2Summary + if *v == nil { + cv = []types.ClusterOperationV2Summary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ClusterOperationV2Summary + destAddr := &col + if err := awsRestjson1_deserializeDocumentClusterOperationV2Summary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfCompatibleKafkaVersion(v *[]types.CompatibleKafkaVersion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9369,13 +9742,185 @@ func awsRestjson1_deserializeDocumentClusterInfo(v **types.ClusterInfo, value in sv.ZookeeperConnectString = ptr.String(jtv) } - case "zookeeperConnectStringTls": + case "zookeeperConnectStringTls": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ZookeeperConnectStringTls = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentClusterOperationInfo(v **types.ClusterOperationInfo, 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.ClusterOperationInfo + if *v == nil { + sv = &types.ClusterOperationInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clientRequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ClientRequestId = ptr.String(jtv) + } + + case "clusterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ClusterArn = ptr.String(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "endTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.EndTime = ptr.Time(t) + } + + case "errorInfo": + if err := awsRestjson1_deserializeDocumentErrorInfo(&sv.ErrorInfo, value); err != nil { + return err + } + + case "operationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OperationArn = ptr.String(jtv) + } + + case "operationState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OperationState = ptr.String(jtv) + } + + case "operationSteps": + if err := awsRestjson1_deserializeDocument__listOfClusterOperationStep(&sv.OperationSteps, value); err != nil { + return err + } + + case "operationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OperationType = ptr.String(jtv) + } + + case "sourceClusterInfo": + if err := awsRestjson1_deserializeDocumentMutableClusterInfo(&sv.SourceClusterInfo, value); err != nil { + return err + } + + case "targetClusterInfo": + if err := awsRestjson1_deserializeDocumentMutableClusterInfo(&sv.TargetClusterInfo, value); err != nil { + return err + } + + case "vpcConnectionInfo": + if err := awsRestjson1_deserializeDocumentVpcConnectionInfo(&sv.VpcConnectionInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentClusterOperationStep(v **types.ClusterOperationStep, 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.ClusterOperationStep + if *v == nil { + sv = &types.ClusterOperationStep{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "stepInfo": + if err := awsRestjson1_deserializeDocumentClusterOperationStepInfo(&sv.StepInfo, value); err != nil { + return err + } + + case "stepName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.ZookeeperConnectStringTls = ptr.String(jtv) + sv.StepName = ptr.String(jtv) } default: @@ -9387,7 +9932,7 @@ func awsRestjson1_deserializeDocumentClusterInfo(v **types.ClusterInfo, value in return nil } -func awsRestjson1_deserializeDocumentClusterOperationInfo(v **types.ClusterOperationInfo, value interface{}) error { +func awsRestjson1_deserializeDocumentClusterOperationStepInfo(v **types.ClusterOperationStepInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9400,24 +9945,55 @@ func awsRestjson1_deserializeDocumentClusterOperationInfo(v **types.ClusterOpera return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ClusterOperationInfo + var sv *types.ClusterOperationStepInfo if *v == nil { - sv = &types.ClusterOperationInfo{} + sv = &types.ClusterOperationStepInfo{} } else { sv = *v } for key, value := range shape { switch key { - case "clientRequestId": + case "stepStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.ClientRequestId = ptr.String(jtv) + sv.StepStatus = ptr.String(jtv) } + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentClusterOperationV2(v **types.ClusterOperationV2, 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.ClusterOperationV2 + if *v == nil { + sv = &types.ClusterOperationV2{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { case "clusterArn": if value != nil { jtv, ok := value.(string) @@ -9427,17 +10003,13 @@ func awsRestjson1_deserializeDocumentClusterOperationInfo(v **types.ClusterOpera sv.ClusterArn = ptr.String(jtv) } - case "creationTime": + case "clusterType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected ClusterType to be of type string, got %T instead", value) } - sv.CreationTime = ptr.Time(t) + sv.ClusterType = types.ClusterType(jtv) } case "endTime": @@ -9476,11 +10048,6 @@ func awsRestjson1_deserializeDocumentClusterOperationInfo(v **types.ClusterOpera sv.OperationState = ptr.String(jtv) } - case "operationSteps": - if err := awsRestjson1_deserializeDocument__listOfClusterOperationStep(&sv.OperationSteps, value); err != nil { - return err - } - case "operationType": if value != nil { jtv, ok := value.(string) @@ -9490,6 +10057,65 @@ func awsRestjson1_deserializeDocumentClusterOperationInfo(v **types.ClusterOpera sv.OperationType = ptr.String(jtv) } + case "provisioned": + if err := awsRestjson1_deserializeDocumentClusterOperationV2Provisioned(&sv.Provisioned, value); err != nil { + return err + } + + case "serverless": + if err := awsRestjson1_deserializeDocumentClusterOperationV2Serverless(&sv.Serverless, value); err != nil { + return err + } + + case "startTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentClusterOperationV2Provisioned(v **types.ClusterOperationV2Provisioned, 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.ClusterOperationV2Provisioned + if *v == nil { + sv = &types.ClusterOperationV2Provisioned{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "operationSteps": + if err := awsRestjson1_deserializeDocument__listOfClusterOperationStep(&sv.OperationSteps, value); err != nil { + return err + } + case "sourceClusterInfo": if err := awsRestjson1_deserializeDocumentMutableClusterInfo(&sv.SourceClusterInfo, value); err != nil { return err @@ -9514,7 +10140,7 @@ func awsRestjson1_deserializeDocumentClusterOperationInfo(v **types.ClusterOpera return nil } -func awsRestjson1_deserializeDocumentClusterOperationStep(v **types.ClusterOperationStep, value interface{}) error { +func awsRestjson1_deserializeDocumentClusterOperationV2Serverless(v **types.ClusterOperationV2Serverless, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9527,29 +10153,20 @@ func awsRestjson1_deserializeDocumentClusterOperationStep(v **types.ClusterOpera return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ClusterOperationStep + var sv *types.ClusterOperationV2Serverless if *v == nil { - sv = &types.ClusterOperationStep{} + sv = &types.ClusterOperationV2Serverless{} } else { sv = *v } for key, value := range shape { switch key { - case "stepInfo": - if err := awsRestjson1_deserializeDocumentClusterOperationStepInfo(&sv.StepInfo, value); err != nil { + case "vpcConnectionInfo": + if err := awsRestjson1_deserializeDocumentVpcConnectionInfoServerless(&sv.VpcConnectionInfo, value); err != nil { return err } - case "stepName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.StepName = ptr.String(jtv) - } - default: _, _ = key, value @@ -9559,7 +10176,7 @@ func awsRestjson1_deserializeDocumentClusterOperationStep(v **types.ClusterOpera return nil } -func awsRestjson1_deserializeDocumentClusterOperationStepInfo(v **types.ClusterOperationStepInfo, value interface{}) error { +func awsRestjson1_deserializeDocumentClusterOperationV2Summary(v **types.ClusterOperationV2Summary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9572,22 +10189,84 @@ func awsRestjson1_deserializeDocumentClusterOperationStepInfo(v **types.ClusterO return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ClusterOperationStepInfo + var sv *types.ClusterOperationV2Summary if *v == nil { - sv = &types.ClusterOperationStepInfo{} + sv = &types.ClusterOperationV2Summary{} } else { sv = *v } for key, value := range shape { switch key { - case "stepStatus": + case "clusterArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.StepStatus = ptr.String(jtv) + sv.ClusterArn = ptr.String(jtv) + } + + case "clusterType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClusterType to be of type string, got %T instead", value) + } + sv.ClusterType = types.ClusterType(jtv) + } + + case "endTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.EndTime = ptr.Time(t) + } + + case "operationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OperationArn = ptr.String(jtv) + } + + case "operationState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OperationState = ptr.String(jtv) + } + + case "operationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OperationType = ptr.String(jtv) + } + + case "startTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.StartTime = ptr.Time(t) } default: @@ -12074,6 +12753,73 @@ func awsRestjson1_deserializeDocumentVpcConnectionInfo(v **types.VpcConnectionIn return nil } +func awsRestjson1_deserializeDocumentVpcConnectionInfoServerless(v **types.VpcConnectionInfoServerless, 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.VpcConnectionInfoServerless + if *v == nil { + sv = &types.VpcConnectionInfoServerless{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "owner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Owner = ptr.String(jtv) + } + + case "userIdentity": + if err := awsRestjson1_deserializeDocumentUserIdentity(&sv.UserIdentity, value); err != nil { + return err + } + + case "vpcConnectionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.VpcConnectionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentVpcConnectivity(v **types.VpcConnectivity, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/kafka/generated.json b/service/kafka/generated.json index 99ffba87f9b..c1f930a2c8d 100644 --- a/service/kafka/generated.json +++ b/service/kafka/generated.json @@ -20,6 +20,7 @@ "api_op_DeleteVpcConnection.go", "api_op_DescribeCluster.go", "api_op_DescribeClusterOperation.go", + "api_op_DescribeClusterOperationV2.go", "api_op_DescribeClusterV2.go", "api_op_DescribeConfiguration.go", "api_op_DescribeConfigurationRevision.go", @@ -29,6 +30,7 @@ "api_op_GetCompatibleKafkaVersions.go", "api_op_ListClientVpcConnections.go", "api_op_ListClusterOperations.go", + "api_op_ListClusterOperationsV2.go", "api_op_ListClusters.go", "api_op_ListClustersV2.go", "api_op_ListConfigurationRevisions.go", diff --git a/service/kafka/serializers.go b/service/kafka/serializers.go index 30f8a3308d2..bcb3780fea6 100644 --- a/service/kafka/serializers.go +++ b/service/kafka/serializers.go @@ -942,6 +942,64 @@ func awsRestjson1_serializeOpHttpBindingsDescribeClusterOperationInput(v *Descri return nil } +type awsRestjson1_serializeOpDescribeClusterOperationV2 struct { +} + +func (*awsRestjson1_serializeOpDescribeClusterOperationV2) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeClusterOperationV2) 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.(*DescribeClusterOperationV2Input) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/api/v2/operations/{ClusterOperationArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeClusterOperationV2Input(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeClusterOperationV2Input(v *DescribeClusterOperationV2Input, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterOperationArn == nil || len(*v.ClusterOperationArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ClusterOperationArn must not be empty")} + } + if v.ClusterOperationArn != nil { + if err := encoder.SetURI("ClusterOperationArn").String(*v.ClusterOperationArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeClusterV2 struct { } @@ -1481,6 +1539,72 @@ func awsRestjson1_serializeOpHttpBindingsListClusterOperationsInput(v *ListClust return nil } +type awsRestjson1_serializeOpListClusterOperationsV2 struct { +} + +func (*awsRestjson1_serializeOpListClusterOperationsV2) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListClusterOperationsV2) 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.(*ListClusterOperationsV2Input) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/api/v2/clusters/{ClusterArn}/operations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListClusterOperationsV2Input(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListClusterOperationsV2Input(v *ListClusterOperationsV2Input, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterArn == nil || len(*v.ClusterArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ClusterArn must not be empty")} + } + if v.ClusterArn != nil { + if err := encoder.SetURI("ClusterArn").String(*v.ClusterArn); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListClusters struct { } diff --git a/service/kafka/types/types.go b/service/kafka/types/types.go index 744afd94026..7fcd704cb2f 100644 --- a/service/kafka/types/types.go +++ b/service/kafka/types/types.go @@ -341,6 +341,98 @@ type ClusterOperationStepInfo struct { noSmithyDocumentSerde } +// Returns information about a cluster operation. +type ClusterOperationV2 struct { + + // ARN of the cluster. + ClusterArn *string + + // Type of the backend cluster. + ClusterType ClusterType + + // The time at which the operation finished. + EndTime *time.Time + + // If cluster operation failed from an error, it describes the error. + ErrorInfo *ErrorInfo + + // ARN of the cluster operation. + OperationArn *string + + // State of the cluster operation. + OperationState *string + + // Type of the cluster operation. + OperationType *string + + // Properties of a provisioned cluster. + Provisioned *ClusterOperationV2Provisioned + + // Properties of a serverless cluster. + Serverless *ClusterOperationV2Serverless + + // The time at which operation was started. + StartTime *time.Time + + noSmithyDocumentSerde +} + +// Returns information about a provisioned cluster operation. +type ClusterOperationV2Provisioned struct { + + // Steps completed during the operation. + OperationSteps []ClusterOperationStep + + // Information about cluster attributes before a cluster is updated. + SourceClusterInfo *MutableClusterInfo + + // Information about cluster attributes after a cluster is updated. + TargetClusterInfo *MutableClusterInfo + + // Description of the VPC connection for CreateVpcConnection and + // DeleteVpcConnection operations. + VpcConnectionInfo *VpcConnectionInfo + + noSmithyDocumentSerde +} + +// Returns information about a serverless cluster operation. +type ClusterOperationV2Serverless struct { + + // Description of the VPC connection for CreateVpcConnection and + // DeleteVpcConnection operations. + VpcConnectionInfo *VpcConnectionInfoServerless + + noSmithyDocumentSerde +} + +// Returns information about a cluster operation. +type ClusterOperationV2Summary struct { + + // ARN of the cluster. + ClusterArn *string + + // Type of the backend cluster. + ClusterType ClusterType + + // The time at which the operation finished. + EndTime *time.Time + + // ARN of the cluster operation. + OperationArn *string + + // State of the cluster operation. + OperationState *string + + // Type of the cluster operation. + OperationType *string + + // The time at which operation was started. + StartTime *time.Time + + noSmithyDocumentSerde +} + // Contains source Apache Kafka versions and compatible target Apache Kafka // versions. type CompatibleKafkaVersion struct { @@ -1025,6 +1117,24 @@ type VpcConnectionInfo struct { noSmithyDocumentSerde } +// Description of the VPC connection. +type VpcConnectionInfoServerless struct { + + // The time when Amazon MSK creates the VPC Connnection. + CreationTime *time.Time + + // The owner of the VPC Connection. + Owner *string + + // Description of the requester that calls the API operation. + UserIdentity *UserIdentity + + // The Amazon Resource Name (ARN) of the VPC connection. + VpcConnectionArn *string + + noSmithyDocumentSerde +} + // VPC connectivity access control for brokers. type VpcConnectivity struct { diff --git a/service/kafka/validators.go b/service/kafka/validators.go index f174dc4bb31..699cd5f9a04 100644 --- a/service/kafka/validators.go +++ b/service/kafka/validators.go @@ -250,6 +250,26 @@ func (m *validateOpDescribeClusterOperation) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpDescribeClusterOperationV2 struct { +} + +func (*validateOpDescribeClusterOperationV2) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeClusterOperationV2) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeClusterOperationV2Input) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeClusterOperationV2Input(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeClusterV2 struct { } @@ -410,6 +430,26 @@ func (m *validateOpListClusterOperations) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpListClusterOperationsV2 struct { +} + +func (*validateOpListClusterOperationsV2) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListClusterOperationsV2) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListClusterOperationsV2Input) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListClusterOperationsV2Input(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListConfigurationRevisions struct { } @@ -838,6 +878,10 @@ func addOpDescribeClusterOperationValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpDescribeClusterOperation{}, middleware.After) } +func addOpDescribeClusterOperationV2ValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeClusterOperationV2{}, middleware.After) +} + func addOpDescribeClusterV2ValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeClusterV2{}, middleware.After) } @@ -870,6 +914,10 @@ func addOpListClusterOperationsValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpListClusterOperations{}, middleware.After) } +func addOpListClusterOperationsV2ValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListClusterOperationsV2{}, middleware.After) +} + func addOpListConfigurationRevisionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListConfigurationRevisions{}, middleware.After) } @@ -1524,6 +1572,21 @@ func validateOpDescribeClusterOperationInput(v *DescribeClusterOperationInput) e } } +func validateOpDescribeClusterOperationV2Input(v *DescribeClusterOperationV2Input) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeClusterOperationV2Input"} + if v.ClusterOperationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterOperationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeClusterV2Input(v *DescribeClusterV2Input) error { if v == nil { return nil @@ -1644,6 +1707,21 @@ func validateOpListClusterOperationsInput(v *ListClusterOperationsInput) error { } } +func validateOpListClusterOperationsV2Input(v *ListClusterOperationsV2Input) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListClusterOperationsV2Input"} + if v.ClusterArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListConfigurationRevisionsInput(v *ListConfigurationRevisionsInput) error { if v == nil { return nil diff --git a/service/pinpoint/deserializers.go b/service/pinpoint/deserializers.go index e13b16b2718..ac76586b7dd 100644 --- a/service/pinpoint/deserializers.go +++ b/service/pinpoint/deserializers.go @@ -21595,6 +21595,68 @@ func awsRestjson1_deserializeDocumentApplicationResponse(v **types.ApplicationRe return nil } +func awsRestjson1_deserializeDocumentApplicationSettingsJourneyLimits(v **types.ApplicationSettingsJourneyLimits, 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.ApplicationSettingsJourneyLimits + if *v == nil { + sv = &types.ApplicationSettingsJourneyLimits{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DailyCap": + 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.DailyCap = int32(i64) + } + + case "TimeframeCap": + if err := awsRestjson1_deserializeDocumentJourneyTimeframeCap(&sv.TimeframeCap, value); err != nil { + return err + } + + case "TotalCap": + 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.TotalCap = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentApplicationSettingsResource(v **types.ApplicationSettingsResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21631,6 +21693,11 @@ func awsRestjson1_deserializeDocumentApplicationSettingsResource(v **types.Appli return err } + case "JourneyLimits": + if err := awsRestjson1_deserializeDocumentApplicationSettingsJourneyLimits(&sv.JourneyLimits, value); err != nil { + return err + } + case "LastModifiedDate": if value != nil { jtv, ok := value.(string) @@ -25408,6 +25475,15 @@ func awsRestjson1_deserializeDocumentGCMChannelResponse(v **types.GCMChannelResp sv.Credential = ptr.String(jtv) } + case "DefaultAuthenticationMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.DefaultAuthenticationMethod = ptr.String(jtv) + } + case "Enabled": if value != nil { jtv, ok := value.(bool) @@ -25426,6 +25502,15 @@ func awsRestjson1_deserializeDocumentGCMChannelResponse(v **types.GCMChannelResp sv.HasCredential = jtv } + case "HasFcmServiceCredentials": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.HasFcmServiceCredentials = jtv + } + case "Id": if value != nil { jtv, ok := value.(string) @@ -27155,6 +27240,24 @@ func awsRestjson1_deserializeDocumentJourneyLimits(v **types.JourneyLimits, valu sv.MessagesPerSecond = int32(i64) } + case "TimeframeCap": + if err := awsRestjson1_deserializeDocumentJourneyTimeframeCap(&sv.TimeframeCap, value); err != nil { + return err + } + + case "TotalCap": + 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.TotalCap = int32(i64) + } + default: _, _ = key, value @@ -27854,6 +27957,63 @@ func awsRestjson1_deserializeDocumentJourneysResponse(v **types.JourneysResponse return nil } +func awsRestjson1_deserializeDocumentJourneyTimeframeCap(v **types.JourneyTimeframeCap, 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.JourneyTimeframeCap + if *v == nil { + sv = &types.JourneyTimeframeCap{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Cap": + 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.Cap = int32(i64) + } + + case "Days": + 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.Days = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentListOf__EndpointTypesElement(v *[]types.EndpointTypesElement, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -32448,6 +32608,11 @@ func awsRestjson1_deserializeDocumentTemplateConfiguration(v **types.TemplateCon return err } + case "InAppTemplate": + if err := awsRestjson1_deserializeDocumentTemplate(&sv.InAppTemplate, value); err != nil { + return err + } + case "PushTemplate": if err := awsRestjson1_deserializeDocumentTemplate(&sv.PushTemplate, value); err != nil { return err diff --git a/service/pinpoint/serializers.go b/service/pinpoint/serializers.go index 945c9624d56..08585042ce7 100644 --- a/service/pinpoint/serializers.go +++ b/service/pinpoint/serializers.go @@ -9415,6 +9415,30 @@ func awsRestjson1_serializeDocumentAPNSVoipSandboxChannelRequest(v *types.APNSVo return nil } +func awsRestjson1_serializeDocumentApplicationSettingsJourneyLimits(v *types.ApplicationSettingsJourneyLimits, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DailyCap != 0 { + ok := object.Key("DailyCap") + ok.Integer(v.DailyCap) + } + + if v.TimeframeCap != nil { + ok := object.Key("TimeframeCap") + if err := awsRestjson1_serializeDocumentJourneyTimeframeCap(v.TimeframeCap, ok); err != nil { + return err + } + } + + if v.TotalCap != 0 { + ok := object.Key("TotalCap") + ok.Integer(v.TotalCap) + } + + return nil +} + func awsRestjson1_serializeDocumentAttributeDimension(v *types.AttributeDimension, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10882,11 +10906,21 @@ func awsRestjson1_serializeDocumentGCMChannelRequest(v *types.GCMChannelRequest, ok.String(*v.ApiKey) } + if v.DefaultAuthenticationMethod != nil { + ok := object.Key("DefaultAuthenticationMethod") + ok.String(*v.DefaultAuthenticationMethod) + } + if v.Enabled { ok := object.Key("Enabled") ok.Boolean(v.Enabled) } + if v.ServiceJson != nil { + ok := object.Key("ServiceJson") + ok.String(*v.ServiceJson) + } + return nil } @@ -10931,6 +10965,11 @@ func awsRestjson1_serializeDocumentGCMMessage(v *types.GCMMessage, value smithyj ok.String(*v.ImageUrl) } + if v.PreferredAuthenticationMethod != nil { + ok := object.Key("PreferredAuthenticationMethod") + ok.String(*v.PreferredAuthenticationMethod) + } + if v.Priority != nil { ok := object.Key("Priority") ok.String(*v.Priority) @@ -11352,6 +11391,18 @@ func awsRestjson1_serializeDocumentJourneyLimits(v *types.JourneyLimits, value s ok.Integer(v.MessagesPerSecond) } + if v.TimeframeCap != nil { + ok := object.Key("TimeframeCap") + if err := awsRestjson1_serializeDocumentJourneyTimeframeCap(v.TimeframeCap, ok); err != nil { + return err + } + } + + if v.TotalCap != 0 { + ok := object.Key("TotalCap") + ok.Integer(v.TotalCap) + } + return nil } @@ -11433,6 +11484,23 @@ func awsRestjson1_serializeDocumentJourneyStateRequest(v *types.JourneyStateRequ return nil } +func awsRestjson1_serializeDocumentJourneyTimeframeCap(v *types.JourneyTimeframeCap, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Cap != 0 { + ok := object.Key("Cap") + ok.Integer(v.Cap) + } + + if v.Days != 0 { + ok := object.Key("Days") + ok.Integer(v.Days) + } + + return nil +} + func awsRestjson1_serializeDocumentListOf__EndpointTypesElement(v []types.EndpointTypesElement, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -13066,6 +13134,13 @@ func awsRestjson1_serializeDocumentTemplateConfiguration(v *types.TemplateConfig } } + if v.InAppTemplate != nil { + ok := object.Key("InAppTemplate") + if err := awsRestjson1_serializeDocumentTemplate(v.InAppTemplate, ok); err != nil { + return err + } + } + if v.PushTemplate != nil { ok := object.Key("PushTemplate") if err := awsRestjson1_serializeDocumentTemplate(v.PushTemplate, ok); err != nil { @@ -13322,6 +13397,13 @@ func awsRestjson1_serializeDocumentWriteApplicationSettingsRequest(v *types.Writ ok.Boolean(v.EventTaggingEnabled) } + if v.JourneyLimits != nil { + ok := object.Key("JourneyLimits") + if err := awsRestjson1_serializeDocumentApplicationSettingsJourneyLimits(v.JourneyLimits, ok); err != nil { + return err + } + } + if v.Limits != nil { ok := object.Key("Limits") if err := awsRestjson1_serializeDocumentCampaignLimits(v.Limits, ok); err != nil { diff --git a/service/pinpoint/types/types.go b/service/pinpoint/types/types.go index 504e333e8a1..f322bf7286e 100644 --- a/service/pinpoint/types/types.go +++ b/service/pinpoint/types/types.go @@ -990,6 +990,27 @@ type ApplicationResponse struct { noSmithyDocumentSerde } +// The default sending limits for journeys in the application. To override these +// limits and define custom limits for a specific journey, use the Journey +// resource. +type ApplicationSettingsJourneyLimits struct { + + // The daily number of messages that an endpoint can receive from all journeys. + // The maximum value is 100. If set to 0, this limit will not apply. + DailyCap int32 + + // The default maximum number of messages that can be sent to an endpoint during + // the specified timeframe for all journeys. + TimeframeCap *JourneyTimeframeCap + + // The default maximum number of messages that a single journey can sent to a + // single endpoint. The maximum value is 100. If set to 0, this limit will not + // apply. + TotalCap int32 + + noSmithyDocumentSerde +} + // Provides information about an application, including the default settings for // an application. type ApplicationSettingsResource struct { @@ -1005,6 +1026,11 @@ type ApplicationSettingsResource struct { // that are used by campaigns in the application. CampaignHook *CampaignHook + // The default sending limits for journeys in the application. These limits apply + // to each journey for the application but can be overridden, on a per journey + // basis, with the JourneyLimits resource. + JourneyLimits *ApplicationSettingsJourneyLimits + // The date and time, in ISO 8601 format, when the application's settings were // last modified. LastModifiedDate *string @@ -3139,13 +3165,21 @@ type GCMChannelRequest struct { // The Web API Key, also referred to as an API_KEY or server key, that you // received from Google to communicate with Google services. - // - // This member is required. ApiKey *string + // The default authentication method used for GCM. Values are either "TOKEN" or + // "KEY". Defaults to "KEY". + DefaultAuthenticationMethod *string + // Specifies whether to enable the GCM channel for the application. Enabled bool + // The contents of the JSON file provided by Google during registration in order + // to generate an access token for authentication. For more information see + // Migrate from legacy FCM APIs to HTTP v1 (https://firebase.google.com/docs/cloud-messaging/migrate-v1) + // . + ServiceJson *string + noSmithyDocumentSerde } @@ -3155,12 +3189,6 @@ type GCMChannelRequest struct { // (GCM), service. type GCMChannelResponse struct { - // The Web API Key, also referred to as an API_KEY or server key, that you - // received from Google to communicate with Google services. - // - // This member is required. - Credential *string - // The type of messaging or notification platform for the channel. For the GCM // channel, this value is GCM. // @@ -3173,12 +3201,24 @@ type GCMChannelResponse struct { // The date and time when the GCM channel was enabled. CreationDate *string + // The Web API Key, also referred to as an API_KEY or server key, that you + // received from Google to communicate with Google services. + Credential *string + + // The default authentication method used for GCM. Values are either "TOKEN" or + // "KEY". Defaults to "KEY". + DefaultAuthenticationMethod *string + // Specifies whether the GCM channel is enabled for the application. Enabled bool // (Not used) This property is retained only for backward compatibility. HasCredential bool + // Returns true if the JSON file provided by Google during registration process + // was used in the ServiceJson field of the request. + HasFcmServiceCredentials bool + // (Deprecated) An identifier for the GCM channel. This property is retained only // for backward compatibility. Id *string @@ -3240,9 +3280,13 @@ type GCMMessage struct { // The URL of an image to display in the push notification. ImageUrl *string - // para>normal - The notification might be delayed. Delivery is optimized for + // The preferred authentication method, with valid values "KEY" or "TOKEN". If a + // value isn't provided then the DefaultAuthenticationMethod is used. + PreferredAuthenticationMethod *string + + // para>normal – The notification might be delayed. Delivery is optimized for // battery usage on the recipient's device. Use this value unless immediate - // delivery is required./listitem> high - The notification is sent immediately and + // delivery is required./listitem> high – The notification is sent immediately and // might wake a sleeping device. /para> Amazon Pinpoint specifies this value in the // FCM priority parameter when it sends the notification message to FCM. The // equivalent values for Apple Push Notification service (APNs) are 5, for normal, @@ -3993,6 +4037,14 @@ type JourneyLimits struct { // The maximum number of messages that the journey can send each second. MessagesPerSecond int32 + // The number of messages that an endpoint can receive during the specified + // timeframe. + TimeframeCap *JourneyTimeframeCap + + // The maximum number of messages a journey can sent to a single endpoint. The + // maximum value is 100. If set to 0, this limit will not apply. + TotalCap int32 + noSmithyDocumentSerde } @@ -4369,6 +4421,22 @@ type JourneyStateRequest struct { noSmithyDocumentSerde } +// The number of messages that can be sent to an endpoint during the specified +// timeframe for all journeys. +type JourneyTimeframeCap struct { + + // The maximum number of messages that all journeys can send to an endpoint during + // the specified timeframe. The maximum value is 100. If set to 0, this limit will + // not apply. + Cap int32 + + // The length of the timeframe in days. The maximum value is 30. If set to 0, this + // limit will not apply. + Days int32 + + noSmithyDocumentSerde +} + // Provides information about all the recommender model configurations that are // associated with your Amazon Pinpoint account. type ListRecommenderConfigurationsResponse struct { @@ -6053,6 +6121,10 @@ type TemplateConfiguration struct { // The email template to use for the message. EmailTemplate *Template + // The InApp template to use for the message. The InApp template object is not + // supported for SendMessages. + InAppTemplate *Template + // The push notification template to use for the message. PushTemplate *Template @@ -6102,7 +6174,7 @@ type TemplateResponse struct { TemplateName *string // The type of channel that the message template is designed for. Possible values - // are: EMAIL, PUSH, SMS, and VOICE. + // are: EMAIL, PUSH, SMS, INAPP, and VOICE. // // This member is required. TemplateType TemplateType @@ -6182,7 +6254,7 @@ type TemplateVersionResponse struct { TemplateName *string // The type of channel that the message template is designed for. Possible values - // are: EMAIL, PUSH, SMS, and VOICE. + // are: EMAIL, PUSH, SMS, INAPP, and VOICE. // // This member is required. TemplateType *string @@ -6640,6 +6712,11 @@ type WriteApplicationSettingsRequest struct { EventTaggingEnabled bool + // The default sending limits for journeys in the application. These limits apply + // to each journey for the application but can be overridden, on a per journey + // basis, with the JourneyLimits resource. + JourneyLimits *ApplicationSettingsJourneyLimits + // The default sending limits for campaigns in the application. To override these // limits and define custom limits for a specific campaign or journey, use the // Campaign resource or the Journey resource, respectively. diff --git a/service/pinpoint/validators.go b/service/pinpoint/validators.go index 46866dd4699..5d330ecc21a 100644 --- a/service/pinpoint/validators.go +++ b/service/pinpoint/validators.go @@ -3281,21 +3281,6 @@ func validateExportJobRequest(v *types.ExportJobRequest) error { } } -func validateGCMChannelRequest(v *types.GCMChannelRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GCMChannelRequest"} - if v.ApiKey == nil { - invalidParams.Add(smithy.NewErrParamRequired("ApiKey")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateGPSCoordinates(v *types.GPSCoordinates) error { if v == nil { return nil @@ -6209,10 +6194,6 @@ func validateOpUpdateGcmChannelInput(v *UpdateGcmChannelInput) error { } if v.GCMChannelRequest == nil { invalidParams.Add(smithy.NewErrParamRequired("GCMChannelRequest")) - } else if v.GCMChannelRequest != nil { - if err := validateGCMChannelRequest(v.GCMChannelRequest); err != nil { - invalidParams.AddNested("GCMChannelRequest", err.(smithy.InvalidParamsError)) - } } if invalidParams.Len() > 0 { return invalidParams diff --git a/service/sms/internal/endpoints/endpoints.go b/service/sms/internal/endpoints/endpoints.go index e14ecb9c20e..abdb68eea4f 100644 --- a/service/sms/internal/endpoints/endpoints.go +++ b/service/sms/internal/endpoints/endpoints.go @@ -139,75 +139,6 @@ 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-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-central-1", - }: endpoints.Endpoint{}, - 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-us-east-1", - }: endpoints.Endpoint{ - Hostname: "sms-fips.us-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-us-east-2", - }: endpoints.Endpoint{ - Hostname: "sms-fips.us-east-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-2", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-us-west-1", - }: endpoints.Endpoint{ - Hostname: "sms-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{ @@ -217,39 +148,6 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, - endpoints.EndpointKey{ - Region: "me-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "sa-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sms-fips.us-east-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-east-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-2", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sms-fips.us-east-2.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sms-fips.us-west-1.amazonaws.com", - }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, @@ -299,9 +197,6 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "cn-northwest-1", - }: endpoints.Endpoint{}, }, }, { @@ -423,15 +318,6 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "fips-us-gov-east-1", - }: endpoints.Endpoint{ - Hostname: "sms-fips.us-gov-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-east-1", - }, - Deprecated: aws.TrueTernary, - }, endpoints.EndpointKey{ Region: "fips-us-gov-west-1", }: endpoints.Endpoint{ @@ -441,15 +327,6 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, - endpoints.EndpointKey{ - Region: "us-gov-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-gov-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sms-fips.us-gov-east-1.amazonaws.com", - }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{},