From 6db3b2be5b17ef69b9a87c8a7fcb3c22e6d2caeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Nov 2024 01:39:16 +0000 Subject: [PATCH] Bump github.com/aws/aws-sdk-go-v2/service/ssm from 1.55.6 to 1.56.0 Bumps [github.com/aws/aws-sdk-go-v2/service/ssm](https://github.com/aws/aws-sdk-go-v2) from 1.55.6 to 1.56.0. - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/iot/v1.55.6...service/s3/v1.56.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/ssm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../aws-sdk-go-v2/service/ssm/CHANGELOG.md | 4 + .../service/ssm/api_op_CreatePatchBaseline.go | 4 + .../ssm/api_op_CreateResourceDataSync.go | 4 +- .../service/ssm/api_op_GetExecutionPreview.go | 172 ++ .../service/ssm/api_op_GetServiceSetting.go | 6 +- .../service/ssm/api_op_ListNodes.go | 267 +++ .../service/ssm/api_op_ListNodesSummary.go | 277 +++ .../service/ssm/api_op_ResetServiceSetting.go | 6 +- .../ssm/api_op_StartExecutionPreview.go | 165 ++ .../service/ssm/api_op_UpdatePatchBaseline.go | 4 + .../ssm/api_op_UpdateServiceSetting.go | 12 +- .../service/ssm/deserializers.go | 1939 +++++++++++++++-- .../aws-sdk-go-v2/service/ssm/generated.json | 5 + .../service/ssm/go_module_metadata.go | 2 +- .../aws-sdk-go-v2/service/ssm/serializers.go | 498 +++++ .../aws-sdk-go-v2/service/ssm/types/enums.go | 192 ++ .../aws-sdk-go-v2/service/ssm/types/errors.go | 65 +- .../aws-sdk-go-v2/service/ssm/types/types.go | 277 ++- .../aws-sdk-go-v2/service/ssm/validators.go | 286 +++ vendor/modules.txt | 2 +- 22 files changed, 3956 insertions(+), 237 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go create mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go diff --git a/go.mod b/go.mod index c5f564f0..069ef1eb 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.28.5 github.com/aws/aws-sdk-go-v2/service/ec2 v1.189.0 github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2 - github.com/aws/aws-sdk-go-v2/service/ssm v1.55.6 + github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 github.com/mattn/go-isatty v0.0.20 github.com/onsi/ginkgo/v2 v2.22.0 github.com/onsi/gomega v1.35.1 diff --git a/go.sum b/go.sum index 21a5424e..6807269a 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5 h1:wtpJ4zcwr github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.5/go.mod h1:qu/W9HXQbbQ4+1+JcZp0ZNPV31ym537ZJN+fiS7Ti8E= github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2 h1:wmt05tPp/CaRZpPV5B4SaJ5TwkHKom07/BzHoLdkY1o= github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2/go.mod h1:d+K9HESMpGb1EU9/UmmpInbGIUcAkwmcY6ZO/A3zZsw= -github.com/aws/aws-sdk-go-v2/service/ssm v1.55.6 h1:mh6Osa3cjwaaVSzJ92a8x1dBh8XQ7ekKLHyhjtx5RRw= -github.com/aws/aws-sdk-go-v2/service/ssm v1.55.6/go.mod h1:l9qF25TzH95FhcIak6e4vt79KE4I7M2Nf59eMUVjj6c= +github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 h1:mADKqoZaodipGgiZfuAjtlcr4IVBtXPZKVjkzUZCCYM= +github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0/go.mod h1:l9qF25TzH95FhcIak6e4vt79KE4I7M2Nf59eMUVjj6c= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6 h1:3zu537oLmsPfDMyjnUS2g+F2vITgy5pB74tHI+JBNoM= github.com/aws/aws-sdk-go-v2/service/sso v1.24.6/go.mod h1:WJSZH2ZvepM6t6jwu4w/Z45Eoi75lPN7DcydSRtJg6Y= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.5 h1:K0OQAsDywb0ltlFrZm0JHPY3yZp/S9OaoLU33S7vPS8= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md index f75ec695..ba1188cf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.56.0 (2024-11-21) + +* **Feature**: Added support for providing high-level overviews of managed nodes and previewing the potential impact of a runbook execution. + # v1.55.6 (2024-11-18) * **Dependency Update**: Update to smithy-go v1.22.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go index f2f8b510..30e80df3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go @@ -65,6 +65,10 @@ type CreatePatchBaselineInput struct { Description *string // A set of global filters used to include patches in the baseline. + // + // The GlobalFilters parameter can be configured only by using the CLI or an + // Amazon Web Services SDK. It can't be configured from the Patch Manager console, + // and its value isn't displayed in the console. GlobalFilters *types.PatchFilterGroup // Defines the operating system the patch baseline applies to. The default value diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go index 24cbc5d9..984b4807 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go @@ -18,7 +18,7 @@ import ( // You can configure Systems Manager Inventory to use the SyncToDestination type // to synchronize Inventory data from multiple Amazon Web Services Regions to a // single Amazon Simple Storage Service (Amazon S3) bucket. For more information, -// see [Creatinga a resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. +// see [Creating a resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. // // You can configure Systems Manager Explorer to use the SyncFromSource type to // synchronize operational work items (OpsItems) and operational data (OpsData) @@ -38,7 +38,7 @@ import ( // policy. // // [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]: https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html -// [Creatinga a resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-create-resource-data-sync.html +// [Creating a resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-create-resource-data-sync.html func (c *Client) CreateResourceDataSync(ctx context.Context, params *CreateResourceDataSyncInput, optFns ...func(*Options)) (*CreateResourceDataSyncOutput, error) { if params == nil { params = &CreateResourceDataSyncInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go new file mode 100644 index 00000000..f1cdcf62 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetExecutionPreview.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Initiates the process of retrieving an existing preview that shows the effects +// that running a specified Automation runbook would have on the targeted +// resources. +func (c *Client) GetExecutionPreview(ctx context.Context, params *GetExecutionPreviewInput, optFns ...func(*Options)) (*GetExecutionPreviewOutput, error) { + if params == nil { + params = &GetExecutionPreviewInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetExecutionPreview", params, optFns, c.addOperationGetExecutionPreviewMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetExecutionPreviewOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetExecutionPreviewInput struct { + + // The ID of the existing execution preview. + // + // This member is required. + ExecutionPreviewId *string + + noSmithyDocumentSerde +} + +type GetExecutionPreviewOutput struct { + + // A UTC timestamp indicating when the execution preview operation ended. + EndedAt *time.Time + + // Information about the changes that would be made if an execution were run. + ExecutionPreview types.ExecutionPreview + + // The generated ID for the existing execution preview. + ExecutionPreviewId *string + + // The current status of the execution preview operation. + Status types.ExecutionPreviewStatus + + // Supplemental information about the current status of the execution preview. + StatusMessage *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetExecutionPreviewMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetExecutionPreview{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetExecutionPreview{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetExecutionPreview"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetExecutionPreviewValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExecutionPreview(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetExecutionPreview(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetExecutionPreview", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go index 990d3667..508ef374 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go @@ -48,16 +48,20 @@ type GetServiceSettingInput struct { // The ID of the service setting to get. The setting ID can be one of the // following. // - // - /ssm/managed-instance/default-ec2-instance-management-role + // - /ssm/appmanager/appmanager-enabled // // - /ssm/automation/customer-script-log-destination // // - /ssm/automation/customer-script-log-group-name // + // - /ssm/automation/enable-adaptive-concurrency + // // - /ssm/documents/console/public-sharing-permission // // - /ssm/managed-instance/activation-tier // + // - /ssm/managed-instance/default-ec2-instance-management-role + // // - /ssm/opsinsights/opscenter // // - /ssm/parameter-store/default-parameter-tier diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go new file mode 100644 index 00000000..c281a7ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodes.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Takes in filters and returns a list of managed nodes matching the filter +// criteria. +func (c *Client) ListNodes(ctx context.Context, params *ListNodesInput, optFns ...func(*Options)) (*ListNodesOutput, error) { + if params == nil { + params = &ListNodesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListNodes", params, optFns, c.addOperationListNodesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListNodesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListNodesInput struct { + + // One or more filters. Use a filter to return a more specific list of managed + // nodes. + Filters []types.NodeFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // The name of the resource data sync to retrieve information about. Required for + // cross-account/cross-Region configurations. Optional for single + // account/single-Region configurations. + SyncName *string + + noSmithyDocumentSerde +} + +type ListNodesOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // A list of managed nodes that match the specified filter criteria. + Nodes []types.Node + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListNodes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListNodes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListNodes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListNodesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNodes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListNodesPaginatorOptions is the paginator options for ListNodes +type ListNodesPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + 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 +} + +// ListNodesPaginator is a paginator for ListNodes +type ListNodesPaginator struct { + options ListNodesPaginatorOptions + client ListNodesAPIClient + params *ListNodesInput + nextToken *string + firstPage bool +} + +// NewListNodesPaginator returns a new ListNodesPaginator +func NewListNodesPaginator(client ListNodesAPIClient, params *ListNodesInput, optFns ...func(*ListNodesPaginatorOptions)) *ListNodesPaginator { + if params == nil { + params = &ListNodesInput{} + } + + options := ListNodesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListNodesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListNodesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListNodes page. +func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNodesOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListNodes(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 +} + +// ListNodesAPIClient is a client that implements the ListNodes operation. +type ListNodesAPIClient interface { + ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) +} + +var _ ListNodesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListNodes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListNodes", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go new file mode 100644 index 00000000..594b7480 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListNodesSummary.go @@ -0,0 +1,277 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Generates a summary of managed instance/node metadata based on the filters and +// aggregators you specify. Results are grouped by the input aggregator you +// specify. +func (c *Client) ListNodesSummary(ctx context.Context, params *ListNodesSummaryInput, optFns ...func(*Options)) (*ListNodesSummaryOutput, error) { + if params == nil { + params = &ListNodesSummaryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListNodesSummary", params, optFns, c.addOperationListNodesSummaryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListNodesSummaryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListNodesSummaryInput struct { + + // Specify one or more aggregators to return a count of managed nodes that match + // that expression. For example, a count of managed nodes by operating system. + // + // This member is required. + Aggregators []types.NodeAggregator + + // One or more filters. Use a filter to generate a summary that matches your + // specified filter criteria. + Filters []types.NodeFilter + + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) The call also returns a token that you can specify in a + // subsequent call to get the next set of results. + NextToken *string + + // The name of the resource data sync to retrieve information about. Required for + // cross-account/cross-Region configuration. Optional for single + // account/single-Region configurations. + SyncName *string + + noSmithyDocumentSerde +} + +type ListNodesSummaryOutput struct { + + // The token to use when requesting the next set of items. If there are no + // additional items to return, the string is empty. + NextToken *string + + // A collection of objects reporting information about your managed nodes, such as + // the count of nodes by operating system. + Summary []map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListNodesSummaryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListNodesSummary{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListNodesSummary{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListNodesSummary"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListNodesSummaryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNodesSummary(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListNodesSummaryPaginatorOptions is the paginator options for ListNodesSummary +type ListNodesSummaryPaginatorOptions struct { + // The maximum number of items to return for this call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + 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 +} + +// ListNodesSummaryPaginator is a paginator for ListNodesSummary +type ListNodesSummaryPaginator struct { + options ListNodesSummaryPaginatorOptions + client ListNodesSummaryAPIClient + params *ListNodesSummaryInput + nextToken *string + firstPage bool +} + +// NewListNodesSummaryPaginator returns a new ListNodesSummaryPaginator +func NewListNodesSummaryPaginator(client ListNodesSummaryAPIClient, params *ListNodesSummaryInput, optFns ...func(*ListNodesSummaryPaginatorOptions)) *ListNodesSummaryPaginator { + if params == nil { + params = &ListNodesSummaryInput{} + } + + options := ListNodesSummaryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListNodesSummaryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListNodesSummaryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListNodesSummary page. +func (p *ListNodesSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListNodesSummaryOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListNodesSummary(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 +} + +// ListNodesSummaryAPIClient is a client that implements the ListNodesSummary +// operation. +type ListNodesSummaryAPIClient interface { + ListNodesSummary(context.Context, *ListNodesSummaryInput, ...func(*Options)) (*ListNodesSummaryOutput, error) +} + +var _ ListNodesSummaryAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListNodesSummary(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListNodesSummary", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go index eefc0c1f..1fb93549 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go @@ -48,16 +48,20 @@ type ResetServiceSettingInput struct { // The Amazon Resource Name (ARN) of the service setting to reset. The setting ID // can be one of the following. // - // - /ssm/managed-instance/default-ec2-instance-management-role + // - /ssm/appmanager/appmanager-enabled // // - /ssm/automation/customer-script-log-destination // // - /ssm/automation/customer-script-log-group-name // + // - /ssm/automation/enable-adaptive-concurrency + // // - /ssm/documents/console/public-sharing-permission // // - /ssm/managed-instance/activation-tier // + // - /ssm/managed-instance/default-ec2-instance-management-role + // // - /ssm/opsinsights/opscenter // // - /ssm/parameter-store/default-parameter-tier diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go new file mode 100644 index 00000000..7f91ee74 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartExecutionPreview.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Initiates the process of creating a preview showing the effects that running a +// specified Automation runbook would have on the targeted resources. +func (c *Client) StartExecutionPreview(ctx context.Context, params *StartExecutionPreviewInput, optFns ...func(*Options)) (*StartExecutionPreviewOutput, error) { + if params == nil { + params = &StartExecutionPreviewInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartExecutionPreview", params, optFns, c.addOperationStartExecutionPreviewMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartExecutionPreviewOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartExecutionPreviewInput struct { + + // The name of the Automation runbook to run. The result of the execution preview + // indicates what the impact would be of running this runbook. + // + // This member is required. + DocumentName *string + + // The version of the Automation runbook to run. The default value is $DEFAULT . + DocumentVersion *string + + // Information about the inputs that can be specified for the preview operation. + ExecutionInputs types.ExecutionInputs + + noSmithyDocumentSerde +} + +type StartExecutionPreviewOutput struct { + + // The ID of the execution preview generated by the system. + ExecutionPreviewId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartExecutionPreviewMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartExecutionPreview{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartExecutionPreview{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartExecutionPreview"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpStartExecutionPreviewValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartExecutionPreview(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartExecutionPreview(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartExecutionPreview", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go index b6aa8359..c8009d93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go @@ -62,6 +62,10 @@ type UpdatePatchBaselineInput struct { Description *string // A set of global filters used to include patches in the baseline. + // + // The GlobalFilters parameter can be configured only by using the CLI or an + // Amazon Web Services SDK. It can't be configured from the Patch Manager console, + // and its value isn't displayed in the console. GlobalFilters *types.PatchFilterGroup // The name of the patch baseline. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go index 80cc9f9c..4f32ae0f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go @@ -48,16 +48,20 @@ type UpdateServiceSettingInput struct { // arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/parameter-store/high-throughput-enabled // . The setting ID can be one of the following. // - // - /ssm/managed-instance/default-ec2-instance-management-role + // - /ssm/appmanager/appmanager-enabled // // - /ssm/automation/customer-script-log-destination // // - /ssm/automation/customer-script-log-group-name // + // - /ssm/automation/enable-adaptive-concurrency + // // - /ssm/documents/console/public-sharing-permission // // - /ssm/managed-instance/activation-tier // + // - /ssm/managed-instance/default-ec2-instance-management-role + // // - /ssm/opsinsights/opscenter // // - /ssm/parameter-store/default-parameter-tier @@ -75,8 +79,7 @@ type UpdateServiceSettingInput struct { // The new value to specify for the service setting. The following list specifies // the available values for each setting. // - // - For /ssm/managed-instance/default-ec2-instance-management-role , enter the - // name of an IAM role. + // - For /ssm/appmanager/appmanager-enabled , enter True or False . // // - For /ssm/automation/customer-script-log-destination , enter CloudWatch . // @@ -88,6 +91,9 @@ type UpdateServiceSettingInput struct { // // - For /ssm/managed-instance/activation-tier , enter standard or advanced . // + // - For /ssm/managed-instance/default-ec2-instance-management-role , enter the + // name of an IAM role. + // // - For /ssm/opsinsights/opscenter , enter Enabled or Disabled . // // - For /ssm/parameter-store/default-parameter-tier , enter Standard , Advanced diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go index 33b33e32..20ef3c41 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go @@ -8295,6 +8295,120 @@ func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, m } } +type awsAwsjson11_deserializeOpGetExecutionPreview struct { +} + +func (*awsAwsjson11_deserializeOpGetExecutionPreview) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetExecutionPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetExecutionPreview(response, &metadata) + } + output := &GetExecutionPreviewOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetExecutionPreviewOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetExecutionPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpGetInventory struct { } @@ -11727,14 +11841,14 @@ func awsAwsjson11_deserializeOpErrorListInventoryEntries(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpListOpsItemEvents struct { +type awsAwsjson11_deserializeOpListNodes struct { } -func (*awsAwsjson11_deserializeOpListOpsItemEvents) ID() string { +func (*awsAwsjson11_deserializeOpListNodes) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListNodes) 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) @@ -11752,9 +11866,9 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemEvents(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListNodes(response, &metadata) } - output := &ListOpsItemEventsOutput{} + output := &ListNodesOutput{} out.Result = output var buff [1024]byte @@ -11774,7 +11888,7 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListOpsItemEventsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListNodesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11788,7 +11902,7 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListNodes(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)} @@ -11828,14 +11942,17 @@ func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Respo case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsItemInvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - case strings.EqualFold("OpsItemLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - case strings.EqualFold("OpsItemNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11847,14 +11964,14 @@ func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpListOpsItemRelatedItems struct { +type awsAwsjson11_deserializeOpListNodesSummary struct { } -func (*awsAwsjson11_deserializeOpListOpsItemRelatedItems) ID() string { +func (*awsAwsjson11_deserializeOpListNodesSummary) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListNodesSummary) 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) @@ -11872,9 +11989,9 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListNodesSummary(response, &metadata) } - output := &ListOpsItemRelatedItemsOutput{} + output := &ListNodesSummaryOutput{} out.Result = output var buff [1024]byte @@ -11894,7 +12011,7 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListNodesSummaryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11908,7 +12025,253 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListNodesSummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListOpsItemEvents struct { +} + +func (*awsAwsjson11_deserializeOpListOpsItemEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemEvents(response, &metadata) + } + output := &ListOpsItemEventsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListOpsItemEventsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListOpsItemRelatedItems struct { +} + +func (*awsAwsjson11_deserializeOpListOpsItemRelatedItems) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response, &metadata) + } + output := &ListOpsItemRelatedItemsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(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)} @@ -14571,6 +14934,120 @@ func awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response *smithy } } +type awsAwsjson11_deserializeOpStartExecutionPreview struct { +} + +func (*awsAwsjson11_deserializeOpStartExecutionPreview) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartExecutionPreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartExecutionPreview(response, &metadata) + } + output := &StartExecutionPreviewOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartExecutionPreviewOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartExecutionPreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpStartSession struct { } @@ -21331,6 +21808,41 @@ func awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response *smithyhtt return output } +func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedOperationException{} + err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson11_deserializeErrorUnsupportedParameterType(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -21401,6 +21913,41 @@ func awsAwsjson11_deserializeErrorUnsupportedPlatformType(response *smithyhttp.R return output } +func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson11_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson11_deserializeDocumentAccountIdList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -24449,6 +24996,65 @@ func awsAwsjson11_deserializeDocumentAutomationExecutionNotFoundException(v **ty return nil } +func awsAwsjson11_deserializeDocumentAutomationExecutionPreview(v **types.AutomationExecutionPreview, 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.AutomationExecutionPreview + if *v == nil { + sv = &types.AutomationExecutionPreview{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Regions": + if err := awsAwsjson11_deserializeDocumentRegionList(&sv.Regions, value); err != nil { + return err + } + + case "StepPreviews": + if err := awsAwsjson11_deserializeDocumentStepPreviewMap(&sv.StepPreviews, value); err != nil { + return err + } + + case "TargetPreviews": + if err := awsAwsjson11_deserializeDocumentTargetPreviewList(&sv.TargetPreviews, value); err != nil { + return err + } + + case "TotalAccounts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalAccounts = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentAutomationParameterMap(v *map[string][]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -27613,6 +28219,46 @@ func awsAwsjson11_deserializeDocumentExcludeAccounts(v *[]string, value interfac return nil } +func awsAwsjson11_deserializeDocumentExecutionPreview(v *types.ExecutionPreview, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.ExecutionPreview +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "Automation": + var mv types.AutomationExecutionPreview + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentAutomationExecutionPreview(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.ExecutionPreviewMemberAutomation{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsAwsjson11_deserializeDocumentFailedCreateAssociation(v **types.FailedCreateAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -28517,6 +29163,127 @@ func awsAwsjson11_deserializeDocumentInstanceIdList(v *[]string, value interface return nil } +func awsAwsjson11_deserializeDocumentInstanceInfo(v **types.InstanceInfo, 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.InstanceInfo + if *v == nil { + sv = &types.InstanceInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AgentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentType to be of type string, got %T instead", value) + } + sv.AgentType = ptr.String(jtv) + } + + case "AgentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AgentVersion to be of type string, got %T instead", value) + } + sv.AgentVersion = ptr.String(jtv) + } + + case "ComputerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputerName to be of type string, got %T instead", value) + } + sv.ComputerName = ptr.String(jtv) + } + + case "InstanceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceStatus to be of type string, got %T instead", value) + } + sv.InstanceStatus = ptr.String(jtv) + } + + case "IpAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } + + case "ManagedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ManagedStatus to be of type string, got %T instead", value) + } + sv.ManagedStatus = types.ManagedStatus(jtv) + } + + case "PlatformName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformName to be of type string, got %T instead", value) + } + sv.PlatformName = ptr.String(jtv) + } + + case "PlatformType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformType to be of type string, got %T instead", value) + } + sv.PlatformType = types.PlatformType(jtv) + } + + case "PlatformVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformVersion to be of type string, got %T instead", value) + } + sv.PlatformVersion = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentInstanceInformation(v **types.InstanceInformation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34114,6 +34881,281 @@ func awsAwsjson11_deserializeDocumentMetadataValue(v **types.MetadataValue, valu return nil } +func awsAwsjson11_deserializeDocumentNode(v **types.Node, 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.Node + if *v == nil { + sv = &types.Node{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CaptureTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CaptureTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected NodeCaptureTime to be a JSON Number, got %T instead", value) + + } + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "NodeType": + if err := awsAwsjson11_deserializeDocumentNodeType(&sv.NodeType, value); err != nil { + return err + } + + case "Owner": + if err := awsAwsjson11_deserializeDocumentNodeOwnerInfo(&sv.Owner, value); err != nil { + return err + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeRegion to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeList(v *[]types.Node, 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.Node + if *v == nil { + cv = []types.Node{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Node + destAddr := &col + if err := awsAwsjson11_deserializeDocumentNode(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeOwnerInfo(v **types.NodeOwnerInfo, 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.NodeOwnerInfo + if *v == nil { + sv = &types.NodeOwnerInfo{} + } 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 NodeAccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "OrganizationalUnitId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeOrganizationalUnitId to be of type string, got %T instead", value) + } + sv.OrganizationalUnitId = ptr.String(jtv) + } + + case "OrganizationalUnitPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeOrganizationalUnitPath to be of type string, got %T instead", value) + } + sv.OrganizationalUnitPath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeSummary(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttributeValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeSummaryList(v *[]map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []map[string]string + if *v == nil { + cv = []map[string]string{} + } else { + cv = *v + } + + for _, value := range shape { + var col map[string]string + if err := awsAwsjson11_deserializeDocumentNodeSummary(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentNodeType(v *types.NodeType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.NodeType +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "Instance": + var mv types.InstanceInfo + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentInstanceInfo(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.NodeTypeMemberInstance{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsAwsjson11_deserializeDocumentNonCompliantSummary(v **types.NonCompliantSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -38965,6 +40007,42 @@ func awsAwsjson11_deserializeDocumentProgressCounters(v **types.ProgressCounters return nil } +func awsAwsjson11_deserializeDocumentRegionList(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 Region to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentRegions(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -41515,6 +42593,46 @@ func awsAwsjson11_deserializeDocumentStepExecutionList(v *[]types.StepExecution, return nil } +func awsAwsjson11_deserializeDocumentStepPreviewMap(v *map[string]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int32 + if *v == nil { + mv = map[string]int32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = int32(i64) + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsAwsjson11_deserializeDocumentSubTypeCountLimitExceededException(v **types.SubTypeCountLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42045,6 +43163,93 @@ func awsAwsjson11_deserializeDocumentTargetParameterList(v *[]string, value inte return nil } +func awsAwsjson11_deserializeDocumentTargetPreview(v **types.TargetPreview, 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.TargetPreview + if *v == nil { + sv = &types.TargetPreview{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = int32(i64) + } + + case "TargetType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TargetType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetPreviewList(v *[]types.TargetPreview, 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.TargetPreview + if *v == nil { + cv = []types.TargetPreview{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TargetPreview + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTargetPreview(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentTargets(v *[]types.Target, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42435,6 +43640,46 @@ func awsAwsjson11_deserializeDocumentUnsupportedOperatingSystem(v **types.Unsupp return nil } +func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, 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.UnsupportedOperationException + if *v == nil { + sv = &types.UnsupportedOperationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentUnsupportedParameterType(v **types.UnsupportedParameterType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42515,6 +43760,55 @@ func awsAwsjson11_deserializeDocumentUnsupportedPlatformType(v **types.Unsupport return nil } +func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReasonCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentValidNextStepList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -45891,6 +47185,85 @@ func awsAwsjson11_deserializeOpDocumentGetDocumentOutput(v **GetDocumentOutput, return nil } +func awsAwsjson11_deserializeOpDocumentGetExecutionPreviewOutput(v **GetExecutionPreviewOutput, 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 *GetExecutionPreviewOutput + if *v == nil { + sv = &GetExecutionPreviewOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EndedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ExecutionPreview": + if err := awsAwsjson11_deserializeDocumentExecutionPreview(&sv.ExecutionPreview, value); err != nil { + return err + } + + case "ExecutionPreviewId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionPreviewId to be of type string, got %T instead", value) + } + sv.ExecutionPreviewId = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionPreviewStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExecutionPreviewStatus(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetInventoryOutput(v **GetInventoryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -47533,7 +48906,259 @@ func awsAwsjson11_deserializeOpDocumentListCommandInvocationsOutput(v **ListComm return nil } -func awsAwsjson11_deserializeOpDocumentListCommandsOutput(v **ListCommandsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListCommandsOutput(v **ListCommandsOutput, 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 *ListCommandsOutput + if *v == nil { + sv = &ListCommandsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Commands": + if err := awsAwsjson11_deserializeDocumentCommandList(&sv.Commands, 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 awsAwsjson11_deserializeOpDocumentListComplianceItemsOutput(v **ListComplianceItemsOutput, 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 *ListComplianceItemsOutput + if *v == nil { + sv = &ListComplianceItemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplianceItems": + if err := awsAwsjson11_deserializeDocumentComplianceItemList(&sv.ComplianceItems, 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 awsAwsjson11_deserializeOpDocumentListComplianceSummariesOutput(v **ListComplianceSummariesOutput, 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 *ListComplianceSummariesOutput + if *v == nil { + sv = &ListComplianceSummariesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ComplianceSummaryItems": + if err := awsAwsjson11_deserializeDocumentComplianceSummaryItemList(&sv.ComplianceSummaryItems, 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 awsAwsjson11_deserializeOpDocumentListDocumentMetadataHistoryOutput(v **ListDocumentMetadataHistoryOutput, 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 *ListDocumentMetadataHistoryOutput + if *v == nil { + sv = &ListDocumentMetadataHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Author": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentAuthor to be of type string, got %T instead", value) + } + sv.Author = ptr.String(jtv) + } + + case "DocumentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "Metadata": + if err := awsAwsjson11_deserializeDocumentDocumentMetadataResponseInfo(&sv.Metadata, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListDocumentsOutput(v **ListDocumentsOutput, 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 *ListDocumentsOutput + if *v == nil { + sv = &ListDocumentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DocumentIdentifiers": + if err := awsAwsjson11_deserializeDocumentDocumentIdentifierList(&sv.DocumentIdentifiers, 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 awsAwsjson11_deserializeOpDocumentListDocumentVersionsOutput(v **ListDocumentVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -47546,17 +49171,17 @@ func awsAwsjson11_deserializeOpDocumentListCommandsOutput(v **ListCommandsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCommandsOutput + var sv *ListDocumentVersionsOutput if *v == nil { - sv = &ListCommandsOutput{} + sv = &ListDocumentVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Commands": - if err := awsAwsjson11_deserializeDocumentCommandList(&sv.Commands, value); err != nil { + case "DocumentVersions": + if err := awsAwsjson11_deserializeDocumentDocumentVersionList(&sv.DocumentVersions, value); err != nil { return err } @@ -47578,7 +49203,7 @@ func awsAwsjson11_deserializeOpDocumentListCommandsOutput(v **ListCommandsOutput return nil } -func awsAwsjson11_deserializeOpDocumentListComplianceItemsOutput(v **ListComplianceItemsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(v **ListInventoryEntriesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -47591,144 +49216,63 @@ func awsAwsjson11_deserializeOpDocumentListComplianceItemsOutput(v **ListComplia return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListComplianceItemsOutput + var sv *ListInventoryEntriesOutput if *v == nil { - sv = &ListComplianceItemsOutput{} + sv = &ListInventoryEntriesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ComplianceItems": - if err := awsAwsjson11_deserializeDocumentComplianceItemList(&sv.ComplianceItems, value); err != nil { - return err - } - - case "NextToken": + case "CaptureTime": 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 InventoryItemCaptureTime to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.CaptureTime = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListComplianceSummariesOutput(v **ListComplianceSummariesOutput, 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 *ListComplianceSummariesOutput - if *v == nil { - sv = &ListComplianceSummariesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ComplianceSummaryItems": - if err := awsAwsjson11_deserializeDocumentComplianceSummaryItemList(&sv.ComplianceSummaryItems, value); err != nil { + case "Entries": + if err := awsAwsjson11_deserializeDocumentInventoryItemEntryList(&sv.Entries, 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 awsAwsjson11_deserializeOpDocumentListDocumentMetadataHistoryOutput(v **ListDocumentMetadataHistoryOutput, 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 *ListDocumentMetadataHistoryOutput - if *v == nil { - sv = &ListDocumentMetadataHistoryOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Author": + case "InstanceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DocumentAuthor to be of type string, got %T instead", value) + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) } - sv.Author = ptr.String(jtv) + sv.InstanceId = ptr.String(jtv) } - case "DocumentVersion": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.DocumentVersion = ptr.String(jtv) - } - - case "Metadata": - if err := awsAwsjson11_deserializeDocumentDocumentMetadataResponseInfo(&sv.Metadata, value); err != nil { - return err + sv.NextToken = ptr.String(jtv) } - case "Name": + case "SchemaVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DocumentName to be of type string, got %T instead", value) + return fmt.Errorf("expected InventoryItemSchemaVersion to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.SchemaVersion = ptr.String(jtv) } - case "NextToken": + case "TypeName": 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 InventoryItemTypeName to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.TypeName = ptr.String(jtv) } default: @@ -47740,7 +49284,7 @@ func awsAwsjson11_deserializeOpDocumentListDocumentMetadataHistoryOutput(v **Lis return nil } -func awsAwsjson11_deserializeOpDocumentListDocumentsOutput(v **ListDocumentsOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListNodesOutput(v **ListNodesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -47753,20 +49297,15 @@ func awsAwsjson11_deserializeOpDocumentListDocumentsOutput(v **ListDocumentsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDocumentsOutput + var sv *ListNodesOutput if *v == nil { - sv = &ListDocumentsOutput{} + sv = &ListNodesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DocumentIdentifiers": - if err := awsAwsjson11_deserializeDocumentDocumentIdentifierList(&sv.DocumentIdentifiers, value); err != nil { - return err - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -47776,51 +49315,11 @@ func awsAwsjson11_deserializeOpDocumentListDocumentsOutput(v **ListDocumentsOutp sv.NextToken = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListDocumentVersionsOutput(v **ListDocumentVersionsOutput, 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 *ListDocumentVersionsOutput - if *v == nil { - sv = &ListDocumentVersionsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "DocumentVersions": - if err := awsAwsjson11_deserializeDocumentDocumentVersionList(&sv.DocumentVersions, value); err != nil { + case "Nodes": + if err := awsAwsjson11_deserializeDocumentNodeList(&sv.Nodes, 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 @@ -47830,7 +49329,7 @@ func awsAwsjson11_deserializeOpDocumentListDocumentVersionsOutput(v **ListDocume return nil } -func awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(v **ListInventoryEntriesOutput, value interface{}) error { +func awsAwsjson11_deserializeOpDocumentListNodesSummaryOutput(v **ListNodesSummaryOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -47843,38 +49342,15 @@ func awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(v **ListInvent return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListInventoryEntriesOutput + var sv *ListNodesSummaryOutput if *v == nil { - sv = &ListInventoryEntriesOutput{} + sv = &ListNodesSummaryOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CaptureTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InventoryItemCaptureTime to be of type string, got %T instead", value) - } - sv.CaptureTime = ptr.String(jtv) - } - - case "Entries": - if err := awsAwsjson11_deserializeDocumentInventoryItemEntryList(&sv.Entries, value); err != nil { - return err - } - - case "InstanceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) - } - sv.InstanceId = ptr.String(jtv) - } - case "NextToken": if value != nil { jtv, ok := value.(string) @@ -47884,22 +49360,9 @@ func awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(v **ListInvent sv.NextToken = ptr.String(jtv) } - case "SchemaVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InventoryItemSchemaVersion to be of type string, got %T instead", value) - } - sv.SchemaVersion = ptr.String(jtv) - } - - case "TypeName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InventoryItemTypeName to be of type string, got %T instead", value) - } - sv.TypeName = ptr.String(jtv) + case "Summary": + if err := awsAwsjson11_deserializeDocumentNodeSummaryList(&sv.Summary, value); err != nil { + return err } default: @@ -48848,6 +50311,46 @@ func awsAwsjson11_deserializeOpDocumentStartChangeRequestExecutionOutput(v **Sta return nil } +func awsAwsjson11_deserializeOpDocumentStartExecutionPreviewOutput(v **StartExecutionPreviewOutput, 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 *StartExecutionPreviewOutput + if *v == nil { + sv = &StartExecutionPreviewOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ExecutionPreviewId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionPreviewId to be of type string, got %T instead", value) + } + sv.ExecutionPreviewId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentStartSessionOutput(v **StartSessionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json index 4bf32482..f8082370 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/generated.json @@ -79,6 +79,7 @@ "api_op_GetDefaultPatchBaseline.go", "api_op_GetDeployablePatchSnapshotForInstance.go", "api_op_GetDocument.go", + "api_op_GetExecutionPreview.go", "api_op_GetInventory.go", "api_op_GetInventorySchema.go", "api_op_GetMaintenanceWindow.go", @@ -108,6 +109,8 @@ "api_op_ListDocumentVersions.go", "api_op_ListDocuments.go", "api_op_ListInventoryEntries.go", + "api_op_ListNodes.go", + "api_op_ListNodesSummary.go", "api_op_ListOpsItemEvents.go", "api_op_ListOpsItemRelatedItems.go", "api_op_ListOpsMetadata.go", @@ -131,6 +134,7 @@ "api_op_StartAssociationsOnce.go", "api_op_StartAutomationExecution.go", "api_op_StartChangeRequestExecution.go", + "api_op_StartExecutionPreview.go", "api_op_StartSession.go", "api_op_StopAutomationExecution.go", "api_op_TerminateSession.go", @@ -165,6 +169,7 @@ "types/enums.go", "types/errors.go", "types/types.go", + "types/types_exported_test.go", "validators.go" ], "go": "1.15", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go index 58a3b96f..2e458480 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go @@ -3,4 +3,4 @@ package ssm // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.55.6" +const goModuleVersion = "1.56.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go index eef889df..cf428bdb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go @@ -4287,6 +4287,67 @@ func (m *awsAwsjson11_serializeOpGetDocument) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetExecutionPreview struct { +} + +func (*awsAwsjson11_serializeOpGetExecutionPreview) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetExecutionPreview) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetExecutionPreviewInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.GetExecutionPreview") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetExecutionPreviewInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpGetInventory struct { } @@ -6056,6 +6117,128 @@ func (m *awsAwsjson11_serializeOpListInventoryEntries) HandleSerialize(ctx conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListNodes struct { +} + +func (*awsAwsjson11_serializeOpListNodes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListNodes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListNodesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListNodes") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListNodesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListNodesSummary struct { +} + +func (*awsAwsjson11_serializeOpListNodesSummary) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListNodesSummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListNodesSummaryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.ListNodesSummary") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListNodesSummaryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListOpsItemEvents struct { } @@ -7459,6 +7642,67 @@ func (m *awsAwsjson11_serializeOpStartChangeRequestExecution) HandleSerialize(ct return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpStartExecutionPreview struct { +} + +func (*awsAwsjson11_serializeOpStartExecutionPreview) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartExecutionPreview) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartExecutionPreviewInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.StartExecutionPreview") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartExecutionPreviewInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpStartSession struct { } @@ -8846,6 +9090,51 @@ func awsAwsjson11_serializeDocumentAutomationExecutionFilterValueList(v []string return nil } +func awsAwsjson11_serializeDocumentAutomationExecutionInputs(v *types.AutomationExecutionInputs, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsAwsjson11_serializeDocumentAutomationParameterMap(v.Parameters, ok); err != nil { + return err + } + } + + if v.TargetLocations != nil { + ok := object.Key("TargetLocations") + if err := awsAwsjson11_serializeDocumentTargetLocations(v.TargetLocations, ok); err != nil { + return err + } + } + + if v.TargetLocationsURL != nil { + ok := object.Key("TargetLocationsURL") + ok.String(*v.TargetLocationsURL) + } + + if v.TargetMaps != nil { + ok := object.Key("TargetMaps") + if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { + return err + } + } + + if v.TargetParameterName != nil { + ok := object.Key("TargetParameterName") + ok.String(*v.TargetParameterName) + } + + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentAutomationParameterMap(v map[string][]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9482,6 +9771,24 @@ func awsAwsjson11_serializeDocumentExcludeAccounts(v []string, value smithyjson. return nil } +func awsAwsjson11_serializeDocumentExecutionInputs(v types.ExecutionInputs, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ExecutionInputsMemberAutomation: + av := object.Key("Automation") + if err := awsAwsjson11_serializeDocumentAutomationExecutionInputs(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsAwsjson11_serializeDocumentInstanceAssociationOutputLocation(v *types.InstanceAssociationOutputLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10234,6 +10541,96 @@ func awsAwsjson11_serializeDocumentMetadataValue(v *types.MetadataValue, value s return nil } +func awsAwsjson11_serializeDocumentNodeAggregator(v *types.NodeAggregator, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentNodeAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if len(v.AggregatorType) > 0 { + ok := object.Key("AggregatorType") + ok.String(string(v.AggregatorType)) + } + + if len(v.AttributeName) > 0 { + ok := object.Key("AttributeName") + ok.String(string(v.AttributeName)) + } + + if len(v.TypeName) > 0 { + ok := object.Key("TypeName") + ok.String(string(v.TypeName)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentNodeAggregatorList(v []types.NodeAggregator, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentNodeAggregator(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentNodeFilter(v *types.NodeFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("Key") + ok.String(string(v.Key)) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentNodeFilterValueList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentNodeFilterList(v []types.NodeFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentNodeFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentNodeFilterValueList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentNotificationConfig(v *types.NotificationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -13617,6 +14014,18 @@ func awsAwsjson11_serializeOpDocumentGetDocumentInput(v *GetDocumentInput, value return nil } +func awsAwsjson11_serializeOpDocumentGetExecutionPreviewInput(v *GetExecutionPreviewInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExecutionPreviewId != nil { + ok := object.Key("ExecutionPreviewId") + ok.String(*v.ExecutionPreviewId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetInventoryInput(v *GetInventoryInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -14338,6 +14747,71 @@ func awsAwsjson11_serializeOpDocumentListInventoryEntriesInput(v *ListInventoryE return nil } +func awsAwsjson11_serializeOpDocumentListNodesInput(v *ListNodesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentNodeFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListNodesSummaryInput(v *ListNodesSummaryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Aggregators != nil { + ok := object.Key("Aggregators") + if err := awsAwsjson11_serializeDocumentNodeAggregatorList(v.Aggregators, ok); err != nil { + return err + } + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentNodeFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.SyncName != nil { + ok := object.Key("SyncName") + ok.String(*v.SyncName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListOpsItemEventsInput(v *ListOpsItemEventsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -15192,6 +15666,30 @@ func awsAwsjson11_serializeOpDocumentStartChangeRequestExecutionInput(v *StartCh return nil } +func awsAwsjson11_serializeOpDocumentStartExecutionPreviewInput(v *StartExecutionPreviewInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DocumentName != nil { + ok := object.Key("DocumentName") + ok.String(*v.DocumentName) + } + + if v.DocumentVersion != nil { + ok := object.Key("DocumentVersion") + ok.String(*v.DocumentVersion) + } + + if v.ExecutionInputs != nil { + ok := object.Key("ExecutionInputs") + if err := awsAwsjson11_serializeDocumentExecutionInputs(v.ExecutionInputs, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentStartSessionInput(v *StartSessionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go index 50f86176..d17ae4b9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/enums.go @@ -839,6 +839,29 @@ func (ExecutionMode) Values() []ExecutionMode { } } +type ExecutionPreviewStatus string + +// Enum values for ExecutionPreviewStatus +const ( + ExecutionPreviewStatusPending ExecutionPreviewStatus = "Pending" + ExecutionPreviewStatusInProgress ExecutionPreviewStatus = "InProgress" + ExecutionPreviewStatusSuccess ExecutionPreviewStatus = "Success" + ExecutionPreviewStatusFailed ExecutionPreviewStatus = "Failed" +) + +// Values returns all known values for ExecutionPreviewStatus. 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 (ExecutionPreviewStatus) Values() []ExecutionPreviewStatus { + return []ExecutionPreviewStatus{ + "Pending", + "InProgress", + "Success", + "Failed", + } +} + type ExternalAlarmState string // Enum values for ExternalAlarmState @@ -879,6 +902,27 @@ func (Fault) Values() []Fault { } } +type ImpactType string + +// Enum values for ImpactType +const ( + ImpactTypeMutating ImpactType = "Mutating" + ImpactTypeNonMutating ImpactType = "NonMutating" + ImpactTypeUndetermined ImpactType = "Undetermined" +) + +// Values returns all known values for ImpactType. 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 (ImpactType) Values() []ImpactType { + return []ImpactType{ + "Mutating", + "NonMutating", + "Undetermined", + } +} + type InstanceInformationFilterKey string // Enum values for InstanceInformationFilterKey @@ -1194,6 +1238,154 @@ func (MaintenanceWindowTaskType) Values() []MaintenanceWindowTaskType { } } +type ManagedStatus string + +// Enum values for ManagedStatus +const ( + ManagedStatusAll ManagedStatus = "All" + ManagedStatusManaged ManagedStatus = "Managed" + ManagedStatusUnmanaged ManagedStatus = "Unmanaged" +) + +// Values returns all known values for ManagedStatus. 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 (ManagedStatus) Values() []ManagedStatus { + return []ManagedStatus{ + "All", + "Managed", + "Unmanaged", + } +} + +type NodeAggregatorType string + +// Enum values for NodeAggregatorType +const ( + NodeAggregatorTypeCount NodeAggregatorType = "Count" +) + +// Values returns all known values for NodeAggregatorType. 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 (NodeAggregatorType) Values() []NodeAggregatorType { + return []NodeAggregatorType{ + "Count", + } +} + +type NodeAttributeName string + +// Enum values for NodeAttributeName +const ( + NodeAttributeNameAgentVersion NodeAttributeName = "AgentVersion" + NodeAttributeNamePlatformName NodeAttributeName = "PlatformName" + NodeAttributeNamePlatformType NodeAttributeName = "PlatformType" + NodeAttributeNamePlatformVersion NodeAttributeName = "PlatformVersion" + NodeAttributeNameRegion NodeAttributeName = "Region" + NodeAttributeNameResourceType NodeAttributeName = "ResourceType" +) + +// Values returns all known values for NodeAttributeName. 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 (NodeAttributeName) Values() []NodeAttributeName { + return []NodeAttributeName{ + "AgentVersion", + "PlatformName", + "PlatformType", + "PlatformVersion", + "Region", + "ResourceType", + } +} + +type NodeFilterKey string + +// Enum values for NodeFilterKey +const ( + NodeFilterKeyAgentType NodeFilterKey = "AgentType" + NodeFilterKeyAgentVersion NodeFilterKey = "AgentVersion" + NodeFilterKeyComputerName NodeFilterKey = "ComputerName" + NodeFilterKeyInstanceId NodeFilterKey = "InstanceId" + NodeFilterKeyInstanceStatus NodeFilterKey = "InstanceStatus" + NodeFilterKeyIpAddress NodeFilterKey = "IpAddress" + NodeFilterKeyManagedStatus NodeFilterKey = "ManagedStatus" + NodeFilterKeyPlatformName NodeFilterKey = "PlatformName" + NodeFilterKeyPlatformType NodeFilterKey = "PlatformType" + NodeFilterKeyPlatformVersion NodeFilterKey = "PlatformVersion" + NodeFilterKeyResourceType NodeFilterKey = "ResourceType" + NodeFilterKeyOrganizationalUnitId NodeFilterKey = "OrganizationalUnitId" + NodeFilterKeyOrganizationalUnitPath NodeFilterKey = "OrganizationalUnitPath" + NodeFilterKeyRegion NodeFilterKey = "Region" + NodeFilterKeyAccountId NodeFilterKey = "AccountId" +) + +// Values returns all known values for NodeFilterKey. 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 (NodeFilterKey) Values() []NodeFilterKey { + return []NodeFilterKey{ + "AgentType", + "AgentVersion", + "ComputerName", + "InstanceId", + "InstanceStatus", + "IpAddress", + "ManagedStatus", + "PlatformName", + "PlatformType", + "PlatformVersion", + "ResourceType", + "OrganizationalUnitId", + "OrganizationalUnitPath", + "Region", + "AccountId", + } +} + +type NodeFilterOperatorType string + +// Enum values for NodeFilterOperatorType +const ( + NodeFilterOperatorTypeEqual NodeFilterOperatorType = "Equal" + NodeFilterOperatorTypeNotEqual NodeFilterOperatorType = "NotEqual" + NodeFilterOperatorTypeBeginWith NodeFilterOperatorType = "BeginWith" +) + +// Values returns all known values for NodeFilterOperatorType. 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 (NodeFilterOperatorType) Values() []NodeFilterOperatorType { + return []NodeFilterOperatorType{ + "Equal", + "NotEqual", + "BeginWith", + } +} + +type NodeTypeName string + +// Enum values for NodeTypeName +const ( + NodeTypeNameInstance NodeTypeName = "Instance" +) + +// Values returns all known values for NodeTypeName. 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 (NodeTypeName) Values() []NodeTypeName { + return []NodeTypeName{ + "Instance", + } +} + type NotificationEvent string // Enum values for NotificationEvent diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go index 77c2c194..7087b2a8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go @@ -838,7 +838,7 @@ func (e *InvalidActivation) ErrorCode() string { } func (e *InvalidActivation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The activation ID isn't valid. Verify the you entered the correct ActivationId +// The activation ID isn't valid. Verify that you entered the correct ActivationId // or ActivationCode and try again. type InvalidActivationId struct { Message *string @@ -865,9 +865,8 @@ func (e *InvalidActivationId) ErrorCode() string { } func (e *InvalidActivationId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified aggregator isn't valid for inventory groups. Verify that the -// aggregator uses a valid inventory type such as AWS:Application or -// AWS:InstanceInformation . +// The specified aggregator isn't valid for the group type. Verify that the +// aggregator you provided is supported. type InvalidAggregatorException struct { Message *string @@ -1297,7 +1296,7 @@ func (e *InvalidDocumentVersion) ErrorCode() string { } func (e *InvalidDocumentVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The filter name isn't valid. Verify the you entered the correct name and try +// The filter name isn't valid. Verify that you entered the correct name and try // again. type InvalidFilter struct { Message *string @@ -3640,6 +3639,33 @@ func (e *UnsupportedOperatingSystem) ErrorCode() string { } func (e *UnsupportedOperatingSystem) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This operation is not supported for the current account. You must first enable +// the Systems Manager integrated experience in your account. +type UnsupportedOperationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedOperationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedOperationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedOperationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedOperationException" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The parameter type isn't supported. type UnsupportedParameterType struct { Message *string @@ -3692,3 +3718,32 @@ func (e *UnsupportedPlatformType) ErrorCode() string { return *e.ErrorCodeOverride } func (e *UnsupportedPlatformType) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request isn't valid. Verify that you entered valid contents for the command +// and try again. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + ReasonCode *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ValidationException" + } + return *e.ErrorCodeOverride +} +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go index bec5f3e1..1c948f63 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go @@ -803,6 +803,37 @@ type AutomationExecutionFilter struct { noSmithyDocumentSerde } +// Information about the optional inputs that can be specified for an automation +// execution preview. +type AutomationExecutionInputs struct { + + // Information about parameters that can be specified for the preview operation. + Parameters map[string][]string + + // Information about the Amazon Web Services Regions and Amazon Web Services + // accounts targeted by the Automation execution preview operation. + TargetLocations []TargetLocation + + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported. + TargetLocationsURL *string + + // A key-value mapping of document parameters to target resources. Both Targets + // and TargetMaps can't be specified together. + TargetMaps []map[string][]string + + // The name of the parameter used as the target resource for the rate-controlled + // execution. Required if you specify targets. + TargetParameterName *string + + // Information about the resources that would be included in the actual runbook + // execution, if it were to be run. Both Targets and TargetMaps can't be specified + // together. + Targets []Target + + noSmithyDocumentSerde +} + // Details about a specific Automation execution. type AutomationExecutionMetadata struct { @@ -915,6 +946,41 @@ type AutomationExecutionMetadata struct { noSmithyDocumentSerde } +// Information about the results of the execution preview. +type AutomationExecutionPreview struct { + + // Information about the Amazon Web Services Regions targeted by the execution + // preview. + Regions []string + + // Information about the type of impact a runbook step would have on a resource. + // + // - Mutating : The runbook step would make changes to the targets through + // actions that create, modify, or delete resources. + // + // - Non_Mutating : The runbook step would retrieve data about resources but not + // make changes to them. This category generally includes Describe* , List* , + // Get* , and similar read-only API actions. + // + // - Undetermined : An undetermined step invokes executions performed by another + // orchestration service like Lambda, Step Functions, or Amazon Web Services + // Systems Manager Run Command. An undetermined step might also call a third-party + // API. Systems Manager Automation doesn't know the outcome of the orchestration + // processes or third-party API executions, so the results of the steps are + // undetermined. + StepPreviews map[string]int32 + + // Information that provides a preview of what the impact of running the specified + // Automation runbook would be. + TargetPreviews []TargetPreview + + // Information about the Amazon Web Services accounts that were included in the + // execution preview. + TotalAccounts int32 + + noSmithyDocumentSerde +} + // Defines the basic information about a patch baseline override. type BaselineOverride struct { @@ -2230,6 +2296,44 @@ type EffectivePatch struct { noSmithyDocumentSerde } +// Information about the inputs for an execution preview. +// +// The following types satisfy this interface: +// +// ExecutionInputsMemberAutomation +type ExecutionInputs interface { + isExecutionInputs() +} + +// Information about the optional inputs that can be specified for an automation +// execution preview. +type ExecutionInputsMemberAutomation struct { + Value AutomationExecutionInputs + + noSmithyDocumentSerde +} + +func (*ExecutionInputsMemberAutomation) isExecutionInputs() {} + +// Information about the changes that would be made if an execution were run. +// +// The following types satisfy this interface: +// +// ExecutionPreviewMemberAutomation +type ExecutionPreview interface { + isExecutionPreview() +} + +// Information about the changes that would be made if an Automation workflow were +// run. +type ExecutionPreviewMemberAutomation struct { + Value AutomationExecutionPreview + + noSmithyDocumentSerde +} + +func (*ExecutionPreviewMemberAutomation) isExecutionPreview() {} + // Describes a failed association. type FailedCreateAssociation struct { @@ -2383,6 +2487,43 @@ type InstanceAssociationStatusInfo struct { noSmithyDocumentSerde } +// Details about a specific managed node. +type InstanceInfo struct { + + // The type of agent installed on the node. + AgentType *string + + // The version number of the agent installed on the node. + AgentVersion *string + + // The fully qualified host name of the managed node. + ComputerName *string + + // The current status of the managed node. + InstanceStatus *string + + // The IP address of the managed node. + IpAddress *string + + // Indicates whether the node is managed by Systems Manager. + ManagedStatus ManagedStatus + + // The name of the operating system platform running on your managed node. + PlatformName *string + + // The operating system platform type of the managed node. + PlatformType PlatformType + + // The version of the OS platform running on your managed node. + PlatformVersion *string + + // The type of instance, either an EC2 instance or another supported machine type + // in a hybrid fleet. + ResourceType ResourceType + + noSmithyDocumentSerde +} + // Describes a filter for a specific list of managed nodes. type InstanceInformation struct { @@ -2794,7 +2935,8 @@ type InstanceProperty struct { // The name of the operating system platform running on your managed node. PlatformName *string - // The operating system platform type of the managed node. For example, Windows. + // The operating system platform type of the managed node. For example, Windows + // Server or Amazon Linux 2. PlatformType PlatformType // The version of the OS platform running on your managed node. @@ -3673,6 +3815,111 @@ type MetadataValue struct { noSmithyDocumentSerde } +// Details about an individual managed node. +type Node struct { + + // The UTC timestamp for when the managed node data was last captured. + CaptureTime *time.Time + + // The ID of the managed node. + Id *string + + // Information about the type of node. + NodeType NodeType + + // Information about the ownership of the managed node. + Owner *NodeOwnerInfo + + // The Amazon Web Services Region that a managed node was created in or assigned + // to. + Region *string + + noSmithyDocumentSerde +} + +// One or more aggregators for viewing counts of nodes using different dimensions. +type NodeAggregator struct { + + // The aggregator type for limiting a node summary. Currently, only Count is + // supported. + // + // This member is required. + AggregatorType NodeAggregatorType + + // The name of a node attribute on which to limit the count of nodes. + // + // This member is required. + AttributeName NodeAttributeName + + // The data type name to use for viewing counts of nodes. Currently, only Instance + // is supported. + // + // This member is required. + TypeName NodeTypeName + + // Information about aggregators used to refine a node summary. + Aggregators []NodeAggregator + + noSmithyDocumentSerde +} + +// The filters for the operation. +type NodeFilter struct { + + // The name of the filter. + // + // This member is required. + Key NodeFilterKey + + // A filter value supported by the specified key. For example, for the key + // PlatformType , supported values include Linux and Windows . + // + // This member is required. + Values []string + + // The type of filter operator. + Type NodeFilterOperatorType + + noSmithyDocumentSerde +} + +// Information about ownership of a managed node. +type NodeOwnerInfo struct { + + // The ID of the Amazon Web Services account that owns the managed node. + AccountId *string + + // The ID of the organization unit (OU) that the account is part of. + OrganizationalUnitId *string + + // The path for the organizational unit (OU) that owns the managed node. The path + // for the OU is built using the IDs of the organization, root, and all OUs in the + // path down to and including the OU. For example: + // + // o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-ghi0-awsccccc/ou-jkl0-awsddddd/ + OrganizationalUnitPath *string + + noSmithyDocumentSerde +} + +// Information about a managed node's type. +// +// The following types satisfy this interface: +// +// NodeTypeMemberInstance +type NodeType interface { + isNodeType() +} + +// Information about a specific managed node. +type NodeTypeMemberInstance struct { + Value InstanceInfo + + noSmithyDocumentSerde +} + +func (*NodeTypeMemberInstance) isNodeType() {} + // A summary of resources that aren't compliant. The summary is organized // according to resource type. type NonCompliantSummary struct { @@ -4345,7 +4592,7 @@ type ParameterInlinePolicy struct { // user to update the parameter and the date and time the parameter was last used. type ParameterMetadata struct { - // The (ARN) of the last user to update the parameter. + // The Amazon Resource Name (ARN) of the parameter. ARN *string // A parameter name can include only the following letters and symbols. @@ -5699,4 +5946,30 @@ type TargetLocation struct { noSmithyDocumentSerde } +// Information about the resources that would be included in the actual runbook +// execution, if it were to be run. +type TargetPreview struct { + + // The number of resources of a certain type included in an execution preview. + Count int32 + + // A type of resource that was included in the execution preview. + TargetType *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isExecutionInputs() {} +func (*UnknownUnionMember) isExecutionPreview() {} +func (*UnknownUnionMember) isNodeType() {} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go index 9b6e1ff3..cf0d3128 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/validators.go @@ -1210,6 +1210,26 @@ func (m *validateOpGetDocument) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpGetExecutionPreview struct { +} + +func (*validateOpGetExecutionPreview) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetExecutionPreview) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetExecutionPreviewInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetExecutionPreviewInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetInventory struct { } @@ -1730,6 +1750,46 @@ func (m *validateOpListInventoryEntries) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpListNodes struct { +} + +func (*validateOpListNodes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListNodes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListNodesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListNodesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListNodesSummary struct { +} + +func (*validateOpListNodesSummary) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListNodesSummary) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListNodesSummaryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListNodesSummaryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListOpsItemEvents struct { } @@ -2150,6 +2210,26 @@ func (m *validateOpStartChangeRequestExecution) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpStartExecutionPreview struct { +} + +func (*validateOpStartExecutionPreview) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartExecutionPreview) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartExecutionPreviewInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartExecutionPreviewInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartSession struct { } @@ -2750,6 +2830,10 @@ func addOpGetDocumentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDocument{}, middleware.After) } +func addOpGetExecutionPreviewValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetExecutionPreview{}, middleware.After) +} + func addOpGetInventoryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetInventory{}, middleware.After) } @@ -2854,6 +2938,14 @@ func addOpListInventoryEntriesValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpListInventoryEntries{}, middleware.After) } +func addOpListNodesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListNodes{}, middleware.After) +} + +func addOpListNodesSummaryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListNodesSummary{}, middleware.After) +} + func addOpListOpsItemEventsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListOpsItemEvents{}, middleware.After) } @@ -2938,6 +3030,10 @@ func addOpStartChangeRequestExecutionValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpStartChangeRequestExecution{}, middleware.After) } +func addOpStartExecutionPreviewValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartExecutionPreview{}, middleware.After) +} + func addOpStartSessionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartSession{}, middleware.After) } @@ -3225,6 +3321,23 @@ func validateAutomationExecutionFilterList(v []types.AutomationExecutionFilter) } } +func validateAutomationExecutionInputs(v *types.AutomationExecutionInputs) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AutomationExecutionInputs"} + if v.TargetLocations != nil { + if err := validateTargetLocations(v.TargetLocations); err != nil { + invalidParams.AddNested("TargetLocations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateBaselineOverride(v *types.BaselineOverride) error { if v == nil { return nil @@ -3461,6 +3574,25 @@ func validateDocumentReviews(v *types.DocumentReviews) error { } } +func validateExecutionInputs(v types.ExecutionInputs) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExecutionInputs"} + switch uv := v.(type) { + case *types.ExecutionInputsMemberAutomation: + if err := validateAutomationExecutionInputs(&uv.Value); err != nil { + invalidParams.AddNested("[Automation]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInstanceInformationFilter(v *types.InstanceInformationFilter) error { if v == nil { return nil @@ -3808,6 +3940,84 @@ func validateLoggingInfo(v *types.LoggingInfo) error { } } +func validateNodeAggregator(v *types.NodeAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeAggregator"} + if len(v.AggregatorType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AggregatorType")) + } + if len(v.TypeName) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TypeName")) + } + if len(v.AttributeName) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AttributeName")) + } + if v.Aggregators != nil { + if err := validateNodeAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeAggregatorList(v []types.NodeAggregator) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeAggregatorList"} + for i := range v { + if err := validateNodeAggregator(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeFilter(v *types.NodeFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeFilterList(v []types.NodeFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeFilterList"} + for i := range v { + if err := validateNodeFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpsAggregator(v *types.OpsAggregator) error { if v == nil { return nil @@ -5728,6 +5938,21 @@ func validateOpGetDocumentInput(v *GetDocumentInput) error { } } +func validateOpGetExecutionPreviewInput(v *GetExecutionPreviewInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetExecutionPreviewInput"} + if v.ExecutionPreviewId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionPreviewId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetInventoryInput(v *GetInventoryInput) error { if v == nil { return nil @@ -6181,6 +6406,47 @@ func validateOpListInventoryEntriesInput(v *ListInventoryEntriesInput) error { } } +func validateOpListNodesInput(v *ListNodesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListNodesInput"} + if v.Filters != nil { + if err := validateNodeFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListNodesSummaryInput(v *ListNodesSummaryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListNodesSummaryInput"} + if v.Filters != nil { + if err := validateNodeFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if v.Aggregators == nil { + invalidParams.Add(smithy.NewErrParamRequired("Aggregators")) + } else if v.Aggregators != nil { + if err := validateNodeAggregatorList(v.Aggregators); err != nil { + invalidParams.AddNested("Aggregators", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListOpsItemEventsInput(v *ListOpsItemEventsInput) error { if v == nil { return nil @@ -6612,6 +6878,26 @@ func validateOpStartChangeRequestExecutionInput(v *StartChangeRequestExecutionIn } } +func validateOpStartExecutionPreviewInput(v *StartExecutionPreviewInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartExecutionPreviewInput"} + if v.DocumentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DocumentName")) + } + if v.ExecutionInputs != nil { + if err := validateExecutionInputs(v.ExecutionInputs); err != nil { + invalidParams.AddNested("ExecutionInputs", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartSessionInput(v *StartSessionInput) error { if v == nil { return nil diff --git a/vendor/modules.txt b/vendor/modules.txt index ab239cc4..effef939 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -78,7 +78,7 @@ github.com/aws/aws-sdk-go-v2/service/route53 github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints github.com/aws/aws-sdk-go-v2/service/route53/types -# github.com/aws/aws-sdk-go-v2/service/ssm v1.55.6 +# github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ssm github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints