From cec4d55d05fbd0bddff916f426901097073068a6 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 3 May 2023 18:21:56 +0000 Subject: [PATCH] Regenerated Clients --- .../4b7c38efe9c44573a4983d91e1a4d1c7.json | 8 + .../4e373ec6bf7649bcab264a2cb6181d91.json | 8 + .../7d62e7aeb8234358af05ca45ff3c093d.json | 8 + .../97a33ce0770c46b6a464ba5bc62477e5.json | 8 + .../9f75d06fc8ae448598eaf5348adce684.json | 8 + .../a28b0da8413749cb92e21972bae24e03.json | 8 + .../a2da02816e114aaba903eed16296d745.json | 8 + service/appsync/api_op_AssociateApi.go | 2 +- service/appsync/api_op_CreateGraphqlApi.go | 5 + service/appsync/deserializers.go | 14 + service/appsync/serializers.go | 5 + service/appsync/types/enums.go | 18 + service/appsync/types/types.go | 16 +- ...workInsightsAccessScopeAnalysisFindings.go | 95 + service/inspector2/api_op_AssociateMember.go | 6 +- ...p_BatchGetMemberEc2DeepInspectionStatus.go | 127 + ...atchUpdateMemberEc2DeepInspectionStatus.go | 132 ++ .../inspector2/api_op_CreateFindingsReport.go | 4 +- ...pi_op_GetEc2DeepInspectionConfiguration.go | 126 + ...op_UpdateEc2DeepInspectionConfiguration.go | 138 ++ ...UpdateOrgEc2DeepInspectionConfiguration.go | 122 + service/inspector2/deserializers.go | 2052 ++++++++++++----- service/inspector2/generated.json | 5 + service/inspector2/serializers.go | 371 +++ service/inspector2/types/enums.go | 72 +- service/inspector2/types/types.go | 68 +- service/inspector2/validators.go | 117 + service/iottwinmaker/api_op_GetScene.go | 4 + service/iottwinmaker/deserializers.go | 54 + service/iottwinmaker/types/enums.go | 16 + service/iottwinmaker/types/types.go | 12 + .../api_op_PutResourcePolicy.go | 2 - service/networkfirewall/deserializers.go | 41 + service/networkfirewall/serializers.go | 21 + service/networkfirewall/types/enums.go | 4 + service/networkfirewall/types/types.go | 38 +- service/networkfirewall/validators.go | 22 + service/opensearch/api_op_CreatePackage.go | 2 +- .../opensearch/api_op_DescribeDomainHealth.go | 182 ++ .../api_op_GetPackageVersionHistory.go | 5 +- .../api_op_ListInstanceTypeDetails.go | 10 +- .../opensearch/api_op_UpdateDomainConfig.go | 4 - service/opensearch/deserializers.go | 506 ++++ service/opensearch/generated.json | 1 + service/opensearch/serializers.go | 71 + service/opensearch/types/enums.go | 80 + service/opensearch/types/errors.go | 7 +- service/opensearch/types/types.go | 60 +- service/opensearch/validators.go | 39 + .../api_op_UpdateGlobalSettings.go | 5 +- service/wellarchitected/deserializers.go | 41 + service/wellarchitected/serializers.go | 23 + service/wellarchitected/types/enums.go | 36 + service/wellarchitected/types/types.go | 4 + 54 files changed, 4249 insertions(+), 592 deletions(-) create mode 100644 .changelog/4b7c38efe9c44573a4983d91e1a4d1c7.json create mode 100644 .changelog/4e373ec6bf7649bcab264a2cb6181d91.json create mode 100644 .changelog/7d62e7aeb8234358af05ca45ff3c093d.json create mode 100644 .changelog/97a33ce0770c46b6a464ba5bc62477e5.json create mode 100644 .changelog/9f75d06fc8ae448598eaf5348adce684.json create mode 100644 .changelog/a28b0da8413749cb92e21972bae24e03.json create mode 100644 .changelog/a2da02816e114aaba903eed16296d745.json create mode 100644 service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go create mode 100644 service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go create mode 100644 service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go create mode 100644 service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go create mode 100644 service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go create mode 100644 service/opensearch/api_op_DescribeDomainHealth.go diff --git a/.changelog/4b7c38efe9c44573a4983d91e1a4d1c7.json b/.changelog/4b7c38efe9c44573a4983d91e1a4d1c7.json new file mode 100644 index 00000000000..cb8f8a4f613 --- /dev/null +++ b/.changelog/4b7c38efe9c44573a4983d91e1a4d1c7.json @@ -0,0 +1,8 @@ +{ + "id": "4b7c38ef-e9c4-4573-a498-3d91e1a4d1c7", + "type": "feature", + "description": "Adds an SDK paginator for GetNetworkInsightsAccessScopeAnalysisFindings", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/4e373ec6bf7649bcab264a2cb6181d91.json b/.changelog/4e373ec6bf7649bcab264a2cb6181d91.json new file mode 100644 index 00000000000..c8c7f62bfd3 --- /dev/null +++ b/.changelog/4e373ec6bf7649bcab264a2cb6181d91.json @@ -0,0 +1,8 @@ +{ + "id": "4e373ec6-bf76-49bc-ab26-4a2cb6181d91", + "type": "feature", + "description": "This release deepens integration with AWS Service Catalog AppRegistry to improve workload resource discovery.", + "modules": [ + "service/wellarchitected" + ] +} \ No newline at end of file diff --git a/.changelog/7d62e7aeb8234358af05ca45ff3c093d.json b/.changelog/7d62e7aeb8234358af05ca45ff3c093d.json new file mode 100644 index 00000000000..ca28eae5352 --- /dev/null +++ b/.changelog/7d62e7aeb8234358af05ca45ff3c093d.json @@ -0,0 +1,8 @@ +{ + "id": "7d62e7ae-b823-4358-af05-ca45ff3c093d", + "type": "feature", + "description": "This feature provides deep inspection for linux based instance", + "modules": [ + "service/inspector2" + ] +} \ No newline at end of file diff --git a/.changelog/97a33ce0770c46b6a464ba5bc62477e5.json b/.changelog/97a33ce0770c46b6a464ba5bc62477e5.json new file mode 100644 index 00000000000..e3e0ee9df4e --- /dev/null +++ b/.changelog/97a33ce0770c46b6a464ba5bc62477e5.json @@ -0,0 +1,8 @@ +{ + "id": "97a33ce0-770c-46b6-a464-ba5bc62477e5", + "type": "feature", + "description": "This release adds a field for GetScene API to return error code and message from dependency services.", + "modules": [ + "service/iottwinmaker" + ] +} \ No newline at end of file diff --git a/.changelog/9f75d06fc8ae448598eaf5348adce684.json b/.changelog/9f75d06fc8ae448598eaf5348adce684.json new file mode 100644 index 00000000000..da7e2aca1c5 --- /dev/null +++ b/.changelog/9f75d06fc8ae448598eaf5348adce684.json @@ -0,0 +1,8 @@ +{ + "id": "9f75d06f-c8ae-4485-98ea-f5348adce684", + "type": "feature", + "description": "AWS Network Firewall now supports policy level HOME_NET variable overrides.", + "modules": [ + "service/networkfirewall" + ] +} \ No newline at end of file diff --git a/.changelog/a28b0da8413749cb92e21972bae24e03.json b/.changelog/a28b0da8413749cb92e21972bae24e03.json new file mode 100644 index 00000000000..b09c739f186 --- /dev/null +++ b/.changelog/a28b0da8413749cb92e21972bae24e03.json @@ -0,0 +1,8 @@ +{ + "id": "a28b0da8-4137-49cb-92e2-1972bae24e03", + "type": "feature", + "description": "Private API support for AWS AppSync. With Private APIs, you can now create GraphQL APIs that can only be accessed from your Amazon Virtual Private Cloud (\"VPC\").", + "modules": [ + "service/appsync" + ] +} \ No newline at end of file diff --git a/.changelog/a2da02816e114aaba903eed16296d745.json b/.changelog/a2da02816e114aaba903eed16296d745.json new file mode 100644 index 00000000000..2b9c3650f7c --- /dev/null +++ b/.changelog/a2da02816e114aaba903eed16296d745.json @@ -0,0 +1,8 @@ +{ + "id": "a2da0281-6e11-4aab-a903-eed16296d745", + "type": "feature", + "description": "Amazon OpenSearch Service adds the option to deploy a domain across multiple Availability Zones, with each AZ containing a complete copy of data and with nodes in one AZ acting as a standby. This option provides 99.99% availability and consistent performance in the event of infrastructure failure.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/service/appsync/api_op_AssociateApi.go b/service/appsync/api_op_AssociateApi.go index 919ad04009b..996bbedff8d 100644 --- a/service/appsync/api_op_AssociateApi.go +++ b/service/appsync/api_op_AssociateApi.go @@ -29,7 +29,7 @@ func (c *Client) AssociateApi(ctx context.Context, params *AssociateApiInput, op type AssociateApiInput struct { - // The API ID. + // The API ID. Private APIs can not be associated with custom domains. // // This member is required. ApiId *string diff --git a/service/appsync/api_op_CreateGraphqlApi.go b/service/appsync/api_op_CreateGraphqlApi.go index 6a9fd92dbd3..485b5825a01 100644 --- a/service/appsync/api_op_CreateGraphqlApi.go +++ b/service/appsync/api_op_CreateGraphqlApi.go @@ -58,6 +58,11 @@ type CreateGraphqlApiInput struct { // The Amazon Cognito user pool configuration. UserPoolConfig *types.UserPoolConfig + // Sets the value of the GraphQL API to public ( GLOBAL ) or private ( PRIVATE ). + // If no value is provided, the visibility will be set to GLOBAL by default. This + // value cannot be changed once the API has been created. + Visibility types.GraphQLApiVisibility + // A flag indicating whether to use X-Ray tracing for the GraphqlApi . XrayEnabled bool diff --git a/service/appsync/deserializers.go b/service/appsync/deserializers.go index 5b3d8a41691..0b3b60c0ab8 100644 --- a/service/appsync/deserializers.go +++ b/service/appsync/deserializers.go @@ -9692,6 +9692,11 @@ func awsRestjson1_deserializeDocumentGraphqlApi(v **types.GraphqlApi, value inte sv.AuthenticationType = types.AuthenticationType(jtv) } + case "dns": + if err := awsRestjson1_deserializeDocumentMapOfStringToString(&sv.Dns, value); err != nil { + return err + } + case "lambdaAuthorizerConfig": if err := awsRestjson1_deserializeDocumentLambdaAuthorizerConfig(&sv.LambdaAuthorizerConfig, value); err != nil { return err @@ -9731,6 +9736,15 @@ func awsRestjson1_deserializeDocumentGraphqlApi(v **types.GraphqlApi, value inte return err } + case "visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GraphQLApiVisibility to be of type string, got %T instead", value) + } + sv.Visibility = types.GraphQLApiVisibility(jtv) + } + case "wafWebAclArn": if value != nil { jtv, ok := value.(string) diff --git a/service/appsync/serializers.go b/service/appsync/serializers.go index 4268018362f..ee8981292fa 100644 --- a/service/appsync/serializers.go +++ b/service/appsync/serializers.go @@ -747,6 +747,11 @@ func awsRestjson1_serializeOpDocumentCreateGraphqlApiInput(v *CreateGraphqlApiIn } } + if len(v.Visibility) > 0 { + ok := object.Key("visibility") + ok.String(string(v.Visibility)) + } + if v.XrayEnabled { ok := object.Key("xrayEnabled") ok.Boolean(v.XrayEnabled) diff --git a/service/appsync/types/enums.go b/service/appsync/types/enums.go index ed06e7e1055..0221f2d927a 100644 --- a/service/appsync/types/enums.go +++ b/service/appsync/types/enums.go @@ -272,6 +272,24 @@ func (FieldLogLevel) Values() []FieldLogLevel { } } +type GraphQLApiVisibility string + +// Enum values for GraphQLApiVisibility +const ( + GraphQLApiVisibilityGlobal GraphQLApiVisibility = "GLOBAL" + GraphQLApiVisibilityPrivate GraphQLApiVisibility = "PRIVATE" +) + +// Values returns all known values for GraphQLApiVisibility. 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 (GraphQLApiVisibility) Values() []GraphQLApiVisibility { + return []GraphQLApiVisibility{ + "GLOBAL", + "PRIVATE", + } +} + type OutputType string // Enum values for OutputType diff --git a/service/appsync/types/types.go b/service/appsync/types/types.go index 7bf12f56eec..977bfc31a1c 100644 --- a/service/appsync/types/types.go +++ b/service/appsync/types/types.go @@ -514,6 +514,9 @@ type GraphqlApi struct { // The authentication type. AuthenticationType AuthenticationType + // The DNS records for the API. + Dns map[string]string + // Configuration for Lambda function authorization. LambdaAuthorizerConfig *LambdaAuthorizerConfig @@ -535,6 +538,11 @@ type GraphqlApi struct { // The Amazon Cognito user pool configuration. UserPoolConfig *UserPoolConfig + // Sets the value of the GraphQL API to public ( GLOBAL ) or private ( PRIVATE ). + // If no value is provided, the visibility will be set to GLOBAL by default. This + // value cannot be changed once the API has been created. + Visibility GraphQLApiVisibility + // The ARN of the WAF access control list (ACL) associated with this GraphqlApi , // if one exists. WafWebAclArn *string @@ -578,9 +586,11 @@ type LambdaAuthorizerConfig struct { // This member is required. AuthorizerUri *string - // The number of seconds a response should be cached for. The default is 5 minutes - // (300 seconds). The Lambda function can override this by returning a ttlOverride - // key in its response. A value of 0 disables caching of responses. + // The number of seconds a response should be cached for. The default is 0 + // seconds, which disables caching. If you don't specify a value for + // authorizerResultTtlInSeconds , the default value is used. The maximum value is + // one hour (3600 seconds). The Lambda function can override this by returning a + // ttlOverride key in its response. AuthorizerResultTtlInSeconds int32 // A regular expression for validation of tokens before the Lambda function is diff --git a/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go b/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go index c0e99338cd5..5278c5495dc 100644 --- a/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go +++ b/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go @@ -4,6 +4,7 @@ package ec2 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/ec2/types" @@ -137,6 +138,100 @@ func (c *Client) addOperationGetNetworkInsightsAccessScopeAnalysisFindingsMiddle return nil } +// GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient is a client that +// implements the GetNetworkInsightsAccessScopeAnalysisFindings operation. +type GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient interface { + GetNetworkInsightsAccessScopeAnalysisFindings(context.Context, *GetNetworkInsightsAccessScopeAnalysisFindingsInput, ...func(*Options)) (*GetNetworkInsightsAccessScopeAnalysisFindingsOutput, error) +} + +var _ GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient = (*Client)(nil) + +// GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions is the paginator +// options for GetNetworkInsightsAccessScopeAnalysisFindings +type GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions struct { + // The maximum number of results to return with 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 +} + +// GetNetworkInsightsAccessScopeAnalysisFindingsPaginator is a paginator for +// GetNetworkInsightsAccessScopeAnalysisFindings +type GetNetworkInsightsAccessScopeAnalysisFindingsPaginator struct { + options GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions + client GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient + params *GetNetworkInsightsAccessScopeAnalysisFindingsInput + nextToken *string + firstPage bool +} + +// NewGetNetworkInsightsAccessScopeAnalysisFindingsPaginator returns a new +// GetNetworkInsightsAccessScopeAnalysisFindingsPaginator +func NewGetNetworkInsightsAccessScopeAnalysisFindingsPaginator(client GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient, params *GetNetworkInsightsAccessScopeAnalysisFindingsInput, optFns ...func(*GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions)) *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator { + if params == nil { + params = &GetNetworkInsightsAccessScopeAnalysisFindingsInput{} + } + + options := GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetNetworkInsightsAccessScopeAnalysisFindingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetNetworkInsightsAccessScopeAnalysisFindings page. +func (p *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetNetworkInsightsAccessScopeAnalysisFindingsOutput, 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.GetNetworkInsightsAccessScopeAnalysisFindings(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_opGetNetworkInsightsAccessScopeAnalysisFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_AssociateMember.go b/service/inspector2/api_op_AssociateMember.go index e1ee930d939..5d7c9d2bc65 100644 --- a/service/inspector2/api_op_AssociateMember.go +++ b/service/inspector2/api_op_AssociateMember.go @@ -11,7 +11,11 @@ import ( ) // Associates an Amazon Web Services account with an Amazon Inspector delegated -// administrator. +// administrator. An HTTP 200 response indicates the association was successfully +// started, but doesn’t indicate whether it was completed. You can check if the +// association completed by using ListMembers (https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListMembers.html) +// for multiple accounts or GetMembers (https://docs.aws.amazon.com/inspector/v2/APIReference/API_GetMember.html) +// for a single account. func (c *Client) AssociateMember(ctx context.Context, params *AssociateMemberInput, optFns ...func(*Options)) (*AssociateMemberOutput, error) { if params == nil { params = &AssociateMemberInput{} diff --git a/service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go b/service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go new file mode 100644 index 00000000000..9883cd34d9f --- /dev/null +++ b/service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +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/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves Amazon Inspector deep inspection activation status of multiple member +// accounts within your organization. You must be the delegated administrator of an +// organization in Amazon Inspector to use this API. +func (c *Client) BatchGetMemberEc2DeepInspectionStatus(ctx context.Context, params *BatchGetMemberEc2DeepInspectionStatusInput, optFns ...func(*Options)) (*BatchGetMemberEc2DeepInspectionStatusOutput, error) { + if params == nil { + params = &BatchGetMemberEc2DeepInspectionStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetMemberEc2DeepInspectionStatus", params, optFns, c.addOperationBatchGetMemberEc2DeepInspectionStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetMemberEc2DeepInspectionStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetMemberEc2DeepInspectionStatusInput struct { + + // The unique identifiers for the Amazon Web Services accounts to retrieve Amazon + // Inspector deep inspection activation status for. + AccountIds []string + + noSmithyDocumentSerde +} + +type BatchGetMemberEc2DeepInspectionStatusOutput struct { + + // An array of objects that provide details on the activation status of Amazon + // Inspector deep inspection for each of the requested accounts. + AccountIds []types.MemberAccountEc2DeepInspectionStatusState + + // An array of objects that provide details on any accounts that failed to + // activate Amazon Inspector deep inspection and why. + FailedAccountIds []types.FailedMemberAccountEc2DeepInspectionStatusState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetMemberEc2DeepInspectionStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchGetMemberEc2DeepInspectionStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchGetMemberEc2DeepInspectionStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetMemberEc2DeepInspectionStatus(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_opBatchGetMemberEc2DeepInspectionStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "BatchGetMemberEc2DeepInspectionStatus", + } +} diff --git a/service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go b/service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go new file mode 100644 index 00000000000..5c81dfbc0a5 --- /dev/null +++ b/service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +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/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Activates or deactivates Amazon Inspector deep inspection for the provided +// member accounts in your organization. You must be the delegated administrator of +// an organization in Amazon Inspector to use this API. +func (c *Client) BatchUpdateMemberEc2DeepInspectionStatus(ctx context.Context, params *BatchUpdateMemberEc2DeepInspectionStatusInput, optFns ...func(*Options)) (*BatchUpdateMemberEc2DeepInspectionStatusOutput, error) { + if params == nil { + params = &BatchUpdateMemberEc2DeepInspectionStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchUpdateMemberEc2DeepInspectionStatus", params, optFns, c.addOperationBatchUpdateMemberEc2DeepInspectionStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchUpdateMemberEc2DeepInspectionStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchUpdateMemberEc2DeepInspectionStatusInput struct { + + // The unique identifiers for the Amazon Web Services accounts to change Amazon + // Inspector deep inspection status for. + // + // This member is required. + AccountIds []types.MemberAccountEc2DeepInspectionStatus + + noSmithyDocumentSerde +} + +type BatchUpdateMemberEc2DeepInspectionStatusOutput struct { + + // An array of objects that provide details for each of the accounts that Amazon + // Inspector deep inspection status was successfully changed for. + AccountIds []types.MemberAccountEc2DeepInspectionStatusState + + // An array of objects that provide details for each of the accounts that Amazon + // Inspector deep inspection status could not be successfully changed for. + FailedAccountIds []types.FailedMemberAccountEc2DeepInspectionStatusState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchUpdateMemberEc2DeepInspectionStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchUpdateMemberEc2DeepInspectionStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchUpdateMemberEc2DeepInspectionStatus{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpBatchUpdateMemberEc2DeepInspectionStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpdateMemberEc2DeepInspectionStatus(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_opBatchUpdateMemberEc2DeepInspectionStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "BatchUpdateMemberEc2DeepInspectionStatus", + } +} diff --git a/service/inspector2/api_op_CreateFindingsReport.go b/service/inspector2/api_op_CreateFindingsReport.go index 162a43fe8d8..1e55565f2ca 100644 --- a/service/inspector2/api_op_CreateFindingsReport.go +++ b/service/inspector2/api_op_CreateFindingsReport.go @@ -11,7 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a finding report. +// Creates a finding report. By default only ACTIVE findings are returned in the +// report. To see SUPRESSED or CLOSED findings you must specify a value for the +// findingStatus filter criteria. func (c *Client) CreateFindingsReport(ctx context.Context, params *CreateFindingsReportInput, optFns ...func(*Options)) (*CreateFindingsReportOutput, error) { if params == nil { params = &CreateFindingsReportInput{} diff --git a/service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go b/service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go new file mode 100644 index 00000000000..9f72d04a504 --- /dev/null +++ b/service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +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/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the activation status of Amazon Inspector deep inspection and custom +// paths associated with your account. +func (c *Client) GetEc2DeepInspectionConfiguration(ctx context.Context, params *GetEc2DeepInspectionConfigurationInput, optFns ...func(*Options)) (*GetEc2DeepInspectionConfigurationOutput, error) { + if params == nil { + params = &GetEc2DeepInspectionConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEc2DeepInspectionConfiguration", params, optFns, c.addOperationGetEc2DeepInspectionConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEc2DeepInspectionConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEc2DeepInspectionConfigurationInput struct { + noSmithyDocumentSerde +} + +type GetEc2DeepInspectionConfigurationOutput struct { + + // An error message explaining why Amazon Inspector deep inspection configurations + // could not be retrieved for your account. + ErrorMessage *string + + // The Amazon Inspector deep inspection custom paths for your organization. + OrgPackagePaths []string + + // The Amazon Inspector deep inspection custom paths for your account. + PackagePaths []string + + // The activation status of Amazon Inspector deep inspection in your account. + Status types.Ec2DeepInspectionStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEc2DeepInspectionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEc2DeepInspectionConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEc2DeepInspectionConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEc2DeepInspectionConfiguration(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_opGetEc2DeepInspectionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "GetEc2DeepInspectionConfiguration", + } +} diff --git a/service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go b/service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go new file mode 100644 index 00000000000..43fb1bba5d9 --- /dev/null +++ b/service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go @@ -0,0 +1,138 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +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/inspector2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Activates, deactivates Amazon Inspector deep inspection, or updates custom +// paths for your account. +func (c *Client) UpdateEc2DeepInspectionConfiguration(ctx context.Context, params *UpdateEc2DeepInspectionConfigurationInput, optFns ...func(*Options)) (*UpdateEc2DeepInspectionConfigurationOutput, error) { + if params == nil { + params = &UpdateEc2DeepInspectionConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateEc2DeepInspectionConfiguration", params, optFns, c.addOperationUpdateEc2DeepInspectionConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateEc2DeepInspectionConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateEc2DeepInspectionConfigurationInput struct { + + // Specify TRUE to activate Amazon Inspector deep inspection in your account, or + // FALSE to deactivate. Member accounts in an organization cannot deactivate deep + // inspection, instead the delegated administrator for the organization can + // deactivate a member account using BatchUpdateMemberEc2DeepInspectionStatus (https://docs.aws.amazon.com/inspector/v2/APIReference/API_BatchUpdateMemberEc2DeepInspectionStatus.html) + // . + ActivateDeepInspection *bool + + // The Amazon Inspector deep inspection custom paths you are adding for your + // account. + PackagePaths []string + + noSmithyDocumentSerde +} + +type UpdateEc2DeepInspectionConfigurationOutput struct { + + // An error message explaining why new Amazon Inspector deep inspection custom + // paths could not be added. + ErrorMessage *string + + // The current Amazon Inspector deep inspection custom paths for the organization. + OrgPackagePaths []string + + // The current Amazon Inspector deep inspection custom paths for your account. + PackagePaths []string + + // The status of Amazon Inspector deep inspection in your account. + Status types.Ec2DeepInspectionStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateEc2DeepInspectionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEc2DeepInspectionConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEc2DeepInspectionConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEc2DeepInspectionConfiguration(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_opUpdateEc2DeepInspectionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "UpdateEc2DeepInspectionConfiguration", + } +} diff --git a/service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go b/service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go new file mode 100644 index 00000000000..cfdb5c91952 --- /dev/null +++ b/service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package inspector2 + +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" +) + +// Updates the Amazon Inspector deep inspection custom paths for your +// organization. You must be an Amazon Inspector delegated administrator to use +// this API. +func (c *Client) UpdateOrgEc2DeepInspectionConfiguration(ctx context.Context, params *UpdateOrgEc2DeepInspectionConfigurationInput, optFns ...func(*Options)) (*UpdateOrgEc2DeepInspectionConfigurationOutput, error) { + if params == nil { + params = &UpdateOrgEc2DeepInspectionConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOrgEc2DeepInspectionConfiguration", params, optFns, c.addOperationUpdateOrgEc2DeepInspectionConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOrgEc2DeepInspectionConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOrgEc2DeepInspectionConfigurationInput struct { + + // The Amazon Inspector deep inspection custom paths you are adding for your + // organization. + // + // This member is required. + OrgPackagePaths []string + + noSmithyDocumentSerde +} + +type UpdateOrgEc2DeepInspectionConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOrgEc2DeepInspectionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateOrgEc2DeepInspectionConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateOrgEc2DeepInspectionConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateOrgEc2DeepInspectionConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOrgEc2DeepInspectionConfiguration(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_opUpdateOrgEc2DeepInspectionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "inspector2", + OperationName: "UpdateOrgEc2DeepInspectionConfiguration", + } +} diff --git a/service/inspector2/deserializers.go b/service/inspector2/deserializers.go index 83e260f7d37..15b473d7dd5 100644 --- a/service/inspector2/deserializers.go +++ b/service/inspector2/deserializers.go @@ -506,14 +506,14 @@ func awsRestjson1_deserializeOpDocumentBatchGetFreeTrialInfoOutput(v **BatchGetF return nil } -type awsRestjson1_deserializeOpCancelFindingsReport struct { +type awsRestjson1_deserializeOpBatchGetMemberEc2DeepInspectionStatus struct { } -func (*awsRestjson1_deserializeOpCancelFindingsReport) ID() string { +func (*awsRestjson1_deserializeOpBatchGetMemberEc2DeepInspectionStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCancelFindingsReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchGetMemberEc2DeepInspectionStatus) 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) @@ -527,9 +527,9 @@ func (m *awsRestjson1_deserializeOpCancelFindingsReport) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCancelFindingsReport(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchGetMemberEc2DeepInspectionStatus(response, &metadata) } - output := &CancelFindingsReportOutput{} + output := &BatchGetMemberEc2DeepInspectionStatusOutput{} out.Result = output var buff [1024]byte @@ -550,7 +550,7 @@ func (m *awsRestjson1_deserializeOpCancelFindingsReport) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentBatchGetMemberEc2DeepInspectionStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -563,7 +563,7 @@ func (m *awsRestjson1_deserializeOpCancelFindingsReport) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCancelFindingsReport(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchGetMemberEc2DeepInspectionStatus(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)} @@ -610,9 +610,6 @@ func awsRestjson1_deserializeOpErrorCancelFindingsReport(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -629,7 +626,7 @@ func awsRestjson1_deserializeOpErrorCancelFindingsReport(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(v **CancelFindingsReportOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentBatchGetMemberEc2DeepInspectionStatusOutput(v **BatchGetMemberEc2DeepInspectionStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -642,22 +639,23 @@ func awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(v **CancelFind return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CancelFindingsReportOutput + var sv *BatchGetMemberEc2DeepInspectionStatusOutput if *v == nil { - sv = &CancelFindingsReportOutput{} + sv = &BatchGetMemberEc2DeepInspectionStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "reportId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReportId to be of type string, got %T instead", value) - } - sv.ReportId = ptr.String(jtv) + case "accountIds": + if err := awsRestjson1_deserializeDocumentMemberAccountEc2DeepInspectionStatusStateList(&sv.AccountIds, value); err != nil { + return err + } + + case "failedAccountIds": + if err := awsRestjson1_deserializeDocumentFailedMemberAccountEc2DeepInspectionStatusStateList(&sv.FailedAccountIds, value); err != nil { + return err } default: @@ -669,14 +667,14 @@ func awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(v **CancelFind return nil } -type awsRestjson1_deserializeOpCreateFilter struct { +type awsRestjson1_deserializeOpBatchUpdateMemberEc2DeepInspectionStatus struct { } -func (*awsRestjson1_deserializeOpCreateFilter) ID() string { +func (*awsRestjson1_deserializeOpBatchUpdateMemberEc2DeepInspectionStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchUpdateMemberEc2DeepInspectionStatus) 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) @@ -690,9 +688,9 @@ func (m *awsRestjson1_deserializeOpCreateFilter) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFilter(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchUpdateMemberEc2DeepInspectionStatus(response, &metadata) } - output := &CreateFilterOutput{} + output := &BatchUpdateMemberEc2DeepInspectionStatusOutput{} out.Result = output var buff [1024]byte @@ -713,7 +711,7 @@ func (m *awsRestjson1_deserializeOpCreateFilter) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateFilterOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentBatchUpdateMemberEc2DeepInspectionStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -726,7 +724,7 @@ func (m *awsRestjson1_deserializeOpCreateFilter) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchUpdateMemberEc2DeepInspectionStatus(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)} @@ -770,15 +768,9 @@ func awsRestjson1_deserializeOpErrorCreateFilter(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -795,7 +787,7 @@ func awsRestjson1_deserializeOpErrorCreateFilter(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateFilterOutput(v **CreateFilterOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentBatchUpdateMemberEc2DeepInspectionStatusOutput(v **BatchUpdateMemberEc2DeepInspectionStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -808,22 +800,23 @@ func awsRestjson1_deserializeOpDocumentCreateFilterOutput(v **CreateFilterOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateFilterOutput + var sv *BatchUpdateMemberEc2DeepInspectionStatusOutput if *v == nil { - sv = &CreateFilterOutput{} + sv = &BatchUpdateMemberEc2DeepInspectionStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FilterArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) + case "accountIds": + if err := awsRestjson1_deserializeDocumentMemberAccountEc2DeepInspectionStatusStateList(&sv.AccountIds, value); err != nil { + return err + } + + case "failedAccountIds": + if err := awsRestjson1_deserializeDocumentFailedMemberAccountEc2DeepInspectionStatusStateList(&sv.FailedAccountIds, value); err != nil { + return err } default: @@ -835,14 +828,14 @@ func awsRestjson1_deserializeOpDocumentCreateFilterOutput(v **CreateFilterOutput return nil } -type awsRestjson1_deserializeOpCreateFindingsReport struct { +type awsRestjson1_deserializeOpCancelFindingsReport struct { } -func (*awsRestjson1_deserializeOpCreateFindingsReport) ID() string { +func (*awsRestjson1_deserializeOpCancelFindingsReport) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateFindingsReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCancelFindingsReport) 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) @@ -856,9 +849,9 @@ func (m *awsRestjson1_deserializeOpCreateFindingsReport) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFindingsReport(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCancelFindingsReport(response, &metadata) } - output := &CreateFindingsReportOutput{} + output := &CancelFindingsReportOutput{} out.Result = output var buff [1024]byte @@ -879,7 +872,7 @@ func (m *awsRestjson1_deserializeOpCreateFindingsReport) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -892,7 +885,7 @@ func (m *awsRestjson1_deserializeOpCreateFindingsReport) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateFindingsReport(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCancelFindingsReport(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)} @@ -958,7 +951,7 @@ func awsRestjson1_deserializeOpErrorCreateFindingsReport(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(v **CreateFindingsReportOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCancelFindingsReportOutput(v **CancelFindingsReportOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -971,9 +964,9 @@ func awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(v **CreateFind return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateFindingsReportOutput + var sv *CancelFindingsReportOutput if *v == nil { - sv = &CreateFindingsReportOutput{} + sv = &CancelFindingsReportOutput{} } else { sv = *v } @@ -998,14 +991,14 @@ func awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(v **CreateFind return nil } -type awsRestjson1_deserializeOpDeleteFilter struct { +type awsRestjson1_deserializeOpCreateFilter struct { } -func (*awsRestjson1_deserializeOpDeleteFilter) ID() string { +func (*awsRestjson1_deserializeOpCreateFilter) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateFilter) 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) @@ -1019,9 +1012,9 @@ func (m *awsRestjson1_deserializeOpDeleteFilter) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFilter(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateFilter(response, &metadata) } - output := &DeleteFilterOutput{} + output := &CreateFilterOutput{} out.Result = output var buff [1024]byte @@ -1042,7 +1035,7 @@ func (m *awsRestjson1_deserializeOpDeleteFilter) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteFilterOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateFilterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1055,7 +1048,7 @@ func (m *awsRestjson1_deserializeOpDeleteFilter) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateFilter(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)} @@ -1099,11 +1092,14 @@ func awsRestjson1_deserializeOpErrorDeleteFilter(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1121,7 +1117,7 @@ func awsRestjson1_deserializeOpErrorDeleteFilter(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDeleteFilterOutput(v **DeleteFilterOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateFilterOutput(v **CreateFilterOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1134,9 +1130,9 @@ func awsRestjson1_deserializeOpDocumentDeleteFilterOutput(v **DeleteFilterOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteFilterOutput + var sv *CreateFilterOutput if *v == nil { - sv = &DeleteFilterOutput{} + sv = &CreateFilterOutput{} } else { sv = *v } @@ -1161,14 +1157,14 @@ func awsRestjson1_deserializeOpDocumentDeleteFilterOutput(v **DeleteFilterOutput return nil } -type awsRestjson1_deserializeOpDescribeOrganizationConfiguration struct { +type awsRestjson1_deserializeOpCreateFindingsReport struct { } -func (*awsRestjson1_deserializeOpDescribeOrganizationConfiguration) ID() string { +func (*awsRestjson1_deserializeOpCreateFindingsReport) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeOrganizationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateFindingsReport) 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) @@ -1182,9 +1178,9 @@ func (m *awsRestjson1_deserializeOpDescribeOrganizationConfiguration) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateFindingsReport(response, &metadata) } - output := &DescribeOrganizationConfigurationOutput{} + output := &CreateFindingsReportOutput{} out.Result = output var buff [1024]byte @@ -1205,7 +1201,7 @@ func (m *awsRestjson1_deserializeOpDescribeOrganizationConfiguration) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1218,7 +1214,7 @@ func (m *awsRestjson1_deserializeOpDescribeOrganizationConfiguration) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateFindingsReport(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)} @@ -1265,6 +1261,9 @@ func awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(response * case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1281,7 +1280,7 @@ func awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(response * } } -func awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(v **DescribeOrganizationConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateFindingsReportOutput(v **CreateFindingsReportOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1294,27 +1293,22 @@ func awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeOrganizationConfigurationOutput + var sv *CreateFindingsReportOutput if *v == nil { - sv = &DescribeOrganizationConfigurationOutput{} + sv = &CreateFindingsReportOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "autoEnable": - if err := awsRestjson1_deserializeDocumentAutoEnable(&sv.AutoEnable, value); err != nil { - return err - } - - case "maxAccountLimitReached": + case "reportId": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ReportId to be of type string, got %T instead", value) } - sv.MaxAccountLimitReached = ptr.Bool(jtv) + sv.ReportId = ptr.String(jtv) } default: @@ -1326,14 +1320,14 @@ func awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(v return nil } -type awsRestjson1_deserializeOpDisable struct { +type awsRestjson1_deserializeOpDeleteFilter struct { } -func (*awsRestjson1_deserializeOpDisable) ID() string { +func (*awsRestjson1_deserializeOpDeleteFilter) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteFilter) 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) @@ -1347,9 +1341,9 @@ func (m *awsRestjson1_deserializeOpDisable) HandleDeserialize(ctx context.Contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisable(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFilter(response, &metadata) } - output := &DisableOutput{} + output := &DeleteFilterOutput{} out.Result = output var buff [1024]byte @@ -1370,7 +1364,7 @@ func (m *awsRestjson1_deserializeOpDisable) HandleDeserialize(ctx context.Contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisableOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteFilterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1383,7 +1377,7 @@ func (m *awsRestjson1_deserializeOpDisable) HandleDeserialize(ctx context.Contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteFilter(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)} @@ -1449,7 +1443,7 @@ func awsRestjson1_deserializeOpErrorDisable(response *smithyhttp.Response, metad } } -func awsRestjson1_deserializeOpDocumentDisableOutput(v **DisableOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteFilterOutput(v **DeleteFilterOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1462,23 +1456,22 @@ func awsRestjson1_deserializeOpDocumentDisableOutput(v **DisableOutput, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisableOutput + var sv *DeleteFilterOutput if *v == nil { - sv = &DisableOutput{} + sv = &DeleteFilterOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "accounts": - if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { - return err - } - - case "failedAccounts": - if err := awsRestjson1_deserializeDocumentFailedAccountList(&sv.FailedAccounts, value); err != nil { - return err + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } default: @@ -1490,14 +1483,14 @@ func awsRestjson1_deserializeOpDocumentDisableOutput(v **DisableOutput, value in return nil } -type awsRestjson1_deserializeOpDisableDelegatedAdminAccount struct { +type awsRestjson1_deserializeOpDescribeOrganizationConfiguration struct { } -func (*awsRestjson1_deserializeOpDisableDelegatedAdminAccount) ID() string { +func (*awsRestjson1_deserializeOpDescribeOrganizationConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisableDelegatedAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeOrganizationConfiguration) 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) @@ -1511,9 +1504,9 @@ func (m *awsRestjson1_deserializeOpDisableDelegatedAdminAccount) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(response, &metadata) } - output := &DisableDelegatedAdminAccountOutput{} + output := &DescribeOrganizationConfigurationOutput{} out.Result = output var buff [1024]byte @@ -1534,7 +1527,7 @@ func (m *awsRestjson1_deserializeOpDisableDelegatedAdminAccount) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1547,7 +1540,7 @@ func (m *awsRestjson1_deserializeOpDisableDelegatedAdminAccount) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeOrganizationConfiguration(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)} @@ -1591,15 +1584,9 @@ func awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(response *smith case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1616,7 +1603,7 @@ func awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(response *smith } } -func awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(v **DisableDelegatedAdminAccountOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeOrganizationConfigurationOutput(v **DescribeOrganizationConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1629,22 +1616,27 @@ func awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(v **Di return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisableDelegatedAdminAccountOutput + var sv *DescribeOrganizationConfigurationOutput if *v == nil { - sv = &DisableDelegatedAdminAccountOutput{} + sv = &DescribeOrganizationConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "delegatedAdminAccountId": + case "autoEnable": + if err := awsRestjson1_deserializeDocumentAutoEnable(&sv.AutoEnable, value); err != nil { + return err + } + + case "maxAccountLimitReached": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.DelegatedAdminAccountId = ptr.String(jtv) + sv.MaxAccountLimitReached = ptr.Bool(jtv) } default: @@ -1656,14 +1648,14 @@ func awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(v **Di return nil } -type awsRestjson1_deserializeOpDisassociateMember struct { +type awsRestjson1_deserializeOpDisable struct { } -func (*awsRestjson1_deserializeOpDisassociateMember) ID() string { +func (*awsRestjson1_deserializeOpDisable) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisable) 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) @@ -1677,9 +1669,9 @@ func (m *awsRestjson1_deserializeOpDisassociateMember) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateMember(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisable(response, &metadata) } - output := &DisassociateMemberOutput{} + output := &DisableOutput{} out.Result = output var buff [1024]byte @@ -1700,7 +1692,7 @@ func (m *awsRestjson1_deserializeOpDisassociateMember) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1713,7 +1705,7 @@ func (m *awsRestjson1_deserializeOpDisassociateMember) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisable(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)} @@ -1760,6 +1752,9 @@ func awsRestjson1_deserializeOpErrorDisassociateMember(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1776,7 +1771,7 @@ func awsRestjson1_deserializeOpErrorDisassociateMember(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(v **DisassociateMemberOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisableOutput(v **DisableOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1789,22 +1784,23 @@ func awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(v **Disassociate return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateMemberOutput + var sv *DisableOutput if *v == nil { - sv = &DisassociateMemberOutput{} + sv = &DisableOutput{} } else { sv = *v } 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 "accounts": + if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { + return err + } + + case "failedAccounts": + if err := awsRestjson1_deserializeDocumentFailedAccountList(&sv.FailedAccounts, value); err != nil { + return err } default: @@ -1816,14 +1812,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(v **Disassociate return nil } -type awsRestjson1_deserializeOpEnable struct { +type awsRestjson1_deserializeOpDisableDelegatedAdminAccount struct { } -func (*awsRestjson1_deserializeOpEnable) ID() string { +func (*awsRestjson1_deserializeOpDisableDelegatedAdminAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpEnable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisableDelegatedAdminAccount) 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) @@ -1837,9 +1833,9 @@ func (m *awsRestjson1_deserializeOpEnable) HandleDeserialize(ctx context.Context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorEnable(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(response, &metadata) } - output := &EnableOutput{} + output := &DisableDelegatedAdminAccountOutput{} out.Result = output var buff [1024]byte @@ -1860,7 +1856,7 @@ func (m *awsRestjson1_deserializeOpEnable) HandleDeserialize(ctx context.Context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentEnableOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1873,7 +1869,7 @@ func (m *awsRestjson1_deserializeOpEnable) HandleDeserialize(ctx context.Context return out, metadata, err } -func awsRestjson1_deserializeOpErrorEnable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisableDelegatedAdminAccount(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)} @@ -1917,6 +1913,9 @@ func awsRestjson1_deserializeOpErrorEnable(response *smithyhttp.Response, metada case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -1939,7 +1938,7 @@ func awsRestjson1_deserializeOpErrorEnable(response *smithyhttp.Response, metada } } -func awsRestjson1_deserializeOpDocumentEnableOutput(v **EnableOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisableDelegatedAdminAccountOutput(v **DisableDelegatedAdminAccountOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1952,23 +1951,22 @@ func awsRestjson1_deserializeOpDocumentEnableOutput(v **EnableOutput, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *EnableOutput + var sv *DisableDelegatedAdminAccountOutput if *v == nil { - sv = &EnableOutput{} + sv = &DisableDelegatedAdminAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "accounts": - if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { - return err - } - - case "failedAccounts": - if err := awsRestjson1_deserializeDocumentFailedAccountList(&sv.FailedAccounts, value); err != nil { - return err + case "delegatedAdminAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.DelegatedAdminAccountId = ptr.String(jtv) } default: @@ -1980,14 +1978,14 @@ func awsRestjson1_deserializeOpDocumentEnableOutput(v **EnableOutput, value inte return nil } -type awsRestjson1_deserializeOpEnableDelegatedAdminAccount struct { +type awsRestjson1_deserializeOpDisassociateMember struct { } -func (*awsRestjson1_deserializeOpEnableDelegatedAdminAccount) ID() string { +func (*awsRestjson1_deserializeOpDisassociateMember) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpEnableDelegatedAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateMember) 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) @@ -2001,9 +1999,9 @@ func (m *awsRestjson1_deserializeOpEnableDelegatedAdminAccount) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateMember(response, &metadata) } - output := &EnableDelegatedAdminAccountOutput{} + output := &DisassociateMemberOutput{} out.Result = output var buff [1024]byte @@ -2024,7 +2022,7 @@ func (m *awsRestjson1_deserializeOpEnableDelegatedAdminAccount) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2037,7 +2035,7 @@ func (m *awsRestjson1_deserializeOpEnableDelegatedAdminAccount) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateMember(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)} @@ -2081,15 +2079,9 @@ func awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(response *smithy case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2106,7 +2098,7 @@ func awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(response *smithy } } -func awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(v **EnableDelegatedAdminAccountOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateMemberOutput(v **DisassociateMemberOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2119,22 +2111,22 @@ func awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(v **Ena return fmt.Errorf("unexpected JSON type %v", value) } - var sv *EnableDelegatedAdminAccountOutput + var sv *DisassociateMemberOutput if *v == nil { - sv = &EnableDelegatedAdminAccountOutput{} + sv = &DisassociateMemberOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "delegatedAdminAccountId": + 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.DelegatedAdminAccountId = ptr.String(jtv) + sv.AccountId = ptr.String(jtv) } default: @@ -2146,14 +2138,14 @@ func awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(v **Ena return nil } -type awsRestjson1_deserializeOpGetConfiguration struct { +type awsRestjson1_deserializeOpEnable struct { } -func (*awsRestjson1_deserializeOpGetConfiguration) ID() string { +func (*awsRestjson1_deserializeOpEnable) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpEnable) 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) @@ -2167,9 +2159,9 @@ func (m *awsRestjson1_deserializeOpGetConfiguration) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorEnable(response, &metadata) } - output := &GetConfigurationOutput{} + output := &EnableOutput{} out.Result = output var buff [1024]byte @@ -2190,7 +2182,7 @@ func (m *awsRestjson1_deserializeOpGetConfiguration) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentEnableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2203,7 +2195,7 @@ func (m *awsRestjson1_deserializeOpGetConfiguration) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorEnable(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)} @@ -2244,6 +2236,9 @@ func awsRestjson1_deserializeOpErrorGetConfiguration(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -2253,6 +2248,9 @@ func awsRestjson1_deserializeOpErrorGetConfiguration(response *smithyhttp.Respon case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2263,7 +2261,7 @@ func awsRestjson1_deserializeOpErrorGetConfiguration(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetConfigurationOutput(v **GetConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentEnableOutput(v **EnableOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2276,17 +2274,22 @@ func awsRestjson1_deserializeOpDocumentGetConfigurationOutput(v **GetConfigurati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetConfigurationOutput + var sv *EnableOutput if *v == nil { - sv = &GetConfigurationOutput{} + sv = &EnableOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ecrConfiguration": - if err := awsRestjson1_deserializeDocumentEcrConfigurationState(&sv.EcrConfiguration, value); err != nil { + case "accounts": + if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { + return err + } + + case "failedAccounts": + if err := awsRestjson1_deserializeDocumentFailedAccountList(&sv.FailedAccounts, value); err != nil { return err } @@ -2299,14 +2302,14 @@ func awsRestjson1_deserializeOpDocumentGetConfigurationOutput(v **GetConfigurati return nil } -type awsRestjson1_deserializeOpGetDelegatedAdminAccount struct { +type awsRestjson1_deserializeOpEnableDelegatedAdminAccount struct { } -func (*awsRestjson1_deserializeOpGetDelegatedAdminAccount) ID() string { +func (*awsRestjson1_deserializeOpEnableDelegatedAdminAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDelegatedAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpEnableDelegatedAdminAccount) 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) @@ -2320,9 +2323,9 @@ func (m *awsRestjson1_deserializeOpGetDelegatedAdminAccount) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(response, &metadata) } - output := &GetDelegatedAdminAccountOutput{} + output := &EnableDelegatedAdminAccountOutput{} out.Result = output var buff [1024]byte @@ -2343,7 +2346,7 @@ func (m *awsRestjson1_deserializeOpGetDelegatedAdminAccount) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2356,7 +2359,7 @@ func (m *awsRestjson1_deserializeOpGetDelegatedAdminAccount) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorEnableDelegatedAdminAccount(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)} @@ -2400,6 +2403,9 @@ func awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(response *smithyhtt case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -2422,7 +2428,7 @@ func awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(v **GetDelegatedAdminAccountOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentEnableDelegatedAdminAccountOutput(v **EnableDelegatedAdminAccountOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2435,18 +2441,22 @@ func awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(v **GetDel return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDelegatedAdminAccountOutput + var sv *EnableDelegatedAdminAccountOutput if *v == nil { - sv = &GetDelegatedAdminAccountOutput{} + sv = &EnableDelegatedAdminAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "delegatedAdmin": - if err := awsRestjson1_deserializeDocumentDelegatedAdmin(&sv.DelegatedAdmin, value); err != nil { - return err + case "delegatedAdminAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.DelegatedAdminAccountId = ptr.String(jtv) } default: @@ -2458,14 +2468,14 @@ func awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(v **GetDel return nil } -type awsRestjson1_deserializeOpGetFindingsReportStatus struct { +type awsRestjson1_deserializeOpGetConfiguration struct { } -func (*awsRestjson1_deserializeOpGetFindingsReportStatus) ID() string { +func (*awsRestjson1_deserializeOpGetConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetFindingsReportStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetConfiguration) 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) @@ -2479,9 +2489,9 @@ func (m *awsRestjson1_deserializeOpGetFindingsReportStatus) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetConfiguration(response, &metadata) } - output := &GetFindingsReportStatusOutput{} + output := &GetConfigurationOutput{} out.Result = output var buff [1024]byte @@ -2502,7 +2512,7 @@ func (m *awsRestjson1_deserializeOpGetFindingsReportStatus) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2515,7 +2525,7 @@ func (m *awsRestjson1_deserializeOpGetFindingsReportStatus) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetConfiguration(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)} @@ -2556,9 +2566,6 @@ func awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response *smithyhttp } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -2568,9 +2575,6 @@ func awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response *smithyhttp case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2581,7 +2585,7 @@ func awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(v **GetFindingsReportStatusOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetConfigurationOutput(v **GetConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2594,61 +2598,20 @@ func awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(v **GetFind return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetFindingsReportStatusOutput + var sv *GetConfigurationOutput if *v == nil { - sv = &GetFindingsReportStatusOutput{} + sv = &GetConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "destination": - if err := awsRestjson1_deserializeDocumentDestination(&sv.Destination, value); err != nil { - return err - } - - case "errorCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReportingErrorCode to be of type string, got %T instead", value) - } - sv.ErrorCode = types.ReportingErrorCode(jtv) - } - - case "errorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - case "filterCriteria": - if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + case "ecrConfiguration": + if err := awsRestjson1_deserializeDocumentEcrConfigurationState(&sv.EcrConfiguration, value); err != nil { return err } - case "reportId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReportId to be of type string, got %T instead", value) - } - sv.ReportId = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExternalReportStatus to be of type string, got %T instead", value) - } - sv.Status = types.ExternalReportStatus(jtv) - } - default: _, _ = key, value @@ -2658,14 +2621,14 @@ func awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(v **GetFind return nil } -type awsRestjson1_deserializeOpGetMember struct { +type awsRestjson1_deserializeOpGetDelegatedAdminAccount struct { } -func (*awsRestjson1_deserializeOpGetMember) ID() string { +func (*awsRestjson1_deserializeOpGetDelegatedAdminAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDelegatedAdminAccount) 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) @@ -2679,9 +2642,9 @@ func (m *awsRestjson1_deserializeOpGetMember) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMember(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(response, &metadata) } - output := &GetMemberOutput{} + output := &GetDelegatedAdminAccountOutput{} out.Result = output var buff [1024]byte @@ -2702,7 +2665,7 @@ func (m *awsRestjson1_deserializeOpGetMember) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetMemberOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2715,7 +2678,7 @@ func (m *awsRestjson1_deserializeOpGetMember) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDelegatedAdminAccount(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)} @@ -2781,7 +2744,7 @@ func awsRestjson1_deserializeOpErrorGetMember(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentGetMemberOutput(v **GetMemberOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDelegatedAdminAccountOutput(v **GetDelegatedAdminAccountOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2794,17 +2757,17 @@ func awsRestjson1_deserializeOpDocumentGetMemberOutput(v **GetMemberOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetMemberOutput + var sv *GetDelegatedAdminAccountOutput if *v == nil { - sv = &GetMemberOutput{} + sv = &GetDelegatedAdminAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "member": - if err := awsRestjson1_deserializeDocumentMember(&sv.Member, value); err != nil { + case "delegatedAdmin": + if err := awsRestjson1_deserializeDocumentDelegatedAdmin(&sv.DelegatedAdmin, value); err != nil { return err } @@ -2817,14 +2780,14 @@ func awsRestjson1_deserializeOpDocumentGetMemberOutput(v **GetMemberOutput, valu return nil } -type awsRestjson1_deserializeOpListAccountPermissions struct { +type awsRestjson1_deserializeOpGetEc2DeepInspectionConfiguration struct { } -func (*awsRestjson1_deserializeOpListAccountPermissions) ID() string { +func (*awsRestjson1_deserializeOpGetEc2DeepInspectionConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAccountPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetEc2DeepInspectionConfiguration) 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) @@ -2838,9 +2801,9 @@ func (m *awsRestjson1_deserializeOpListAccountPermissions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAccountPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetEc2DeepInspectionConfiguration(response, &metadata) } - output := &ListAccountPermissionsOutput{} + output := &GetEc2DeepInspectionConfigurationOutput{} out.Result = output var buff [1024]byte @@ -2861,7 +2824,7 @@ func (m *awsRestjson1_deserializeOpListAccountPermissions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetEc2DeepInspectionConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2874,7 +2837,7 @@ func (m *awsRestjson1_deserializeOpListAccountPermissions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAccountPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetEc2DeepInspectionConfiguration(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)} @@ -2921,12 +2884,12 @@ func awsRestjson1_deserializeOpErrorListAccountPermissions(response *smithyhttp. case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2937,7 +2900,7 @@ func awsRestjson1_deserializeOpErrorListAccountPermissions(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(v **ListAccountPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetEc2DeepInspectionConfigurationOutput(v **GetEc2DeepInspectionConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2950,29 +2913,43 @@ func awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(v **ListAcco return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAccountPermissionsOutput + var sv *GetEc2DeepInspectionConfigurationOutput if *v == nil { - sv = &ListAccountPermissionsOutput{} + sv = &GetEc2DeepInspectionConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "errorMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.ErrorMessage = ptr.String(jtv) } - case "permissions": - if err := awsRestjson1_deserializeDocumentPermissions(&sv.Permissions, value); err != nil { + case "orgPackagePaths": + if err := awsRestjson1_deserializeDocumentPathList(&sv.OrgPackagePaths, value); err != nil { + return err + } + + case "packagePaths": + if err := awsRestjson1_deserializeDocumentPathList(&sv.PackagePaths, value); err != nil { return err } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ec2DeepInspectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.Ec2DeepInspectionStatus(jtv) + } + default: _, _ = key, value @@ -2982,14 +2959,14 @@ func awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(v **ListAcco return nil } -type awsRestjson1_deserializeOpListCoverage struct { +type awsRestjson1_deserializeOpGetFindingsReportStatus struct { } -func (*awsRestjson1_deserializeOpListCoverage) ID() string { +func (*awsRestjson1_deserializeOpGetFindingsReportStatus) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCoverage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetFindingsReportStatus) 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) @@ -3003,9 +2980,9 @@ func (m *awsRestjson1_deserializeOpListCoverage) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCoverage(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetFindingsReportStatus(response, &metadata) } - output := &ListCoverageOutput{} + output := &GetFindingsReportStatusOutput{} out.Result = output var buff [1024]byte @@ -3026,7 +3003,7 @@ func (m *awsRestjson1_deserializeOpListCoverage) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCoverageOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3039,7 +3016,7 @@ func (m *awsRestjson1_deserializeOpListCoverage) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCoverage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetFindingsReportStatus(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)} @@ -3080,9 +3057,15 @@ func awsRestjson1_deserializeOpErrorListCoverage(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -3099,7 +3082,7 @@ func awsRestjson1_deserializeOpErrorListCoverage(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListCoverageOutput(v **ListCoverageOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetFindingsReportStatusOutput(v **GetFindingsReportStatusOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3112,27 +3095,59 @@ func awsRestjson1_deserializeOpDocumentListCoverageOutput(v **ListCoverageOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCoverageOutput + var sv *GetFindingsReportStatusOutput if *v == nil { - sv = &ListCoverageOutput{} + sv = &GetFindingsReportStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "coveredResources": - if err := awsRestjson1_deserializeDocumentCoveredResources(&sv.CoveredResources, value); err != nil { + case "destination": + if err := awsRestjson1_deserializeDocumentDestination(&sv.Destination, value); err != nil { return err } - case "nextToken": + case "errorCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected ReportingErrorCode to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.ErrorCode = types.ReportingErrorCode(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "filterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + + case "reportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportId to be of type string, got %T instead", value) + } + sv.ReportId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalReportStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExternalReportStatus(jtv) } default: @@ -3144,14 +3159,14 @@ func awsRestjson1_deserializeOpDocumentListCoverageOutput(v **ListCoverageOutput return nil } -type awsRestjson1_deserializeOpListCoverageStatistics struct { +type awsRestjson1_deserializeOpGetMember struct { } -func (*awsRestjson1_deserializeOpListCoverageStatistics) ID() string { +func (*awsRestjson1_deserializeOpGetMember) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCoverageStatistics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetMember) 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) @@ -3165,9 +3180,9 @@ func (m *awsRestjson1_deserializeOpListCoverageStatistics) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCoverageStatistics(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetMember(response, &metadata) } - output := &ListCoverageStatisticsOutput{} + output := &GetMemberOutput{} out.Result = output var buff [1024]byte @@ -3188,7 +3203,7 @@ func (m *awsRestjson1_deserializeOpListCoverageStatistics) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetMemberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3201,7 +3216,7 @@ func (m *awsRestjson1_deserializeOpListCoverageStatistics) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCoverageStatistics(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetMember(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)} @@ -3242,9 +3257,15 @@ func awsRestjson1_deserializeOpErrorListCoverageStatistics(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -3261,7 +3282,7 @@ func awsRestjson1_deserializeOpErrorListCoverageStatistics(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(v **ListCoverageStatisticsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetMemberOutput(v **GetMemberOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3274,42 +3295,20 @@ func awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(v **ListCove return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCoverageStatisticsOutput + var sv *GetMemberOutput if *v == nil { - sv = &ListCoverageStatisticsOutput{} + sv = &GetMemberOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "countsByGroup": - if err := awsRestjson1_deserializeDocumentCountsList(&sv.CountsByGroup, value); err != nil { + case "member": + if err := awsRestjson1_deserializeDocumentMember(&sv.Member, value); err != nil { return err } - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "totalCounts": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.TotalCounts = ptr.Int64(i64) - } - default: _, _ = key, value @@ -3319,14 +3318,14 @@ func awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(v **ListCove return nil } -type awsRestjson1_deserializeOpListDelegatedAdminAccounts struct { +type awsRestjson1_deserializeOpListAccountPermissions struct { } -func (*awsRestjson1_deserializeOpListDelegatedAdminAccounts) ID() string { +func (*awsRestjson1_deserializeOpListAccountPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDelegatedAdminAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAccountPermissions) 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) @@ -3340,9 +3339,9 @@ func (m *awsRestjson1_deserializeOpListDelegatedAdminAccounts) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDelegatedAdminAccounts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAccountPermissions(response, &metadata) } - output := &ListDelegatedAdminAccountsOutput{} + output := &ListAccountPermissionsOutput{} out.Result = output var buff [1024]byte @@ -3363,7 +3362,7 @@ func (m *awsRestjson1_deserializeOpListDelegatedAdminAccounts) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3376,7 +3375,7 @@ func (m *awsRestjson1_deserializeOpListDelegatedAdminAccounts) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDelegatedAdminAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAccountPermissions(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)} @@ -3439,7 +3438,7 @@ func awsRestjson1_deserializeOpErrorListDelegatedAdminAccounts(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(v **ListDelegatedAdminAccountsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAccountPermissionsOutput(v **ListAccountPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3452,20 +3451,15 @@ func awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDelegatedAdminAccountsOutput + var sv *ListAccountPermissionsOutput if *v == nil { - sv = &ListDelegatedAdminAccountsOutput{} + sv = &ListAccountPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "delegatedAdminAccounts": - if err := awsRestjson1_deserializeDocumentDelegatedAdminAccountList(&sv.DelegatedAdminAccounts, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) @@ -3475,6 +3469,11 @@ func awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(v **List sv.NextToken = ptr.String(jtv) } + case "permissions": + if err := awsRestjson1_deserializeDocumentPermissions(&sv.Permissions, value); err != nil { + return err + } + default: _, _ = key, value @@ -3484,14 +3483,14 @@ func awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(v **List return nil } -type awsRestjson1_deserializeOpListFilters struct { +type awsRestjson1_deserializeOpListCoverage struct { } -func (*awsRestjson1_deserializeOpListFilters) ID() string { +func (*awsRestjson1_deserializeOpListCoverage) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCoverage) 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) @@ -3505,9 +3504,9 @@ func (m *awsRestjson1_deserializeOpListFilters) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFilters(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCoverage(response, &metadata) } - output := &ListFiltersOutput{} + output := &ListCoverageOutput{} out.Result = output var buff [1024]byte @@ -3528,7 +3527,7 @@ func (m *awsRestjson1_deserializeOpListFilters) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFiltersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCoverageOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3541,7 +3540,7 @@ func (m *awsRestjson1_deserializeOpListFilters) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCoverage(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)} @@ -3582,9 +3581,6 @@ func awsRestjson1_deserializeOpErrorListFilters(response *smithyhttp.Response, m } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3604,7 +3600,7 @@ func awsRestjson1_deserializeOpErrorListFilters(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListFiltersOutput(v **ListFiltersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCoverageOutput(v **ListCoverageOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3617,17 +3613,17 @@ func awsRestjson1_deserializeOpDocumentListFiltersOutput(v **ListFiltersOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFiltersOutput + var sv *ListCoverageOutput if *v == nil { - sv = &ListFiltersOutput{} + sv = &ListCoverageOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "filters": - if err := awsRestjson1_deserializeDocumentFilterList(&sv.Filters, value); err != nil { + case "coveredResources": + if err := awsRestjson1_deserializeDocumentCoveredResources(&sv.CoveredResources, value); err != nil { return err } @@ -3649,14 +3645,14 @@ func awsRestjson1_deserializeOpDocumentListFiltersOutput(v **ListFiltersOutput, return nil } -type awsRestjson1_deserializeOpListFindingAggregations struct { +type awsRestjson1_deserializeOpListCoverageStatistics struct { } -func (*awsRestjson1_deserializeOpListFindingAggregations) ID() string { +func (*awsRestjson1_deserializeOpListCoverageStatistics) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFindingAggregations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCoverageStatistics) 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) @@ -3670,9 +3666,9 @@ func (m *awsRestjson1_deserializeOpListFindingAggregations) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFindingAggregations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCoverageStatistics(response, &metadata) } - output := &ListFindingAggregationsOutput{} + output := &ListCoverageStatisticsOutput{} out.Result = output var buff [1024]byte @@ -3693,7 +3689,7 @@ func (m *awsRestjson1_deserializeOpListFindingAggregations) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3706,7 +3702,7 @@ func (m *awsRestjson1_deserializeOpListFindingAggregations) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFindingAggregations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCoverageStatistics(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)} @@ -3766,7 +3762,7 @@ func awsRestjson1_deserializeOpErrorListFindingAggregations(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(v **ListFindingAggregationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCoverageStatisticsOutput(v **ListCoverageStatisticsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3779,22 +3775,18 @@ func awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(v **ListFin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFindingAggregationsOutput + var sv *ListCoverageStatisticsOutput if *v == nil { - sv = &ListFindingAggregationsOutput{} + sv = &ListCoverageStatisticsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "aggregationType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AggregationType to be of type string, got %T instead", value) - } - sv.AggregationType = types.AggregationType(jtv) + case "countsByGroup": + if err := awsRestjson1_deserializeDocumentCountsList(&sv.CountsByGroup, value); err != nil { + return err } case "nextToken": @@ -3806,9 +3798,17 @@ func awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(v **ListFin sv.NextToken = ptr.String(jtv) } - case "responses": - if err := awsRestjson1_deserializeDocumentAggregationResponseList(&sv.Responses, value); err != nil { - return err + case "totalCounts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalCounts = ptr.Int64(i64) } default: @@ -3820,14 +3820,14 @@ func awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(v **ListFin return nil } -type awsRestjson1_deserializeOpListFindings struct { +type awsRestjson1_deserializeOpListDelegatedAdminAccounts struct { } -func (*awsRestjson1_deserializeOpListFindings) ID() string { +func (*awsRestjson1_deserializeOpListDelegatedAdminAccounts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDelegatedAdminAccounts) 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) @@ -3841,9 +3841,9 @@ func (m *awsRestjson1_deserializeOpListFindings) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFindings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDelegatedAdminAccounts(response, &metadata) } - output := &ListFindingsOutput{} + output := &ListDelegatedAdminAccountsOutput{} out.Result = output var buff [1024]byte @@ -3864,7 +3864,7 @@ func (m *awsRestjson1_deserializeOpListFindings) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFindingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3877,7 +3877,7 @@ func (m *awsRestjson1_deserializeOpListFindings) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDelegatedAdminAccounts(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)} @@ -3918,6 +3918,9 @@ func awsRestjson1_deserializeOpErrorListFindings(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3937,7 +3940,7 @@ func awsRestjson1_deserializeOpErrorListFindings(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListFindingsOutput(v **ListFindingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDelegatedAdminAccountsOutput(v **ListDelegatedAdminAccountsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3950,17 +3953,17 @@ func awsRestjson1_deserializeOpDocumentListFindingsOutput(v **ListFindingsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFindingsOutput + var sv *ListDelegatedAdminAccountsOutput if *v == nil { - sv = &ListFindingsOutput{} + sv = &ListDelegatedAdminAccountsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "findings": - if err := awsRestjson1_deserializeDocumentFindingList(&sv.Findings, value); err != nil { + case "delegatedAdminAccounts": + if err := awsRestjson1_deserializeDocumentDelegatedAdminAccountList(&sv.DelegatedAdminAccounts, value); err != nil { return err } @@ -3982,14 +3985,14 @@ func awsRestjson1_deserializeOpDocumentListFindingsOutput(v **ListFindingsOutput return nil } -type awsRestjson1_deserializeOpListMembers struct { +type awsRestjson1_deserializeOpListFilters struct { } -func (*awsRestjson1_deserializeOpListMembers) ID() string { +func (*awsRestjson1_deserializeOpListFilters) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFilters) 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) @@ -4003,9 +4006,9 @@ func (m *awsRestjson1_deserializeOpListMembers) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMembers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFilters(response, &metadata) } - output := &ListMembersOutput{} + output := &ListFiltersOutput{} out.Result = output var buff [1024]byte @@ -4026,7 +4029,7 @@ func (m *awsRestjson1_deserializeOpListMembers) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMembersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFiltersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4039,7 +4042,7 @@ func (m *awsRestjson1_deserializeOpListMembers) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFilters(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)} @@ -4102,7 +4105,7 @@ func awsRestjson1_deserializeOpErrorListMembers(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListMembersOutput(v **ListMembersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFiltersOutput(v **ListFiltersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4115,17 +4118,17 @@ func awsRestjson1_deserializeOpDocumentListMembersOutput(v **ListMembersOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMembersOutput + var sv *ListFiltersOutput if *v == nil { - sv = &ListMembersOutput{} + sv = &ListFiltersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "members": - if err := awsRestjson1_deserializeDocumentMemberList(&sv.Members, value); err != nil { + case "filters": + if err := awsRestjson1_deserializeDocumentFilterList(&sv.Filters, value); err != nil { return err } @@ -4147,14 +4150,14 @@ func awsRestjson1_deserializeOpDocumentListMembersOutput(v **ListMembersOutput, return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListFindingAggregations struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListFindingAggregations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFindingAggregations) 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) @@ -4168,9 +4171,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFindingAggregations(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListFindingAggregationsOutput{} out.Result = output var buff [1024]byte @@ -4191,7 +4194,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4204,7 +4207,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFindingAggregations(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)} @@ -4248,9 +4251,6 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4267,7 +4267,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFindingAggregationsOutput(v **ListFindingAggregationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4280,17 +4280,35 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListFindingAggregationsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListFindingAggregationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "aggregationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AggregationType to be of type string, got %T instead", value) + } + sv.AggregationType = types.AggregationType(jtv) + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "responses": + if err := awsRestjson1_deserializeDocumentAggregationResponseList(&sv.Responses, value); err != nil { return err } @@ -4303,14 +4321,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpListUsageTotals struct { +type awsRestjson1_deserializeOpListFindings struct { } -func (*awsRestjson1_deserializeOpListUsageTotals) ID() string { +func (*awsRestjson1_deserializeOpListFindings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListUsageTotals) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFindings) 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) @@ -4324,9 +4342,9 @@ func (m *awsRestjson1_deserializeOpListUsageTotals) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListUsageTotals(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFindings(response, &metadata) } - output := &ListUsageTotalsOutput{} + output := &ListFindingsOutput{} out.Result = output var buff [1024]byte @@ -4347,7 +4365,7 @@ func (m *awsRestjson1_deserializeOpListUsageTotals) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListUsageTotalsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFindingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4360,7 +4378,7 @@ func (m *awsRestjson1_deserializeOpListUsageTotals) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorListUsageTotals(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFindings(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)} @@ -4401,9 +4419,6 @@ func awsRestjson1_deserializeOpErrorListUsageTotals(response *smithyhttp.Respons } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -4423,7 +4438,7 @@ func awsRestjson1_deserializeOpErrorListUsageTotals(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentListUsageTotalsOutput(v **ListUsageTotalsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFindingsOutput(v **ListFindingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4436,29 +4451,29 @@ func awsRestjson1_deserializeOpDocumentListUsageTotalsOutput(v **ListUsageTotals return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListUsageTotalsOutput + var sv *ListFindingsOutput if *v == nil { - sv = &ListUsageTotalsOutput{} + sv = &ListFindingsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "findings": + if err := awsRestjson1_deserializeDocumentFindingList(&sv.Findings, value); err != nil { + return err + } + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ListUsageTotalsNextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "totals": - if err := awsRestjson1_deserializeDocumentUsageTotalList(&sv.Totals, value); err != nil { - return err - } - default: _, _ = key, value @@ -4468,14 +4483,14 @@ func awsRestjson1_deserializeOpDocumentListUsageTotalsOutput(v **ListUsageTotals return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpListMembers struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpListMembers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMembers) 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) @@ -4489,15 +4504,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMembers(response, &metadata) } - output := &TagResourceOutput{} + output := &ListMembersOutput{} 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_deserializeOpDocumentListMembersOutput(&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_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListMembers(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)} @@ -4538,15 +4581,12 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4563,14 +4603,59 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +func awsRestjson1_deserializeOpDocumentListMembersOutput(v **ListMembersOutput, 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 *ListMembersOutput + if *v == nil { + sv = &ListMembersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "members": + if err := awsRestjson1_deserializeDocumentMemberList(&sv.Members, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_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) @@ -4584,15 +4669,43 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListTagsForResourceOutput{} 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_deserializeOpDocumentListTagsForResourceOutput(&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_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_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)} @@ -4655,36 +4768,544 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateConfiguration struct { -} - -func (*awsRestjson1_deserializeOpUpdateConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateConfiguration) 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 +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + if value == nil { + return nil } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateConfiguration(response, &metadata) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListUsageTotals struct { +} + +func (*awsRestjson1_deserializeOpListUsageTotals) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListUsageTotals) 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_deserializeOpErrorListUsageTotals(response, &metadata) + } + output := &ListUsageTotalsOutput{} + 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_deserializeOpDocumentListUsageTotalsOutput(&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_deserializeOpErrorListUsageTotals(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListUsageTotalsOutput(v **ListUsageTotalsOutput, 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 *ListUsageTotalsOutput + if *v == nil { + sv = &ListUsageTotalsOutput{} + } 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 ListUsageTotalsNextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "totals": + if err := awsRestjson1_deserializeDocumentUsageTotalList(&sv.Totals, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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) + 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_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateConfiguration) 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_deserializeOpErrorUpdateConfiguration(response, &metadata) + } + output := &UpdateConfigurationOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateEc2DeepInspectionConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateEc2DeepInspectionConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateEc2DeepInspectionConfiguration) 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_deserializeOpErrorUpdateEc2DeepInspectionConfiguration(response, &metadata) + } + output := &UpdateEc2DeepInspectionConfigurationOutput{} + 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_deserializeOpDocumentUpdateEc2DeepInspectionConfigurationOutput(&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(), + } } - output := &UpdateConfigurationOutput{} - out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateEc2DeepInspectionConfiguration(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)} @@ -4747,6 +5368,65 @@ func awsRestjson1_deserializeOpErrorUpdateConfiguration(response *smithyhttp.Res } } +func awsRestjson1_deserializeOpDocumentUpdateEc2DeepInspectionConfigurationOutput(v **UpdateEc2DeepInspectionConfigurationOutput, 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 *UpdateEc2DeepInspectionConfigurationOutput + if *v == nil { + sv = &UpdateEc2DeepInspectionConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "orgPackagePaths": + if err := awsRestjson1_deserializeDocumentPathList(&sv.OrgPackagePaths, value); err != nil { + return err + } + + case "packagePaths": + if err := awsRestjson1_deserializeDocumentPathList(&sv.PackagePaths, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ec2DeepInspectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.Ec2DeepInspectionStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpUpdateFilter struct { } @@ -4954,20 +5634,148 @@ func (m *awsRestjson1_deserializeOpUpdateOrganizationConfiguration) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateOrganizationConfigurationOutput(&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(), - } + err = awsRestjson1_deserializeOpDocumentUpdateOrganizationConfigurationOutput(&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_deserializeOpErrorUpdateOrganizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateOrganizationConfigurationOutput(v **UpdateOrganizationConfigurationOutput, 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 *UpdateOrganizationConfigurationOutput + if *v == nil { + sv = &UpdateOrganizationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "autoEnable": + if err := awsRestjson1_deserializeDocumentAutoEnable(&sv.AutoEnable, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateOrgEc2DeepInspectionConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateOrgEc2DeepInspectionConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateOrgEc2DeepInspectionConfiguration) 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_deserializeOpErrorUpdateOrgEc2DeepInspectionConfiguration(response, &metadata) } + output := &UpdateOrgEc2DeepInspectionConfigurationOutput{} + out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateOrganizationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateOrgEc2DeepInspectionConfiguration(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)} @@ -5030,42 +5838,6 @@ func awsRestjson1_deserializeOpErrorUpdateOrganizationConfiguration(response *sm } } -func awsRestjson1_deserializeOpDocumentUpdateOrganizationConfigurationOutput(v **UpdateOrganizationConfigurationOutput, 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 *UpdateOrganizationConfigurationOutput - if *v == nil { - sv = &UpdateOrganizationConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "autoEnable": - if err := awsRestjson1_deserializeDocumentAutoEnable(&sv.AutoEnable, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) @@ -7793,6 +8565,98 @@ func awsRestjson1_deserializeDocumentFailedAccountList(v *[]types.FailedAccount, return nil } +func awsRestjson1_deserializeDocumentFailedMemberAccountEc2DeepInspectionStatusState(v **types.FailedMemberAccountEc2DeepInspectionStatusState, 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.FailedMemberAccountEc2DeepInspectionStatusState + if *v == nil { + sv = &types.FailedMemberAccountEc2DeepInspectionStatusState{} + } else { + sv = *v + } + + 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 "ec2ScanStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Ec2ScanStatus = types.Status(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFailedMemberAccountEc2DeepInspectionStatusStateList(v *[]types.FailedMemberAccountEc2DeepInspectionStatusState, 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.FailedMemberAccountEc2DeepInspectionStatusState + if *v == nil { + cv = []types.FailedMemberAccountEc2DeepInspectionStatusState{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FailedMemberAccountEc2DeepInspectionStatusState + destAddr := &col + if err := awsRestjson1_deserializeDocumentFailedMemberAccountEc2DeepInspectionStatusState(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentFilter(v **types.Filter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9545,6 +10409,98 @@ func awsRestjson1_deserializeDocumentMember(v **types.Member, value interface{}) return nil } +func awsRestjson1_deserializeDocumentMemberAccountEc2DeepInspectionStatusState(v **types.MemberAccountEc2DeepInspectionStatusState, 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.MemberAccountEc2DeepInspectionStatusState + if *v == nil { + sv = &types.MemberAccountEc2DeepInspectionStatusState{} + } else { + sv = *v + } + + 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 "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ec2DeepInspectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.Ec2DeepInspectionStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMemberAccountEc2DeepInspectionStatusStateList(v *[]types.MemberAccountEc2DeepInspectionStatusState, 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.MemberAccountEc2DeepInspectionStatusState + if *v == nil { + cv = []types.MemberAccountEc2DeepInspectionStatusState{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MemberAccountEc2DeepInspectionStatusState + destAddr := &col + if err := awsRestjson1_deserializeDocumentMemberAccountEc2DeepInspectionStatusState(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentMemberList(v *[]types.Member, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10107,6 +11063,42 @@ func awsRestjson1_deserializeDocumentPackageVulnerabilityDetails(v **types.Packa return nil } +func awsRestjson1_deserializeDocumentPathList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Path to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentPermission(v **types.Permission, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/inspector2/generated.json b/service/inspector2/generated.json index 78452bfc1bb..52dfe80bf62 100644 --- a/service/inspector2/generated.json +++ b/service/inspector2/generated.json @@ -11,6 +11,8 @@ "api_op_AssociateMember.go", "api_op_BatchGetAccountStatus.go", "api_op_BatchGetFreeTrialInfo.go", + "api_op_BatchGetMemberEc2DeepInspectionStatus.go", + "api_op_BatchUpdateMemberEc2DeepInspectionStatus.go", "api_op_CancelFindingsReport.go", "api_op_CreateFilter.go", "api_op_CreateFindingsReport.go", @@ -23,6 +25,7 @@ "api_op_EnableDelegatedAdminAccount.go", "api_op_GetConfiguration.go", "api_op_GetDelegatedAdminAccount.go", + "api_op_GetEc2DeepInspectionConfiguration.go", "api_op_GetFindingsReportStatus.go", "api_op_GetMember.go", "api_op_ListAccountPermissions.go", @@ -38,7 +41,9 @@ "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateConfiguration.go", + "api_op_UpdateEc2DeepInspectionConfiguration.go", "api_op_UpdateFilter.go", + "api_op_UpdateOrgEc2DeepInspectionConfiguration.go", "api_op_UpdateOrganizationConfiguration.go", "deserializers.go", "doc.go", diff --git a/service/inspector2/serializers.go b/service/inspector2/serializers.go index d0579552403..e246669cc87 100644 --- a/service/inspector2/serializers.go +++ b/service/inspector2/serializers.go @@ -224,6 +224,146 @@ func awsRestjson1_serializeOpDocumentBatchGetFreeTrialInfoInput(v *BatchGetFreeT return nil } +type awsRestjson1_serializeOpBatchGetMemberEc2DeepInspectionStatus struct { +} + +func (*awsRestjson1_serializeOpBatchGetMemberEc2DeepInspectionStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchGetMemberEc2DeepInspectionStatus) 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.(*BatchGetMemberEc2DeepInspectionStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ec2deepinspectionstatus/member/batch/get") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentBatchGetMemberEc2DeepInspectionStatusInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsBatchGetMemberEc2DeepInspectionStatusInput(v *BatchGetMemberEc2DeepInspectionStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentBatchGetMemberEc2DeepInspectionStatusInput(v *BatchGetMemberEc2DeepInspectionStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentAccountIdSet(v.AccountIds, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpBatchUpdateMemberEc2DeepInspectionStatus struct { +} + +func (*awsRestjson1_serializeOpBatchUpdateMemberEc2DeepInspectionStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchUpdateMemberEc2DeepInspectionStatus) 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.(*BatchUpdateMemberEc2DeepInspectionStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ec2deepinspectionstatus/member/batch/update") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentBatchUpdateMemberEc2DeepInspectionStatusInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsBatchUpdateMemberEc2DeepInspectionStatusInput(v *BatchUpdateMemberEc2DeepInspectionStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentBatchUpdateMemberEc2DeepInspectionStatusInput(v *BatchUpdateMemberEc2DeepInspectionStatusInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIds != nil { + ok := object.Key("accountIds") + if err := awsRestjson1_serializeDocumentMemberAccountEc2DeepInspectionStatusList(v.AccountIds, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCancelFindingsReport struct { } @@ -1042,6 +1182,51 @@ func awsRestjson1_serializeOpHttpBindingsGetDelegatedAdminAccountInput(v *GetDel return nil } +type awsRestjson1_serializeOpGetEc2DeepInspectionConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetEc2DeepInspectionConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetEc2DeepInspectionConfiguration) 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.(*GetEc2DeepInspectionConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ec2deepinspectionconfiguration/get") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if 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_serializeOpHttpBindingsGetEc2DeepInspectionConfigurationInput(v *GetEc2DeepInspectionConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + type awsRestjson1_serializeOpGetFindingsReportStatus struct { } @@ -2186,6 +2371,81 @@ func awsRestjson1_serializeOpDocumentUpdateConfigurationInput(v *UpdateConfigura return nil } +type awsRestjson1_serializeOpUpdateEc2DeepInspectionConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateEc2DeepInspectionConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateEc2DeepInspectionConfiguration) 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.(*UpdateEc2DeepInspectionConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ec2deepinspectionconfiguration/update") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateEc2DeepInspectionConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateEc2DeepInspectionConfigurationInput(v *UpdateEc2DeepInspectionConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateEc2DeepInspectionConfigurationInput(v *UpdateEc2DeepInspectionConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActivateDeepInspection != nil { + ok := object.Key("activateDeepInspection") + ok.Boolean(*v.ActivateDeepInspection) + } + + if v.PackagePaths != nil { + ok := object.Key("packagePaths") + if err := awsRestjson1_serializeDocumentPathList(v.PackagePaths, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateFilter struct { } @@ -2351,6 +2611,76 @@ func awsRestjson1_serializeOpDocumentUpdateOrganizationConfigurationInput(v *Upd return nil } +type awsRestjson1_serializeOpUpdateOrgEc2DeepInspectionConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateOrgEc2DeepInspectionConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateOrgEc2DeepInspectionConfiguration) 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.(*UpdateOrgEc2DeepInspectionConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ec2deepinspectionconfiguration/org/update") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateOrgEc2DeepInspectionConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateOrgEc2DeepInspectionConfigurationInput(v *UpdateOrgEc2DeepInspectionConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateOrgEc2DeepInspectionConfigurationInput(v *UpdateOrgEc2DeepInspectionConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OrgPackagePaths != nil { + ok := object.Key("orgPackagePaths") + if err := awsRestjson1_serializeDocumentPathList(v.OrgPackagePaths, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAccountAggregation(v *types.AccountAggregation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3319,6 +3649,36 @@ func awsRestjson1_serializeDocumentMapFilterList(v []types.MapFilter, value smit return nil } +func awsRestjson1_serializeDocumentMemberAccountEc2DeepInspectionStatus(v *types.MemberAccountEc2DeepInspectionStatus, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountId != nil { + ok := object.Key("accountId") + ok.String(*v.AccountId) + } + + if v.ActivateDeepInspection != nil { + ok := object.Key("activateDeepInspection") + ok.Boolean(*v.ActivateDeepInspection) + } + + return nil +} + +func awsRestjson1_serializeDocumentMemberAccountEc2DeepInspectionStatusList(v []types.MemberAccountEc2DeepInspectionStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentMemberAccountEc2DeepInspectionStatus(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentMeteringAccountIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -3479,6 +3839,17 @@ func awsRestjson1_serializeDocumentPackageFilterList(v []types.PackageFilter, va return nil } +func awsRestjson1_serializeDocumentPathList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentPortRangeFilter(v *types.PortRangeFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/inspector2/types/enums.go b/service/inspector2/types/enums.go index 2149e3a8a24..6376feeeb37 100644 --- a/service/inspector2/types/enums.go +++ b/service/inspector2/types/enums.go @@ -246,6 +246,28 @@ func (DelegatedAdminStatus) Values() []DelegatedAdminStatus { } } +type Ec2DeepInspectionStatus string + +// Enum values for Ec2DeepInspectionStatus +const ( + Ec2DeepInspectionStatusActivated Ec2DeepInspectionStatus = "ACTIVATED" + Ec2DeepInspectionStatusDeactivated Ec2DeepInspectionStatus = "DEACTIVATED" + Ec2DeepInspectionStatusPending Ec2DeepInspectionStatus = "PENDING" + Ec2DeepInspectionStatusFailed Ec2DeepInspectionStatus = "FAILED" +) + +// Values returns all known values for Ec2DeepInspectionStatus. 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 (Ec2DeepInspectionStatus) Values() []Ec2DeepInspectionStatus { + return []Ec2DeepInspectionStatus{ + "ACTIVATED", + "DEACTIVATED", + "PENDING", + "FAILED", + } +} + type Ec2InstanceSortBy string // Enum values for Ec2InstanceSortBy @@ -742,6 +764,7 @@ const ( PackageManagerPythonpkg PackageManager = "PYTHONPKG" PackageManagerNodepkg PackageManager = "NODEPKG" PackageManagerPom PackageManager = "POM" + PackageManagerGemspec PackageManager = "GEMSPEC" ) // Values returns all known values for PackageManager. Note that this can be @@ -765,6 +788,7 @@ func (PackageManager) Values() []PackageManager { "PYTHONPKG", "NODEPKG", "POM", + "GEMSPEC", } } @@ -1014,24 +1038,30 @@ type ScanStatusReason string // Enum values for ScanStatusReason const ( - ScanStatusReasonPendingInitialScan ScanStatusReason = "PENDING_INITIAL_SCAN" - ScanStatusReasonAccessDenied ScanStatusReason = "ACCESS_DENIED" - ScanStatusReasonInternalError ScanStatusReason = "INTERNAL_ERROR" - ScanStatusReasonUnmanagedEc2Instance ScanStatusReason = "UNMANAGED_EC2_INSTANCE" - ScanStatusReasonUnsupportedOs ScanStatusReason = "UNSUPPORTED_OS" - ScanStatusReasonScanEligibilityExpired ScanStatusReason = "SCAN_ELIGIBILITY_EXPIRED" - ScanStatusReasonResourceTerminated ScanStatusReason = "RESOURCE_TERMINATED" - ScanStatusReasonSuccessful ScanStatusReason = "SUCCESSFUL" - ScanStatusReasonNoResourcesFound ScanStatusReason = "NO_RESOURCES_FOUND" - ScanStatusReasonImageSizeExceeded ScanStatusReason = "IMAGE_SIZE_EXCEEDED" - ScanStatusReasonScanFrequencyManual ScanStatusReason = "SCAN_FREQUENCY_MANUAL" - ScanStatusReasonScanFrequencyScanOnPush ScanStatusReason = "SCAN_FREQUENCY_SCAN_ON_PUSH" - ScanStatusReasonEc2InstanceStopped ScanStatusReason = "EC2_INSTANCE_STOPPED" - ScanStatusReasonPendingDisable ScanStatusReason = "PENDING_DISABLE" - ScanStatusReasonNoInventory ScanStatusReason = "NO_INVENTORY" - ScanStatusReasonStaleInventory ScanStatusReason = "STALE_INVENTORY" - ScanStatusReasonExcludedByTag ScanStatusReason = "EXCLUDED_BY_TAG" - ScanStatusReasonUnsupportedRuntime ScanStatusReason = "UNSUPPORTED_RUNTIME" + ScanStatusReasonPendingInitialScan ScanStatusReason = "PENDING_INITIAL_SCAN" + ScanStatusReasonAccessDenied ScanStatusReason = "ACCESS_DENIED" + ScanStatusReasonInternalError ScanStatusReason = "INTERNAL_ERROR" + ScanStatusReasonUnmanagedEc2Instance ScanStatusReason = "UNMANAGED_EC2_INSTANCE" + ScanStatusReasonUnsupportedOs ScanStatusReason = "UNSUPPORTED_OS" + ScanStatusReasonScanEligibilityExpired ScanStatusReason = "SCAN_ELIGIBILITY_EXPIRED" + ScanStatusReasonResourceTerminated ScanStatusReason = "RESOURCE_TERMINATED" + ScanStatusReasonSuccessful ScanStatusReason = "SUCCESSFUL" + ScanStatusReasonNoResourcesFound ScanStatusReason = "NO_RESOURCES_FOUND" + ScanStatusReasonImageSizeExceeded ScanStatusReason = "IMAGE_SIZE_EXCEEDED" + ScanStatusReasonScanFrequencyManual ScanStatusReason = "SCAN_FREQUENCY_MANUAL" + ScanStatusReasonScanFrequencyScanOnPush ScanStatusReason = "SCAN_FREQUENCY_SCAN_ON_PUSH" + ScanStatusReasonEc2InstanceStopped ScanStatusReason = "EC2_INSTANCE_STOPPED" + ScanStatusReasonPendingDisable ScanStatusReason = "PENDING_DISABLE" + ScanStatusReasonNoInventory ScanStatusReason = "NO_INVENTORY" + ScanStatusReasonStaleInventory ScanStatusReason = "STALE_INVENTORY" + ScanStatusReasonExcludedByTag ScanStatusReason = "EXCLUDED_BY_TAG" + ScanStatusReasonUnsupportedRuntime ScanStatusReason = "UNSUPPORTED_RUNTIME" + ScanStatusReasonUnsupportedMediaType ScanStatusReason = "UNSUPPORTED_MEDIA_TYPE" + ScanStatusReasonUnsupportedConfigFile ScanStatusReason = "UNSUPPORTED_CONFIG_FILE" + ScanStatusReasonDeepInspectionPackageCollectionLimitExceeded ScanStatusReason = "DEEP_INSPECTION_PACKAGE_COLLECTION_LIMIT_EXCEEDED" + ScanStatusReasonDeepInspectionDailySsmInventoryLimitExceeded ScanStatusReason = "DEEP_INSPECTION_DAILY_SSM_INVENTORY_LIMIT_EXCEEDED" + ScanStatusReasonDeepInspectionCollectionTimeLimitExceeded ScanStatusReason = "DEEP_INSPECTION_COLLECTION_TIME_LIMIT_EXCEEDED" + ScanStatusReasonDeepInspectionNoInventory ScanStatusReason = "DEEP_INSPECTION_NO_INVENTORY" ) // Values returns all known values for ScanStatusReason. Note that this can be @@ -1057,6 +1087,12 @@ func (ScanStatusReason) Values() []ScanStatusReason { "STALE_INVENTORY", "EXCLUDED_BY_TAG", "UNSUPPORTED_RUNTIME", + "UNSUPPORTED_MEDIA_TYPE", + "UNSUPPORTED_CONFIG_FILE", + "DEEP_INSPECTION_PACKAGE_COLLECTION_LIMIT_EXCEEDED", + "DEEP_INSPECTION_DAILY_SSM_INVENTORY_LIMIT_EXCEEDED", + "DEEP_INSPECTION_COLLECTION_TIME_LIMIT_EXCEEDED", + "DEEP_INSPECTION_NO_INVENTORY", } } diff --git a/service/inspector2/types/types.go b/service/inspector2/types/types.go index 35e9db6ada6..a207d4d5ebd 100644 --- a/service/inspector2/types/types.go +++ b/service/inspector2/types/types.go @@ -388,8 +388,8 @@ type AutoEnable struct { // This member is required. Ecr *bool - // Represents whether AWS Lambda scans are automatically enabled for new members - // of your Amazon Inspector organization. + // Represents whether AWS Lambda standard scans are automatically enabled for new + // members of your Amazon Inspector organization. Lambda *bool noSmithyDocumentSerde @@ -821,7 +821,7 @@ type Destination struct { // This member is required. KmsKeyArn *string - // The prefix of the KMS key used to export findings. + // The prefix of the Amazon S3 bucket used to export findings. KeyPrefix *string noSmithyDocumentSerde @@ -1002,6 +1002,27 @@ type FailedAccount struct { noSmithyDocumentSerde } +// An object that contains details about a member account in your organization +// that failed to activate Amazon Inspector deep inspection. +type FailedMemberAccountEc2DeepInspectionStatusState struct { + + // The unique identifier for the Amazon Web Services account of the organization + // member that failed to activate Amazon Inspector deep inspection. + // + // This member is required. + AccountId *string + + // The status of EC2 scanning in the account that failed to activate Amazon + // Inspector deep inspection. + Ec2ScanStatus Status + + // The error message explaining why the account failed to activate Amazon + // Inspector deep inspection. + ErrorMessage *string + + noSmithyDocumentSerde +} + // Details about a filter. type Filter struct { @@ -1605,6 +1626,45 @@ type Member struct { noSmithyDocumentSerde } +// An object that contains details about the status of Amazon Inspector deep +// inspection for a member account in your organization. +type MemberAccountEc2DeepInspectionStatus struct { + + // The unique identifier for the Amazon Web Services account of the organization + // member. + // + // This member is required. + AccountId *string + + // Whether Amazon Inspector deep inspection is active in the account. If TRUE + // Amazon Inspector deep inspection is active, if FALSE it is not active. + // + // This member is required. + ActivateDeepInspection *bool + + noSmithyDocumentSerde +} + +// An object that contains details about the state of Amazon Inspector deep +// inspection for a member account. +type MemberAccountEc2DeepInspectionStatusState struct { + + // The unique identifier for the Amazon Web Services account of the organization + // member + // + // This member is required. + AccountId *string + + // The error message explaining why the account failed to activate Amazon + // Inspector deep inspection. + ErrorMessage *string + + // The state of Amazon Inspector deep inspection in the member account. + Status Ec2DeepInspectionStatus + + noSmithyDocumentSerde +} + // Information on the network path associated with a finding. type NetworkPath struct { @@ -1952,7 +2012,7 @@ type ResourceStatus struct { // This member is required. Ecr Status - // The status of Amazon Inspector scanning for AWS Lambda function resources. + // The status of Amazon Inspector scanning for AWS Lambda function. Lambda Status noSmithyDocumentSerde diff --git a/service/inspector2/validators.go b/service/inspector2/validators.go index 31662241fd9..ec2d4eabc69 100644 --- a/service/inspector2/validators.go +++ b/service/inspector2/validators.go @@ -50,6 +50,26 @@ func (m *validateOpBatchGetFreeTrialInfo) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpBatchUpdateMemberEc2DeepInspectionStatus struct { +} + +func (*validateOpBatchUpdateMemberEc2DeepInspectionStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchUpdateMemberEc2DeepInspectionStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchUpdateMemberEc2DeepInspectionStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchUpdateMemberEc2DeepInspectionStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCancelFindingsReport struct { } @@ -430,6 +450,26 @@ func (m *validateOpUpdateOrganizationConfiguration) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpUpdateOrgEc2DeepInspectionConfiguration struct { +} + +func (*validateOpUpdateOrgEc2DeepInspectionConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOrgEc2DeepInspectionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOrgEc2DeepInspectionConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOrgEc2DeepInspectionConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpAssociateMemberValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateMember{}, middleware.After) } @@ -438,6 +478,10 @@ func addOpBatchGetFreeTrialInfoValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpBatchGetFreeTrialInfo{}, middleware.After) } +func addOpBatchUpdateMemberEc2DeepInspectionStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchUpdateMemberEc2DeepInspectionStatus{}, middleware.After) +} + func addOpCancelFindingsReportValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelFindingsReport{}, middleware.After) } @@ -514,6 +558,10 @@ func addOpUpdateOrganizationConfigurationValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpUpdateOrganizationConfiguration{}, middleware.After) } +func addOpUpdateOrgEc2DeepInspectionConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOrgEc2DeepInspectionConfiguration{}, middleware.After) +} + func validateAggregationRequest(v types.AggregationRequest) error { if v == nil { return nil @@ -1140,6 +1188,41 @@ func validateMapFilterList(v []types.MapFilter) error { } } +func validateMemberAccountEc2DeepInspectionStatus(v *types.MemberAccountEc2DeepInspectionStatus) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MemberAccountEc2DeepInspectionStatus"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.ActivateDeepInspection == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActivateDeepInspection")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMemberAccountEc2DeepInspectionStatusList(v []types.MemberAccountEc2DeepInspectionStatus) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MemberAccountEc2DeepInspectionStatusList"} + for i := range v { + if err := validateMemberAccountEc2DeepInspectionStatus(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePackageAggregation(v *types.PackageAggregation) error { if v == nil { return nil @@ -1338,6 +1421,25 @@ func validateOpBatchGetFreeTrialInfoInput(v *BatchGetFreeTrialInfoInput) error { } } +func validateOpBatchUpdateMemberEc2DeepInspectionStatusInput(v *BatchUpdateMemberEc2DeepInspectionStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateMemberEc2DeepInspectionStatusInput"} + if v.AccountIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountIds")) + } else if v.AccountIds != nil { + if err := validateMemberAccountEc2DeepInspectionStatusList(v.AccountIds); err != nil { + invalidParams.AddNested("AccountIds", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelFindingsReportInput(v *CancelFindingsReportInput) error { if v == nil { return nil @@ -1684,3 +1786,18 @@ func validateOpUpdateOrganizationConfigurationInput(v *UpdateOrganizationConfigu return nil } } + +func validateOpUpdateOrgEc2DeepInspectionConfigurationInput(v *UpdateOrgEc2DeepInspectionConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOrgEc2DeepInspectionConfigurationInput"} + if v.OrgPackagePaths == nil { + invalidParams.Add(smithy.NewErrParamRequired("OrgPackagePaths")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/iottwinmaker/api_op_GetScene.go b/service/iottwinmaker/api_op_GetScene.go index cb84c4c7049..7b5f62291fb 100644 --- a/service/iottwinmaker/api_op_GetScene.go +++ b/service/iottwinmaker/api_op_GetScene.go @@ -7,6 +7,7 @@ import ( "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/iottwinmaker/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" @@ -81,6 +82,9 @@ type GetSceneOutput struct { // The description of the scene. Description *string + // The SceneResponse error. + Error *types.SceneError + // The generated scene metadata. GeneratedSceneMetadata map[string]string diff --git a/service/iottwinmaker/deserializers.go b/service/iottwinmaker/deserializers.go index ed200af308e..14525cec782 100644 --- a/service/iottwinmaker/deserializers.go +++ b/service/iottwinmaker/deserializers.go @@ -3249,6 +3249,11 @@ func awsRestjson1_deserializeOpDocumentGetSceneOutput(v **GetSceneOutput, value sv.Description = ptr.String(jtv) } + case "error": + if err := awsRestjson1_deserializeDocumentSceneError(&sv.Error, value); err != nil { + return err + } + case "generatedSceneMetadata": if err := awsRestjson1_deserializeDocumentGeneratedSceneMetadataMap(&sv.GeneratedSceneMetadata, value); err != nil { return err @@ -9260,6 +9265,55 @@ func awsRestjson1_deserializeDocumentSceneCapabilities(v *[]string, value interf return nil } +func awsRestjson1_deserializeDocumentSceneError(v **types.SceneError, 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.SceneError + if *v == nil { + sv = &types.SceneError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SceneErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.SceneErrorCode(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSceneMetadataMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iottwinmaker/types/enums.go b/service/iottwinmaker/types/enums.go index 52cc4acf889..674300a2d5e 100644 --- a/service/iottwinmaker/types/enums.go +++ b/service/iottwinmaker/types/enums.go @@ -234,6 +234,22 @@ func (PropertyUpdateType) Values() []PropertyUpdateType { } } +type SceneErrorCode string + +// Enum values for SceneErrorCode +const ( + SceneErrorCodeMatterportError SceneErrorCode = "MATTERPORT_ERROR" +) + +// Values returns all known values for SceneErrorCode. 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 (SceneErrorCode) Values() []SceneErrorCode { + return []SceneErrorCode{ + "MATTERPORT_ERROR", + } +} + type Scope string // Enum values for Scope diff --git a/service/iottwinmaker/types/types.go b/service/iottwinmaker/types/types.go index 74ef9183b78..95ed305feb2 100644 --- a/service/iottwinmaker/types/types.go +++ b/service/iottwinmaker/types/types.go @@ -835,6 +835,18 @@ type Row struct { noSmithyDocumentSerde } +// The scene error. +type SceneError struct { + + // The SceneError code. + Code SceneErrorCode + + // The SceneError message. + Message *string + + noSmithyDocumentSerde +} + // An object that contains information about a scene. type SceneSummary struct { diff --git a/service/networkfirewall/api_op_PutResourcePolicy.go b/service/networkfirewall/api_op_PutResourcePolicy.go index 3838bfedbc0..8bfdea76124 100644 --- a/service/networkfirewall/api_op_PutResourcePolicy.go +++ b/service/networkfirewall/api_op_PutResourcePolicy.go @@ -54,8 +54,6 @@ type PutResourcePolicyInput struct { // - network-firewall:ListRuleGroups // For a firewall policy resource, you can specify the following operations in the // Actions section of the statement: - // - network-firewall:CreateFirewall - // - network-firewall:UpdateFirewall // - network-firewall:AssociateFirewallPolicy // - network-firewall:ListFirewallPolicies // In the Resource section of the statement, you specify the ARNs for the rule diff --git a/service/networkfirewall/deserializers.go b/service/networkfirewall/deserializers.go index c3359cd434b..f800ce637a1 100644 --- a/service/networkfirewall/deserializers.go +++ b/service/networkfirewall/deserializers.go @@ -5589,6 +5589,11 @@ func awsAwsjson10_deserializeDocumentFirewallPolicy(v **types.FirewallPolicy, va for key, value := range shape { switch key { + case "PolicyVariables": + if err := awsAwsjson10_deserializeDocumentPolicyVariables(&sv.PolicyVariables, value); err != nil { + return err + } + case "StatefulDefaultActions": if err := awsAwsjson10_deserializeDocumentStatefulActions(&sv.StatefulDefaultActions, value); err != nil { return err @@ -6861,6 +6866,42 @@ func awsAwsjson10_deserializeDocumentPerObjectStatus(v **types.PerObjectStatus, return nil } +func awsAwsjson10_deserializeDocumentPolicyVariables(v **types.PolicyVariables, 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.PolicyVariables + if *v == nil { + sv = &types.PolicyVariables{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RuleVariables": + if err := awsAwsjson10_deserializeDocumentIPSets(&sv.RuleVariables, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentPortRange(v **types.PortRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/networkfirewall/serializers.go b/service/networkfirewall/serializers.go index 3fbafef54b8..8e4f78bd7f0 100644 --- a/service/networkfirewall/serializers.go +++ b/service/networkfirewall/serializers.go @@ -2122,6 +2122,13 @@ func awsAwsjson10_serializeDocumentFirewallPolicy(v *types.FirewallPolicy, value object := value.Object() defer object.Close() + if v.PolicyVariables != nil { + ok := object.Key("PolicyVariables") + if err := awsAwsjson10_serializeDocumentPolicyVariables(v.PolicyVariables, ok); err != nil { + return err + } + } + if v.StatefulDefaultActions != nil { ok := object.Key("StatefulDefaultActions") if err := awsAwsjson10_serializeDocumentStatefulActions(v.StatefulDefaultActions, ok); err != nil { @@ -2392,6 +2399,20 @@ func awsAwsjson10_serializeDocumentMatchAttributes(v *types.MatchAttributes, val return nil } +func awsAwsjson10_serializeDocumentPolicyVariables(v *types.PolicyVariables, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RuleVariables != nil { + ok := object.Key("RuleVariables") + if err := awsAwsjson10_serializeDocumentIPSets(v.RuleVariables, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeDocumentPortRange(v *types.PortRange, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/networkfirewall/types/enums.go b/service/networkfirewall/types/enums.go index 9f9f08fb2ea..b1b3d22108d 100644 --- a/service/networkfirewall/types/enums.go +++ b/service/networkfirewall/types/enums.go @@ -10,6 +10,8 @@ const ( AttachmentStatusDeleting AttachmentStatus = "DELETING" AttachmentStatusScaling AttachmentStatus = "SCALING" AttachmentStatusReady AttachmentStatus = "READY" + AttachmentStatusFailed AttachmentStatus = "FAILED" + AttachmentStatusError AttachmentStatus = "ERROR" ) // Values returns all known values for AttachmentStatus. Note that this can be @@ -21,6 +23,8 @@ func (AttachmentStatus) Values() []AttachmentStatus { "DELETING", "SCALING", "READY", + "FAILED", + "ERROR", } } diff --git a/service/networkfirewall/types/types.go b/service/networkfirewall/types/types.go index a7b60ce0b00..ed28c3483ed 100644 --- a/service/networkfirewall/types/types.go +++ b/service/networkfirewall/types/types.go @@ -69,10 +69,12 @@ type Attachment struct { Status AttachmentStatus // If Network Firewall fails to create or delete the firewall endpoint in the - // subnet, it populates this with the reason for the failure and how to resolve it. - // Depending on the error, it can take as many as 15 minutes to populate this - // field. For more information about the errors and solutions available for this - // field, see Troubleshooting firewall endpoint failures (https://docs.aws.amazon.com/network-firewall/latest/developerguide/firewall-troubleshooting-endpoint-failures.html) + // subnet, it populates this with the reason for the error or failure and how to + // resolve it. A FAILED status indicates a non-recoverable state, and a ERROR + // status indicates an issue that you can fix. Depending on the error, it can take + // as many as 15 minutes to populate this field. For more information about the + // causes for failiure or errors and solutions available for this field, see + // Troubleshooting firewall endpoint failures (https://docs.aws.amazon.com/network-firewall/latest/developerguide/firewall-troubleshooting-endpoint-failures.html) // in the Network Firewall Developer Guide. StatusMessage *string @@ -304,6 +306,10 @@ type FirewallPolicy struct { // This member is required. StatelessFragmentDefaultActions []string + // Contains variables that you can use to override default Suricata settings in + // your firewall policy. + PolicyVariables *PolicyVariables + // The default actions to take on a packet that doesn't match any stateful rules. // The stateful default action is optional, and is only valid when using the strict // rule order. Valid values of the stateful default action: @@ -685,6 +691,20 @@ type PerObjectStatus struct { noSmithyDocumentSerde } +// Contains variables that you can use to override default Suricata settings in +// your firewall policy. +type PolicyVariables struct { + + // The IPv4 or IPv6 addresses in CIDR notation to use for the Suricata HOME_NET + // variable. If your firewall uses an inspection VPC, you might want to override + // the HOME_NET variable with the CIDRs of your home networks. If you don't + // override HOME_NET with your own CIDRs, Network Firewall by default uses the + // CIDR of your inspection VPC. + RuleVariables map[string]IPSet + + noSmithyDocumentSerde +} + // A single port range specification. This is used for source and destination port // ranges in the stateless rule MatchAttributes , SourcePorts , and // DestinationPorts settings. @@ -931,7 +951,7 @@ type RulesSource struct { // An array of individual stateful rules inspection criteria to be used together // in a stateful rule group. Use this option to specify simple Suricata rules with // protocol, source and destination, ports, direction, and rule options. For - // information about the Suricata Rules format, see Rules Format (https://suricata.readthedocs.iorules/intro.html#) + // information about the Suricata Rules format, see Rules Format (https://suricata.readthedocs.io/en/suricata-6.0.9/rules/intro.html) // . StatefulRules []StatefulRule @@ -1113,7 +1133,7 @@ type StatefulEngineOptions struct { // A single Suricata rules specification, for use in a stateful rule group. Use // this option to specify a simple Suricata rule with protocol, source and // destination, ports, direction, and rule options. For information about the -// Suricata Rules format, see Rules Format (https://suricata.readthedocs.iorules/intro.html#) +// Suricata Rules format, see Rules Format (https://suricata.readthedocs.io/en/suricata-6.0.9/rules/intro.html) // . type StatefulRule struct { @@ -1131,12 +1151,6 @@ type StatefulRule struct { // to use to drop traffic. You can enable the rule with ALERT action, verify in // the logs that the rule is filtering as you want, then change the action to // DROP . - // - REJECT - Drops TCP traffic that matches the conditions of the stateful - // rule, and sends a TCP reset packet back to sender of the packet. A TCP reset - // packet is a packet with no payload and a RST bit contained in the TCP header - // flags. Also sends an alert log mesage if alert logging is configured in the - // Firewall LoggingConfiguration . REJECT isn't currently available for use with - // IMAP and FTP protocols. // // This member is required. Action StatefulAction diff --git a/service/networkfirewall/validators.go b/service/networkfirewall/validators.go index 1742831f4e0..a68e7986564 100644 --- a/service/networkfirewall/validators.go +++ b/service/networkfirewall/validators.go @@ -675,6 +675,11 @@ func validateFirewallPolicy(v *types.FirewallPolicy) error { invalidParams.AddNested("StatefulRuleGroupReferences", err.(smithy.InvalidParamsError)) } } + if v.PolicyVariables != nil { + if err := validatePolicyVariables(v.PolicyVariables); err != nil { + invalidParams.AddNested("PolicyVariables", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -839,6 +844,23 @@ func validateMatchAttributes(v *types.MatchAttributes) error { } } +func validatePolicyVariables(v *types.PolicyVariables) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PolicyVariables"} + if v.RuleVariables != nil { + if err := validateIPSets(v.RuleVariables); err != nil { + invalidParams.AddNested("RuleVariables", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePortRange(v *types.PortRange) error { if v == nil { return nil diff --git a/service/opensearch/api_op_CreatePackage.go b/service/opensearch/api_op_CreatePackage.go index daaf884cef2..c1839503729 100644 --- a/service/opensearch/api_op_CreatePackage.go +++ b/service/opensearch/api_op_CreatePackage.go @@ -42,7 +42,7 @@ type CreatePackageInput struct { // This member is required. PackageSource *types.PackageSource - // Type of package. + // The type of package. // // This member is required. PackageType types.PackageType diff --git a/service/opensearch/api_op_DescribeDomainHealth.go b/service/opensearch/api_op_DescribeDomainHealth.go new file mode 100644 index 00000000000..477f681da64 --- /dev/null +++ b/service/opensearch/api_op_DescribeDomainHealth.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about domain and node health, the standby Availability +// Zone, number of nodes per Availability Zone, and shard count per node. +func (c *Client) DescribeDomainHealth(ctx context.Context, params *DescribeDomainHealthInput, optFns ...func(*Options)) (*DescribeDomainHealthOutput, error) { + if params == nil { + params = &DescribeDomainHealthInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDomainHealth", params, optFns, c.addOperationDescribeDomainHealthMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDomainHealthOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeDomainHealth operation. +type DescribeDomainHealthInput struct { + + // The name of the domain. + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +// The result of a DescribeDomainHealth request. Contains health information for +// the requested domain. +type DescribeDomainHealthOutput struct { + + // The number of active Availability Zones configured for the domain. If the + // service is unable to fetch this information, it will return NotAvailable . + ActiveAvailabilityZoneCount *string + + // The number of Availability Zones configured for the domain. If the service is + // unable to fetch this information, it will return NotAvailable . + AvailabilityZoneCount *string + + // The current health status of your cluster. + // - Red - At least one primary shard is not allocated to any node. + // - Yellow - All primary shards are allocated to nodes, but some replicas + // aren’t. + // - Green - All primary shards and their replicas are allocated to nodes. + // - NotAvailable - Unable to retrieve cluster health. + ClusterHealth types.DomainHealth + + // The number of data nodes configured for the domain. If the service is unable to + // fetch this information, it will return NotAvailable . + DataNodeCount *string + + // A boolean that indicates if dedicated master nodes are activated for the domain. + DedicatedMaster *bool + + // The current state of the domain. + // - Processing - The domain has updates in progress. + // - Active - Requested changes have been processed and deployed to the domain. + DomainState types.DomainState + + // A list of EnvironmentInfo for the domain. + EnvironmentInformation []types.EnvironmentInfo + + // The number of nodes that can be elected as a master node. If dedicated master + // nodes is turned on, this value is the number of dedicated master nodes + // configured for the domain. If the service is unable to fetch this information, + // it will return NotAvailable . + MasterEligibleNodeCount *string + + // Indicates whether the domain has an elected master node. + // - Available - The domain has an elected master node. + // - UnAvailable - The master node hasn't yet been elected, and a quorum to + // elect a new master node hasn't been reached. + MasterNode types.MasterNodeStatus + + // The number of standby Availability Zones configured for the domain. If the + // service is unable to fetch this information, it will return NotAvailable . + StandByAvailabilityZoneCount *string + + // The total number of primary and replica shards for the domain. + TotalShards *string + + // The total number of primary and replica shards not allocated to any of the + // nodes for the cluster. + TotalUnAssignedShards *string + + // The number of warm nodes configured for the domain. + WarmNodeCount *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDomainHealthMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDomainHealth{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDomainHealth{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeDomainHealthValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDomainHealth(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_opDescribeDomainHealth(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeDomainHealth", + } +} diff --git a/service/opensearch/api_op_GetPackageVersionHistory.go b/service/opensearch/api_op_GetPackageVersionHistory.go index ab55305670b..1d15dd2f4c1 100644 --- a/service/opensearch/api_op_GetPackageVersionHistory.go +++ b/service/opensearch/api_op_GetPackageVersionHistory.go @@ -13,8 +13,9 @@ import ( ) // Returns a list of Amazon OpenSearch Service package versions, along with their -// creation time and commit message. For more information, see Custom packages for -// Amazon OpenSearch Service (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/custom-packages.html) +// creation time, commit message, and plugin properties (if the package is a zip +// plugin package). For more information, see Custom packages for Amazon +// OpenSearch Service (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/custom-packages.html) // . func (c *Client) GetPackageVersionHistory(ctx context.Context, params *GetPackageVersionHistoryInput, optFns ...func(*Options)) (*GetPackageVersionHistoryOutput, error) { if params == nil { diff --git a/service/opensearch/api_op_ListInstanceTypeDetails.go b/service/opensearch/api_op_ListInstanceTypeDetails.go index 9d375ce96e2..1f498fea026 100644 --- a/service/opensearch/api_op_ListInstanceTypeDetails.go +++ b/service/opensearch/api_op_ListInstanceTypeDetails.go @@ -31,15 +31,18 @@ func (c *Client) ListInstanceTypeDetails(ctx context.Context, params *ListInstan type ListInstanceTypeDetailsInput struct { - // Version of OpenSearch or Elasticsearch, in the format Elasticsearch_X.Y or + // The version of OpenSearch or Elasticsearch, in the format Elasticsearch_X.Y or // OpenSearch_X.Y. Defaults to the latest version of OpenSearch. // // This member is required. EngineVersion *string - // Name of the domain to list instance type details for. + // The name of the domain. DomainName *string + // An optional parameter that lists information for a given instance type. + InstanceType *string + // An optional parameter that specifies the maximum number of results to return. // You can use nextToken to get the next page of results. MaxResults int32 @@ -49,6 +52,9 @@ type ListInstanceTypeDetailsInput struct { // operations, which returns results in the next page. NextToken *string + // An optional parameter that specifies the Availability Zones for the domain. + RetrieveAZs *bool + noSmithyDocumentSerde } diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index e09c64bfdc1..49ffa455bc0 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -53,10 +53,6 @@ type UpdateDomainConfigInput struct { // rather than a boolean. Specifies the maximum number of clauses allowed in a // Lucene boolean query. Default is 1,024. Queries with more than the permitted // number of clauses result in a TooManyClauses error. - // - "override_main_response_version": "true" | "false" - Note the use of a - // string rather than a boolean. Specifies whether the domain reports its version - // as 7.10 to allow Elasticsearch OSS clients and plugins to continue working with - // it. Default is false when creating a domain and true when upgrading a domain. // For more information, see Advanced cluster parameters (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) // . AdvancedOptions map[string]string diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index e2e4bab0e30..d0328e4e999 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -2849,6 +2849,273 @@ func awsRestjson1_deserializeOpDocumentDescribeDomainConfigOutput(v **DescribeDo return nil } +type awsRestjson1_deserializeOpDescribeDomainHealth struct { +} + +func (*awsRestjson1_deserializeOpDescribeDomainHealth) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDomainHealth) 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_deserializeOpErrorDescribeDomainHealth(response, &metadata) + } + output := &DescribeDomainHealthOutput{} + 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_deserializeOpDocumentDescribeDomainHealthOutput(&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_deserializeOpErrorDescribeDomainHealth(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeDomainHealthOutput(v **DescribeDomainHealthOutput, 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 *DescribeDomainHealthOutput + if *v == nil { + sv = &DescribeDomainHealthOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActiveAvailabilityZoneCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfAZs to be of type string, got %T instead", value) + } + sv.ActiveAvailabilityZoneCount = ptr.String(jtv) + } + + case "AvailabilityZoneCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfAZs to be of type string, got %T instead", value) + } + sv.AvailabilityZoneCount = ptr.String(jtv) + } + + case "ClusterHealth": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainHealth to be of type string, got %T instead", value) + } + sv.ClusterHealth = types.DomainHealth(jtv) + } + + case "DataNodeCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfNodes to be of type string, got %T instead", value) + } + sv.DataNodeCount = ptr.String(jtv) + } + + case "DedicatedMaster": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DedicatedMaster = ptr.Bool(jtv) + } + + case "DomainState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainState to be of type string, got %T instead", value) + } + sv.DomainState = types.DomainState(jtv) + } + + case "EnvironmentInformation": + if err := awsRestjson1_deserializeDocumentEnvironmentInfoList(&sv.EnvironmentInformation, value); err != nil { + return err + } + + case "MasterEligibleNodeCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfNodes to be of type string, got %T instead", value) + } + sv.MasterEligibleNodeCount = ptr.String(jtv) + } + + case "MasterNode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MasterNodeStatus to be of type string, got %T instead", value) + } + sv.MasterNode = types.MasterNodeStatus(jtv) + } + + case "StandByAvailabilityZoneCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfAZs to be of type string, got %T instead", value) + } + sv.StandByAvailabilityZoneCount = ptr.String(jtv) + } + + case "TotalShards": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfShards to be of type string, got %T instead", value) + } + sv.TotalShards = ptr.String(jtv) + } + + case "TotalUnAssignedShards": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfShards to be of type string, got %T instead", value) + } + sv.TotalUnAssignedShards = ptr.String(jtv) + } + + case "WarmNodeCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfNodes to be of type string, got %T instead", value) + } + sv.WarmNodeCount = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDescribeDomains struct { } @@ -9675,6 +9942,161 @@ func awsRestjson1_deserializeDocumentAutoTuneStatus(v **types.AutoTuneStatus, va return nil } +func awsRestjson1_deserializeDocumentAvailabilityZoneInfo(v **types.AvailabilityZoneInfo, 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.AvailabilityZoneInfo + if *v == nil { + sv = &types.AvailabilityZoneInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AvailabilityZoneName = ptr.String(jtv) + } + + case "AvailableDataNodeCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfNodes to be of type string, got %T instead", value) + } + sv.AvailableDataNodeCount = ptr.String(jtv) + } + + case "ConfiguredDataNodeCount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfNodes to be of type string, got %T instead", value) + } + sv.ConfiguredDataNodeCount = ptr.String(jtv) + } + + case "TotalShards": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfShards to be of type string, got %T instead", value) + } + sv.TotalShards = ptr.String(jtv) + } + + case "TotalUnAssignedShards": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NumberOfShards to be of type string, got %T instead", value) + } + sv.TotalUnAssignedShards = ptr.String(jtv) + } + + case "ZoneStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZoneStatus to be of type string, got %T instead", value) + } + sv.ZoneStatus = types.ZoneStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAvailabilityZoneInfoList(v *[]types.AvailabilityZoneInfo, 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.AvailabilityZoneInfo + if *v == nil { + cv = []types.AvailabilityZoneInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AvailabilityZoneInfo + destAddr := &col + if err := awsRestjson1_deserializeDocumentAvailabilityZoneInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAvailabilityZoneList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAWSDomainInformation(v **types.AWSDomainInformation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10103,6 +10525,15 @@ func awsRestjson1_deserializeDocumentClusterConfig(v **types.ClusterConfig, valu sv.InstanceType = types.OpenSearchPartitionInstanceType(jtv) } + case "MultiAZWithStandbyEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.MultiAZWithStandbyEnabled = ptr.Bool(jtv) + } + case "WarmCount": if value != nil { jtv, ok := value.(json.Number) @@ -11715,6 +12146,76 @@ func awsRestjson1_deserializeDocumentEndpointsMap(v *map[string]string, value in return nil } +func awsRestjson1_deserializeDocumentEnvironmentInfo(v **types.EnvironmentInfo, 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.EnvironmentInfo + if *v == nil { + sv = &types.EnvironmentInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneInformation": + if err := awsRestjson1_deserializeDocumentAvailabilityZoneInfoList(&sv.AvailabilityZoneInformation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentInfoList(v *[]types.EnvironmentInfo, 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.EnvironmentInfo + if *v == nil { + cv = []types.EnvironmentInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentInfo + destAddr := &col + if err := awsRestjson1_deserializeDocumentEnvironmentInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12080,6 +12581,11 @@ func awsRestjson1_deserializeDocumentInstanceTypeDetails(v **types.InstanceTypeD sv.AppLogsEnabled = ptr.Bool(jtv) } + case "AvailabilityZones": + if err := awsRestjson1_deserializeDocumentAvailabilityZoneList(&sv.AvailabilityZones, value); err != nil { + return err + } + case "CognitoEnabled": if value != nil { jtv, ok := value.(bool) diff --git a/service/opensearch/generated.json b/service/opensearch/generated.json index 3b3012bebb4..c78b6dacd91 100644 --- a/service/opensearch/generated.json +++ b/service/opensearch/generated.json @@ -26,6 +26,7 @@ "api_op_DescribeDomainAutoTunes.go", "api_op_DescribeDomainChangeProgress.go", "api_op_DescribeDomainConfig.go", + "api_op_DescribeDomainHealth.go", "api_op_DescribeDomains.go", "api_op_DescribeDryRunProgress.go", "api_op_DescribeInboundConnections.go", diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index cc475c96d78..fd9dae0d05e 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -1353,6 +1353,64 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDomainConfigInput(v *DescribeDo return nil } +type awsRestjson1_serializeOpDescribeDomainHealth struct { +} + +func (*awsRestjson1_serializeOpDescribeDomainHealth) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDomainHealth) 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.(*DescribeDomainHealthInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}/health") + 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_serializeOpHttpBindingsDescribeDomainHealthInput(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_serializeOpHttpBindingsDescribeDomainHealthInput(v *DescribeDomainHealthInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeDomains struct { } @@ -2480,6 +2538,10 @@ func awsRestjson1_serializeOpHttpBindingsListInstanceTypeDetailsInput(v *ListIns } } + if v.InstanceType != nil { + encoder.SetQuery("instanceType").String(*v.InstanceType) + } + if v.MaxResults != 0 { encoder.SetQuery("maxResults").Integer(v.MaxResults) } @@ -2488,6 +2550,10 @@ func awsRestjson1_serializeOpHttpBindingsListInstanceTypeDetailsInput(v *ListIns encoder.SetQuery("nextToken").String(*v.NextToken) } + if v.RetrieveAZs != nil { + encoder.SetQuery("retrieveAZs").Boolean(*v.RetrieveAZs) + } + return nil } @@ -4005,6 +4071,11 @@ func awsRestjson1_serializeDocumentClusterConfig(v *types.ClusterConfig, value s ok.String(string(v.InstanceType)) } + if v.MultiAZWithStandbyEnabled != nil { + ok := object.Key("MultiAZWithStandbyEnabled") + ok.Boolean(*v.MultiAZWithStandbyEnabled) + } + if v.WarmCount != nil { ok := object.Key("WarmCount") ok.Integer(*v.WarmCount) diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 2ec6016e307..f8ae3bcf3ed 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -196,6 +196,28 @@ func (DescribePackagesFilterName) Values() []DescribePackagesFilterName { } } +type DomainHealth string + +// Enum values for DomainHealth +const ( + DomainHealthRed DomainHealth = "Red" + DomainHealthYellow DomainHealth = "Yellow" + DomainHealthGreen DomainHealth = "Green" + DomainHealthNotAvailable DomainHealth = "NotAvailable" +) + +// Values returns all known values for DomainHealth. 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 (DomainHealth) Values() []DomainHealth { + return []DomainHealth{ + "Red", + "Yellow", + "Green", + "NotAvailable", + } +} + type DomainPackageStatus string // Enum values for DomainPackageStatus @@ -220,6 +242,26 @@ func (DomainPackageStatus) Values() []DomainPackageStatus { } } +type DomainState string + +// Enum values for DomainState +const ( + DomainStateActive DomainState = "Active" + DomainStateProcessing DomainState = "Processing" + DomainStateNotAvailable DomainState = "NotAvailable" +) + +// Values returns all known values for DomainState. 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 (DomainState) Values() []DomainState { + return []DomainState{ + "Active", + "Processing", + "NotAvailable", + } +} + type DryRunMode string // Enum values for DryRunMode @@ -308,6 +350,24 @@ func (LogType) Values() []LogType { } } +type MasterNodeStatus string + +// Enum values for MasterNodeStatus +const ( + MasterNodeStatusAvailable MasterNodeStatus = "Available" + MasterNodeStatusUnAvailable MasterNodeStatus = "UnAvailable" +) + +// Values returns all known values for MasterNodeStatus. 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 (MasterNodeStatus) Values() []MasterNodeStatus { + return []MasterNodeStatus{ + "Available", + "UnAvailable", + } +} + type OpenSearchPartitionInstanceType string // Enum values for OpenSearchPartitionInstanceType @@ -934,3 +994,23 @@ func (VpcEndpointStatus) Values() []VpcEndpointStatus { "DELETE_FAILED", } } + +type ZoneStatus string + +// Enum values for ZoneStatus +const ( + ZoneStatusActive ZoneStatus = "Active" + ZoneStatusStandBy ZoneStatus = "StandBy" + ZoneStatusNotAvailable ZoneStatus = "NotAvailable" +) + +// Values returns all known values for ZoneStatus. 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 (ZoneStatus) Values() []ZoneStatus { + return []ZoneStatus{ + "Active", + "StandBy", + "NotAvailable", + } +} diff --git a/service/opensearch/types/errors.go b/service/opensearch/types/errors.go index d08f5540294..36ad92a415b 100644 --- a/service/opensearch/types/errors.go +++ b/service/opensearch/types/errors.go @@ -86,7 +86,7 @@ func (e *ConflictException) ErrorCode() string { } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An error occured because the client wanted to access a not supported operation. +// An error occured because the client wanted to access an unsupported operation. type DisabledOperationException struct { Message *string @@ -139,8 +139,7 @@ func (e *InternalException) ErrorCode() string { } func (e *InternalException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// The request processing has failed because you provided an invalid pagination -// token. +// Request processing failed because you provided an invalid pagination token. type InvalidPaginationTokenException struct { Message *string @@ -246,7 +245,7 @@ func (e *ResourceAlreadyExistsException) ErrorCode() string { } func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An exception for accessing or deleting a resource that does not exist.. +// An exception for accessing or deleting a resource that doesn't exist. type ResourceNotFoundException struct { Message *string diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 61e356a9f2e..6fbd8d362fb 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -319,6 +319,35 @@ type AutoTuneStatus struct { noSmithyDocumentSerde } +// Information about an Availability Zone on a domain. +type AvailabilityZoneInfo struct { + + // The name of the Availability Zone. + AvailabilityZoneName *string + + // The number of data nodes active in the Availability Zone. + AvailableDataNodeCount *string + + // The total number of data nodes configured in the Availability Zone. + ConfiguredDataNodeCount *string + + // The total number of primary and replica shards in the Availability Zone. + TotalShards *string + + // The total number of primary and replica shards that aren't allocated to any of + // the nodes in the Availability Zone. + TotalUnAssignedShards *string + + // The current state of the Availability Zone. Current options are Active and + // StandBy . + // - Active - Data nodes in the Availability Zone are in use. + // - StandBy - Data nodes in the Availability Zone are in a standby state. + // - NotAvailable - Unable to retrieve information. + ZoneStatus ZoneStatus + + noSmithyDocumentSerde +} + // Information about an Amazon OpenSearch Service domain. type AWSDomainInformation struct { @@ -405,7 +434,7 @@ type ClusterConfig struct { ColdStorageOptions *ColdStorageOptions // Number of dedicated master nodes in the cluster. This number must be greater - // than 1, otherwise you receive a validation exception. + // than 2 and not 4, otherwise you receive a validation exception. DedicatedMasterCount *int32 // Indicates whether dedicated master nodes are enabled for the cluster. True if @@ -422,6 +451,12 @@ type ClusterConfig struct { // Instance type of data nodes in the cluster. InstanceType OpenSearchPartitionInstanceType + // A boolean that indicates whether a multi-AZ domain is turned on with a standby + // AZ. For more information, see Configuring a multi-AZ domain in Amazon + // OpenSearch Service (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-multiaz.html) + // . + MultiAZWithStandbyEnabled *bool + // The number of warm nodes in the cluster. WarmCount *int32 @@ -705,8 +740,8 @@ type DomainPackageDetails struct { // The current version of the package. PackageVersion *string - // Denotes the location of the package on the OpenSearch Service cluster nodes. - // It's the same as synonym_path for dictionary files. + // The relative path of the package on the OpenSearch Service cluster nodes. This + // is synonym_path when the package is for synonym files. ReferencePath *string noSmithyDocumentSerde @@ -959,6 +994,15 @@ type EncryptionAtRestOptionsStatus struct { noSmithyDocumentSerde } +// Information about the active domain environment. +type EnvironmentInfo struct { + + // A list of AvailabilityZoneInfo for the domain. + AvailabilityZoneInformation []AvailabilityZoneInfo + + noSmithyDocumentSerde +} + // Additional information if the package is in an error state. Null otherwise. type ErrorDetails struct { @@ -1063,6 +1107,9 @@ type InstanceTypeDetails struct { // Whether logging is supported for the instance type. AppLogsEnabled *bool + // The supported Availability Zones for the instance type. + AvailabilityZones []string + // Whether Amazon Cognito access is supported for the instance type. CognitoEnabled *bool @@ -1197,7 +1244,7 @@ type OffPeakWindow struct { type OffPeakWindowOptions struct { // Whether to enable an off-peak window. This option is only available when - // modifying a domain created prior to February 13, 2023, not when creating a new + // modifying a domain created prior to February 16, 2023, not when creating a new // domain. All domains created after this date have the off-peak window enabled by // default. You can't disable the off-peak window after it's enabled for a domain. Enabled *bool @@ -1321,10 +1368,11 @@ type PackageDetails struct { // The unique identifier of the package. PackageID *string - // User-specified name of the package. + // The user-specified name of the package. PackageName *string - // Current status of the package. + // The current status of the package. The available options are AVAILABLE , COPYING + // , COPY_FAILED , VALIDATNG , VALIDATION_FAILED , DELETING , and DELETE_FAILED . PackageStatus PackageStatus // The type of package. diff --git a/service/opensearch/validators.go b/service/opensearch/validators.go index 4231f12870d..5877f557283 100644 --- a/service/opensearch/validators.go +++ b/service/opensearch/validators.go @@ -350,6 +350,26 @@ func (m *validateOpDescribeDomainConfig) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpDescribeDomainHealth struct { +} + +func (*validateOpDescribeDomainHealth) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDomainHealth) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDomainHealthInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDomainHealthInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeDomain struct { } @@ -938,6 +958,10 @@ func addOpDescribeDomainConfigValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpDescribeDomainConfig{}, middleware.After) } +func addOpDescribeDomainHealthValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDomainHealth{}, middleware.After) +} + func addOpDescribeDomainValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDomain{}, middleware.After) } @@ -1550,6 +1574,21 @@ func validateOpDescribeDomainConfigInput(v *DescribeDomainConfigInput) error { } } +func validateOpDescribeDomainHealthInput(v *DescribeDomainHealthInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDomainHealthInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeDomainInput(v *DescribeDomainInput) error { if v == nil { return nil diff --git a/service/wellarchitected/api_op_UpdateGlobalSettings.go b/service/wellarchitected/api_op_UpdateGlobalSettings.go index ca709ea9b1d..cc8c876fc7f 100644 --- a/service/wellarchitected/api_op_UpdateGlobalSettings.go +++ b/service/wellarchitected/api_op_UpdateGlobalSettings.go @@ -12,7 +12,7 @@ import ( ) // Updates whether the Amazon Web Services account is opted into organization -// sharing features. +// sharing and discovery integration features. func (c *Client) UpdateGlobalSettings(ctx context.Context, params *UpdateGlobalSettingsInput, optFns ...func(*Options)) (*UpdateGlobalSettingsOutput, error) { if params == nil { params = &UpdateGlobalSettingsInput{} @@ -30,6 +30,9 @@ func (c *Client) UpdateGlobalSettings(ctx context.Context, params *UpdateGlobalS type UpdateGlobalSettingsInput struct { + // The status of discovery support settings. + DiscoveryIntegrationStatus types.DiscoveryIntegrationStatus + // The status of organization sharing settings. OrganizationSharingStatus types.OrganizationSharingStatus diff --git a/service/wellarchitected/deserializers.go b/service/wellarchitected/deserializers.go index 0562b334a39..9f05da68bcf 100644 --- a/service/wellarchitected/deserializers.go +++ b/service/wellarchitected/deserializers.go @@ -11394,6 +11394,11 @@ func awsRestjson1_deserializeDocumentWorkloadDiscoveryConfig(v **types.WorkloadD sv.TrustedAdvisorIntegrationStatus = types.TrustedAdvisorIntegrationStatus(jtv) } + case "WorkloadResourceDefinition": + if err := awsRestjson1_deserializeDocumentWorkloadResourceDefinition(&sv.WorkloadResourceDefinition, value); err != nil { + return err + } + default: _, _ = key, value @@ -11511,6 +11516,42 @@ func awsRestjson1_deserializeDocumentWorkloadPillarPriorities(v *[]string, value return nil } +func awsRestjson1_deserializeDocumentWorkloadResourceDefinition(v *[]types.DefinitionType, 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.DefinitionType + if *v == nil { + cv = []types.DefinitionType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DefinitionType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DefinitionType to be of type string, got %T instead", value) + } + col = types.DefinitionType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentWorkloadShare(v **types.WorkloadShare, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/wellarchitected/serializers.go b/service/wellarchitected/serializers.go index 5bd502dcae6..00a6209ea61 100644 --- a/service/wellarchitected/serializers.go +++ b/service/wellarchitected/serializers.go @@ -3016,6 +3016,11 @@ func awsRestjson1_serializeOpDocumentUpdateGlobalSettingsInput(v *UpdateGlobalSe object := value.Object() defer object.Close() + if len(v.DiscoveryIntegrationStatus) > 0 { + ok := object.Key("DiscoveryIntegrationStatus") + ok.String(string(v.DiscoveryIntegrationStatus)) + } + if len(v.OrganizationSharingStatus) > 0 { ok := object.Key("OrganizationSharingStatus") ok.String(string(v.OrganizationSharingStatus)) @@ -3677,6 +3682,13 @@ func awsRestjson1_serializeDocumentWorkloadDiscoveryConfig(v *types.WorkloadDisc ok.String(string(v.TrustedAdvisorIntegrationStatus)) } + if v.WorkloadResourceDefinition != nil { + ok := object.Key("WorkloadResourceDefinition") + if err := awsRestjson1_serializeDocumentWorkloadResourceDefinition(v.WorkloadResourceDefinition, ok); err != nil { + return err + } + } + return nil } @@ -3712,3 +3724,14 @@ func awsRestjson1_serializeDocumentWorkloadPillarPriorities(v []string, value sm } return nil } + +func awsRestjson1_serializeDocumentWorkloadResourceDefinition(v []types.DefinitionType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} diff --git a/service/wellarchitected/types/enums.go b/service/wellarchitected/types/enums.go index 2e9aad23bf1..9f27815fcb3 100644 --- a/service/wellarchitected/types/enums.go +++ b/service/wellarchitected/types/enums.go @@ -150,6 +150,24 @@ func (ChoiceStatus) Values() []ChoiceStatus { } } +type DefinitionType string + +// Enum values for DefinitionType +const ( + DefinitionTypeWorkloadMetadata DefinitionType = "WORKLOAD_METADATA" + DefinitionTypeAppRegistry DefinitionType = "APP_REGISTRY" +) + +// Values returns all known values for DefinitionType. 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 (DefinitionType) Values() []DefinitionType { + return []DefinitionType{ + "WORKLOAD_METADATA", + "APP_REGISTRY", + } +} + type DifferenceStatus string // Enum values for DifferenceStatus @@ -170,6 +188,24 @@ func (DifferenceStatus) Values() []DifferenceStatus { } } +type DiscoveryIntegrationStatus string + +// Enum values for DiscoveryIntegrationStatus +const ( + DiscoveryIntegrationStatusEnabled DiscoveryIntegrationStatus = "ENABLED" + DiscoveryIntegrationStatusDisabled DiscoveryIntegrationStatus = "DISABLED" +) + +// Values returns all known values for DiscoveryIntegrationStatus. 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 (DiscoveryIntegrationStatus) Values() []DiscoveryIntegrationStatus { + return []DiscoveryIntegrationStatus{ + "ENABLED", + "DISABLED", + } +} + type ImportLensStatus string // Enum values for ImportLensStatus diff --git a/service/wellarchitected/types/types.go b/service/wellarchitected/types/types.go index 8f225f3e315..2580a2b33fd 100644 --- a/service/wellarchitected/types/types.go +++ b/service/wellarchitected/types/types.go @@ -964,6 +964,10 @@ type WorkloadDiscoveryConfig struct { // Discovery integration status in respect to Trusted Advisor for the workload. TrustedAdvisorIntegrationStatus TrustedAdvisorIntegrationStatus + // The mode to use for identifying resources associated with the workload. You can + // specify WORKLOAD_METADATA , APP_REGISTRY , or both. + WorkloadResourceDefinition []DefinitionType + noSmithyDocumentSerde }