From 21db1a2c403944cd167f11f1debcebf3edf6e65f Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 30 Nov 2023 19:05:25 +0000 Subject: [PATCH] Regenerated Clients --- .../9fb4675dc18e4db588f2337dcddb6ae1.json | 8 + .../cf3a8cfbda2447e48b7b8c5b8d8e9571.json | 8 + .../e62bda6243ac4626a1c82dad69717552.json | 8 + .../arczonalshift/api_op_CancelZonalShift.go | 34 +- .../api_op_CreatePracticeRunConfiguration.go | 208 ++ .../api_op_DeletePracticeRunConfiguration.go | 155 ++ .../api_op_GetManagedResource.go | 32 +- .../arczonalshift/api_op_ListAutoshifts.go | 237 ++ .../api_op_ListManagedResources.go | 11 +- .../arczonalshift/api_op_ListZonalShifts.go | 15 +- .../arczonalshift/api_op_StartZonalShift.go | 61 +- .../api_op_UpdatePracticeRunConfiguration.go | 188 ++ ...pi_op_UpdateZonalAutoshiftConfiguration.go | 159 ++ .../arczonalshift/api_op_UpdateZonalShift.go | 31 +- service/arczonalshift/deserializers.go | 2122 ++++++++++++++--- service/arczonalshift/doc.go | 46 +- service/arczonalshift/endpoints.go | 2 +- service/arczonalshift/generated.json | 5 + service/arczonalshift/serializers.go | 492 ++++ service/arczonalshift/types/enums.go | 110 +- service/arczonalshift/types/errors.go | 3 +- service/arczonalshift/types/types.go | 279 ++- service/arczonalshift/validators.go | 217 ++ service/glue/api_op_GetDataQualityResult.go | 8 + service/glue/deserializers.go | 453 +++- service/glue/types/types.go | 79 + .../sagemaker/api_op_CreateAppImageConfig.go | 5 + service/sagemaker/api_op_CreateSpace.go | 9 + .../api_op_DescribeAppImageConfig.go | 3 + service/sagemaker/api_op_DescribeSpace.go | 9 + .../sagemaker/api_op_UpdateAppImageConfig.go | 3 + service/sagemaker/api_op_UpdateSpace.go | 3 + service/sagemaker/deserializers.go | 1139 +++++++++ service/sagemaker/serializers.go | 467 ++++ service/sagemaker/types/enums.go | 26 + service/sagemaker/types/types.go | 326 +++ .../sagemaker/types/types_exported_test.go | 36 + service/sagemaker/validators.go | 301 +++ 38 files changed, 6792 insertions(+), 506 deletions(-) create mode 100644 .changelog/9fb4675dc18e4db588f2337dcddb6ae1.json create mode 100644 .changelog/cf3a8cfbda2447e48b7b8c5b8d8e9571.json create mode 100644 .changelog/e62bda6243ac4626a1c82dad69717552.json create mode 100644 service/arczonalshift/api_op_CreatePracticeRunConfiguration.go create mode 100644 service/arczonalshift/api_op_DeletePracticeRunConfiguration.go create mode 100644 service/arczonalshift/api_op_ListAutoshifts.go create mode 100644 service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go create mode 100644 service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go diff --git a/.changelog/9fb4675dc18e4db588f2337dcddb6ae1.json b/.changelog/9fb4675dc18e4db588f2337dcddb6ae1.json new file mode 100644 index 00000000000..01b1cba44a2 --- /dev/null +++ b/.changelog/9fb4675dc18e4db588f2337dcddb6ae1.json @@ -0,0 +1,8 @@ +{ + "id": "9fb4675d-c18e-4db5-88f2-337dcddb6ae1", + "type": "feature", + "description": "Adds observation and analyzer support to the GetDataQualityResult and BatchGetDataQualityResult APIs.", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/.changelog/cf3a8cfbda2447e48b7b8c5b8d8e9571.json b/.changelog/cf3a8cfbda2447e48b7b8c5b8d8e9571.json new file mode 100644 index 00000000000..3c19e57df38 --- /dev/null +++ b/.changelog/cf3a8cfbda2447e48b7b8c5b8d8e9571.json @@ -0,0 +1,8 @@ +{ + "id": "cf3a8cfb-da24-47e4-8b7b-8c5b8d8e9571", + "type": "feature", + "description": "This release adds support for 1/ Code Editor, based on Code-OSS, Visual Studio Code Open Source, a new fully managed IDE option in SageMaker Studio 2/ JupyterLab, a new fully managed JupyterLab IDE experience in SageMaker Studio", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/e62bda6243ac4626a1c82dad69717552.json b/.changelog/e62bda6243ac4626a1c82dad69717552.json new file mode 100644 index 00000000000..2328bb0c78f --- /dev/null +++ b/.changelog/e62bda6243ac4626a1c82dad69717552.json @@ -0,0 +1,8 @@ +{ + "id": "e62bda62-43ac-4626-a1c8-2dad69717552", + "type": "feature", + "description": "This release adds a new capability, zonal autoshift. You can configure zonal autoshift so that AWS shifts traffic for a resource away from an Availability Zone, on your behalf, when AWS determines that there is an issue that could potentially affect customers in the Availability Zone.", + "modules": [ + "service/arczonalshift" + ] +} \ No newline at end of file diff --git a/service/arczonalshift/api_op_CancelZonalShift.go b/service/arczonalshift/api_op_CancelZonalShift.go index 5e0b5fbb974..8f17e310084 100644 --- a/service/arczonalshift/api_op_CancelZonalShift.go +++ b/service/arczonalshift/api_op_CancelZonalShift.go @@ -13,8 +13,11 @@ import ( "time" ) -// Cancel a zonal shift in Amazon Route 53 Application Recovery Controller that -// you've started for a resource in your AWS account in an AWS Region. +// Cancel a zonal shift in Amazon Route 53 Application Recovery Controller. To +// cancel the zonal shift, specify the zonal shift ID. A zonal shift can be one +// that you've started for a resource in your Amazon Web Services account in an +// Amazon Web Services Region, or it can be a zonal shift started by a practice run +// with zonal autoshift. func (c *Client) CancelZonalShift(ctx context.Context, params *CancelZonalShiftInput, optFns ...func(*Options)) (*CancelZonalShiftOutput, error) { if params == nil { params = &CancelZonalShiftInput{} @@ -44,7 +47,8 @@ type CancelZonalShiftOutput struct { // The Availability Zone that traffic is moved away from for a resource when you // start a zonal shift. Until the zonal shift expires or you cancel it, traffic for - // the resource is instead moved to other Availability Zones in the AWS Region. + // the resource is instead moved to other Availability Zones in the Amazon Web + // Services Region. // // This member is required. AwayFrom *string @@ -56,35 +60,35 @@ type CancelZonalShiftOutput struct { // This member is required. Comment *string - // The expiry time (expiration time) for the zonal shift. A zonal shift is - // temporary and must be set to expire when you start the zonal shift. You can - // initially set a zonal shift to expire in a maximum of three days (72 hours). + // The expiry time (expiration time) for a customer-started zonal shift. A zonal + // shift is temporary and must be set to expire when you start the zonal shift. You + // can initially set a zonal shift to expire in a maximum of three days (72 hours). // However, you can update a zonal shift to set a new expiration at any time. When // you start a zonal shift, you specify how long you want it to be active, which // Route 53 ARC converts to an expiry time (expiration time). You can cancel a - // zonal shift, for example, if you're ready to restore traffic to the Availability - // Zone. Or you can update the zonal shift to specify another length of time to - // expire in. + // zonal shift when you're ready to restore traffic to the Availability Zone, or + // just wait for it to expire. Or you can update the zonal shift to specify another + // length of time to expire in. // // This member is required. ExpiryTime *time.Time - // The identifier for the resource to include in a zonal shift. The identifier is - // the Amazon Resource Name (ARN) for the resource. At this time, you can only - // start a zonal shift for Network Load Balancers and Application Load Balancers - // with cross-zone load balancing turned off. + // The identifier for the resource to shift away traffic for. The identifier is + // the Amazon Resource Name (ARN) for the resource. At this time, supported + // resources are Network Load Balancers and Application Load Balancers with + // cross-zone load balancing turned off. // // This member is required. ResourceIdentifier *string - // The time (UTC) when the zonal shift is started. + // The time (UTC) when the zonal shift starts. // // This member is required. StartTime *time.Time // A status for a zonal shift. The Status for a zonal shift can have one of the // following values: - // - ACTIVE: The zonal shift is started and active. + // - ACTIVE: The zonal shift has been started and active. // - EXPIRED: The zonal shift has expired (the expiry time was exceeded). // - CANCELED: The zonal shift was canceled. // diff --git a/service/arczonalshift/api_op_CreatePracticeRunConfiguration.go b/service/arczonalshift/api_op_CreatePracticeRunConfiguration.go new file mode 100644 index 00000000000..c32e9058ac8 --- /dev/null +++ b/service/arczonalshift/api_op_CreatePracticeRunConfiguration.go @@ -0,0 +1,208 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package arczonalshift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/arczonalshift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// A practice run configuration for zonal autoshift is required when you enable +// zonal autoshift. A practice run configuration includes specifications for +// blocked dates and blocked time windows, and for Amazon CloudWatch alarms that +// you create to use with practice runs. The alarms that you specify are an outcome +// alarm, to monitor application health during practice runs and, optionally, a +// blocking alarm, to block practice runs from starting. For more information, see +// Considerations when you configure zonal autoshift (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.considerations.html) +// in the Amazon Route 53 Application Recovery Controller Developer Guide. +func (c *Client) CreatePracticeRunConfiguration(ctx context.Context, params *CreatePracticeRunConfigurationInput, optFns ...func(*Options)) (*CreatePracticeRunConfigurationOutput, error) { + if params == nil { + params = &CreatePracticeRunConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePracticeRunConfiguration", params, optFns, c.addOperationCreatePracticeRunConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePracticeRunConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreatePracticeRunConfigurationInput struct { + + // The outcome alarm for practice runs is a required Amazon CloudWatch alarm that + // you specify that ends a practice run when the alarm is in an ALARM state. + // Configure the alarm to monitor the health of your application when traffic is + // shifted away from an Availability Zone during each weekly practice run. You + // should configure the alarm to go into an ALARM state if your application is + // impacted by the zonal shift, and you want to stop the zonal shift, to let + // traffic for the resource return to the Availability Zone. + // + // This member is required. + OutcomeAlarms []types.ControlCondition + + // The identifier of the resource to shift away traffic for when a practice run + // starts a zonal shift. The identifier is the Amazon Resource Name (ARN) for the + // resource. At this time, supported resources are Network Load Balancers and + // Application Load Balancers with cross-zone load balancing turned off. + // + // This member is required. + ResourceIdentifier *string + + // Optionally, you can block Route 53 ARC from starting practice runs for a + // resource on specific calendar dates. The format for blocked dates is: + // YYYY-MM-DD. Keep in mind, when you specify dates, that dates and times for + // practice runs are in UTC. Separate multiple blocked dates with spaces. For + // example, if you have an application update scheduled to launch on May 1, 2024, + // and you don't want practice runs to shift traffic away at that time, you could + // set a blocked date for 2024-05-01 . + BlockedDates []string + + // Optionally, you can block Route 53 ARC from starting practice runs for specific + // windows of days and times. The format for blocked windows is: + // DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times + // for practice runs are in UTC. Also, be aware of potential time adjustments that + // might be required for daylight saving time differences. Separate multiple + // blocked windows with spaces. For example, say you run business report summaries + // three days a week. For this scenario, you might set the following recurring days + // and times as blocked windows, for example: MON-20:30-21:30 WED-20:30-21:30 + // FRI-20:30-21:30 . + BlockedWindows []string + + // An Amazon CloudWatch alarm that you can specify for zonal autoshift practice + // runs. This alarm blocks Route 53 ARC from starting practice run zonal shifts, + // and ends a practice run that's in progress, when the alarm is in an ALARM state. + BlockingAlarms []types.ControlCondition + + noSmithyDocumentSerde +} + +type CreatePracticeRunConfigurationOutput struct { + + // The Amazon Resource Name (ARN) of the resource that you configured the practice + // run for. + // + // This member is required. + Arn *string + + // The name of the resource that you configured the practice run for. + // + // This member is required. + Name *string + + // A practice run configuration for a resource. Configurations include the outcome + // alarm that you specify for practice runs, and, optionally, a blocking alarm and + // blocking dates and windows. + // + // This member is required. + PracticeRunConfiguration *types.PracticeRunConfiguration + + // The status for zonal autoshift for a resource. When you specify the autoshift + // status as ENABLED , Amazon Web Services shifts traffic away from shifts away + // application resource traffic from an Availability Zone, on your behalf, when + // Amazon Web Services determines that there's an issue in the Availability Zone + // that could potentially affect customers. When you enable zonal autoshift, you + // must also configure practice runs for the resource. + // + // This member is required. + ZonalAutoshiftStatus types.ZonalAutoshiftStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePracticeRunConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreatePracticeRunConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreatePracticeRunConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePracticeRunConfiguration"); 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 = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCreatePracticeRunConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePracticeRunConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreatePracticeRunConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreatePracticeRunConfiguration", + } +} diff --git a/service/arczonalshift/api_op_DeletePracticeRunConfiguration.go b/service/arczonalshift/api_op_DeletePracticeRunConfiguration.go new file mode 100644 index 00000000000..dc6e891f549 --- /dev/null +++ b/service/arczonalshift/api_op_DeletePracticeRunConfiguration.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package arczonalshift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/arczonalshift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the practice run configuration for a resource. Before you can delete a +// practice run configuration for a resource., you must disable zonal autoshift for +// the resource. Practice runs must be configured for zonal autoshift to be +// enabled. +func (c *Client) DeletePracticeRunConfiguration(ctx context.Context, params *DeletePracticeRunConfigurationInput, optFns ...func(*Options)) (*DeletePracticeRunConfigurationOutput, error) { + if params == nil { + params = &DeletePracticeRunConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePracticeRunConfiguration", params, optFns, c.addOperationDeletePracticeRunConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePracticeRunConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeletePracticeRunConfigurationInput struct { + + // The identifier for the resource that you want to delete the practice run + // configuration for. The identifier is the Amazon Resource Name (ARN) for the + // resource. + // + // This member is required. + ResourceIdentifier *string + + noSmithyDocumentSerde +} + +type DeletePracticeRunConfigurationOutput struct { + + // The Amazon Resource Name (ARN) of the resource that you deleted the practice + // run for. + // + // This member is required. + Arn *string + + // The name of the resource that you deleted the practice run for. + // + // This member is required. + Name *string + + // The status of zonal autoshift for the resource. + // + // This member is required. + ZonalAutoshiftStatus types.ZonalAutoshiftStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePracticeRunConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePracticeRunConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePracticeRunConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePracticeRunConfiguration"); 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 = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeletePracticeRunConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePracticeRunConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeletePracticeRunConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeletePracticeRunConfiguration", + } +} diff --git a/service/arczonalshift/api_op_GetManagedResource.go b/service/arczonalshift/api_op_GetManagedResource.go index dd772ba2c40..ab14aaf587f 100644 --- a/service/arczonalshift/api_op_GetManagedResource.go +++ b/service/arczonalshift/api_op_GetManagedResource.go @@ -13,10 +13,12 @@ import ( ) // Get information about a resource that's been registered for zonal shifts with -// Amazon Route 53 Application Recovery Controller in this AWS Region. Resources -// that are registered for zonal shifts are managed resources in Route 53 ARC. At -// this time, you can only start a zonal shift for Network Load Balancers and -// Application Load Balancers with cross-zone load balancing turned off. +// Amazon Route 53 Application Recovery Controller in this Amazon Web Services +// Region. Resources that are registered for zonal shifts are managed resources in +// Route 53 ARC. You can start zonal shifts and configure zonal autoshift for +// managed resources. At this time, you can only start a zonal shift or configure +// zonal autoshift for Network Load Balancers and Application Load Balancers with +// cross-zone load balancing turned off. func (c *Client) GetManagedResource(ctx context.Context, params *GetManagedResourceInput, optFns ...func(*Options)) (*GetManagedResourceOutput, error) { if params == nil { params = &GetManagedResourceInput{} @@ -34,10 +36,10 @@ func (c *Client) GetManagedResource(ctx context.Context, params *GetManagedResou type GetManagedResourceInput struct { - // The identifier for the resource to include in a zonal shift. The identifier is - // the Amazon Resource Name (ARN) for the resource. At this time, you can only - // start a zonal shift for Network Load Balancers and Application Load Balancers - // with cross-zone load balancing turned off. + // The identifier for the resource to shift away traffic for. The identifier is + // the Amazon Resource Name (ARN) for the resource. At this time, supported + // resources are Network Load Balancers and Application Load Balancers with + // cross-zone load balancing turned off. // // This member is required. ResourceIdentifier *string @@ -62,9 +64,23 @@ type GetManagedResourceOutput struct { // The Amazon Resource Name (ARN) for the resource. Arn *string + // An array of the autoshifts that are active for the resource. + Autoshifts []types.AutoshiftInResource + // The name of the resource. Name *string + // The practice run configuration for zonal autoshift that's associated with the + // resource. + PracticeRunConfiguration *types.PracticeRunConfiguration + + // The status for zonal autoshift for a resource. When the autoshift status is + // ENABLED , Amazon Web Services shifts traffic for a resource away from an + // Availability Zone, on your behalf, when Amazon Web Services determines that + // there's an issue in the Availability Zone that could potentially affect + // customers. + ZonalAutoshiftStatus types.ZonalAutoshiftStatus + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/arczonalshift/api_op_ListAutoshifts.go b/service/arczonalshift/api_op_ListAutoshifts.go new file mode 100644 index 00000000000..64920e3cf7c --- /dev/null +++ b/service/arczonalshift/api_op_ListAutoshifts.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package arczonalshift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/arczonalshift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the active autoshifts for a specified resource. +func (c *Client) ListAutoshifts(ctx context.Context, params *ListAutoshiftsInput, optFns ...func(*Options)) (*ListAutoshiftsOutput, error) { + if params == nil { + params = &ListAutoshiftsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAutoshifts", params, optFns, c.addOperationListAutoshiftsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAutoshiftsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAutoshiftsInput struct { + + // The number of objects that you want to return with this call. + MaxResults *int32 + + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. + NextToken *string + + // The status of the autoshift. + Status types.AutoshiftExecutionStatus + + noSmithyDocumentSerde +} + +type ListAutoshiftsOutput struct { + + // The items in the response list. + Items []types.AutoshiftSummary + + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAutoshiftsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAutoshifts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAutoshifts{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAutoshifts"); 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 = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAutoshifts(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListAutoshiftsAPIClient is a client that implements the ListAutoshifts +// operation. +type ListAutoshiftsAPIClient interface { + ListAutoshifts(context.Context, *ListAutoshiftsInput, ...func(*Options)) (*ListAutoshiftsOutput, error) +} + +var _ ListAutoshiftsAPIClient = (*Client)(nil) + +// ListAutoshiftsPaginatorOptions is the paginator options for ListAutoshifts +type ListAutoshiftsPaginatorOptions struct { + // The number of objects that you want to return with this call. + 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 +} + +// ListAutoshiftsPaginator is a paginator for ListAutoshifts +type ListAutoshiftsPaginator struct { + options ListAutoshiftsPaginatorOptions + client ListAutoshiftsAPIClient + params *ListAutoshiftsInput + nextToken *string + firstPage bool +} + +// NewListAutoshiftsPaginator returns a new ListAutoshiftsPaginator +func NewListAutoshiftsPaginator(client ListAutoshiftsAPIClient, params *ListAutoshiftsInput, optFns ...func(*ListAutoshiftsPaginatorOptions)) *ListAutoshiftsPaginator { + if params == nil { + params = &ListAutoshiftsInput{} + } + + options := ListAutoshiftsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAutoshiftsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAutoshiftsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAutoshifts page. +func (p *ListAutoshiftsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAutoshiftsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAutoshifts(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAutoshifts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAutoshifts", + } +} diff --git a/service/arczonalshift/api_op_ListManagedResources.go b/service/arczonalshift/api_op_ListManagedResources.go index a1527206b57..8978771c6e8 100644 --- a/service/arczonalshift/api_op_ListManagedResources.go +++ b/service/arczonalshift/api_op_ListManagedResources.go @@ -12,11 +12,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all the resources in your AWS account in this AWS Region that are managed -// for zonal shifts in Amazon Route 53 Application Recovery Controller, and -// information about them. The information includes their Amazon Resource Names -// (ARNs), the Availability Zones the resources are deployed in, and the resource -// name. +// Lists all the resources in your Amazon Web Services account in this Amazon Web +// Services Region that are managed for zonal shifts in Amazon Route 53 Application +// Recovery Controller, and information about them. The information includes the +// zonal autoshift status for the resource, as well as the Amazon Resource Name +// (ARN), the Availability Zones that each resource is deployed in, and the +// resource name. func (c *Client) ListManagedResources(ctx context.Context, params *ListManagedResourcesInput, optFns ...func(*Options)) (*ListManagedResourcesOutput, error) { if params == nil { params = &ListManagedResourcesInput{} diff --git a/service/arczonalshift/api_op_ListZonalShifts.go b/service/arczonalshift/api_op_ListZonalShifts.go index befd4ed35df..34c830009eb 100644 --- a/service/arczonalshift/api_op_ListZonalShifts.go +++ b/service/arczonalshift/api_op_ListZonalShifts.go @@ -12,8 +12,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all the active zonal shifts in Amazon Route 53 Application Recovery -// Controller in your AWS account in this AWS Region. +// Lists all active and completed zonal shifts in Amazon Route 53 Application +// Recovery Controller in your Amazon Web Services account in this Amazon Web +// Services Region. ListZonalShifts returns customer-started zonal shifts, as well +// as practice run zonal shifts that Route 53 ARC started on your behalf for zonal +// autoshift. The ListZonalShifts operation does not list autoshifts. For more +// information about listing autoshifts, see ">ListAutoshifts (https://docs.aws.amazon.com/arc-zonal-shift/latest/api/API_ListAutoshifts.html) +// . func (c *Client) ListZonalShifts(ctx context.Context, params *ListZonalShiftsInput, optFns ...func(*Options)) (*ListZonalShiftsOutput, error) { if params == nil { params = &ListZonalShiftsInput{} @@ -40,9 +45,13 @@ type ListZonalShiftsInput struct { // previous call's NextToken response to request the next page of results. NextToken *string + // The identifier for the resource that you want to list zonal shifts for. The + // identifier is the Amazon Resource Name (ARN) for the resource. + ResourceIdentifier *string + // A status for a zonal shift. The Status for a zonal shift can have one of the // following values: - // - ACTIVE: The zonal shift is started and active. + // - ACTIVE: The zonal shift has been started and active. // - EXPIRED: The zonal shift has expired (the expiry time was exceeded). // - CANCELED: The zonal shift was canceled. Status types.ZonalShiftStatus diff --git a/service/arczonalshift/api_op_StartZonalShift.go b/service/arczonalshift/api_op_StartZonalShift.go index c081e7ef98e..b75a6d439d8 100644 --- a/service/arczonalshift/api_op_StartZonalShift.go +++ b/service/arczonalshift/api_op_StartZonalShift.go @@ -14,17 +14,18 @@ import ( ) // You start a zonal shift to temporarily move load balancer traffic away from an -// Availability Zone in a AWS Region, to help your application recover immediately, -// for example, from a developer's bad code deployment or from an AWS -// infrastructure failure in a single Availability Zone. You can start a zonal -// shift in Route 53 ARC only for managed resources in your account in an AWS -// Region. Resources are automatically registered with Route 53 ARC by AWS -// services. At this time, you can only start a zonal shift for Network Load -// Balancers and Application Load Balancers with cross-zone load balancing turned -// off. When you start a zonal shift, traffic for the resource is no longer routed -// to the Availability Zone. The zonal shift is created immediately in Route 53 -// ARC. However, it can take a short time, typically up to a few minutes, for -// existing, in-progress connections in the Availability Zone to complete. For more +// Availability Zone in an Amazon Web Services Region, to help your application +// recover immediately, for example, from a developer's bad code deployment or from +// an Amazon Web Services infrastructure failure in a single Availability Zone. You +// can start a zonal shift in Route 53 ARC only for managed resources in your +// Amazon Web Services account in an Amazon Web Services Region. Resources are +// automatically registered with Route 53 ARC by Amazon Web Services services. At +// this time, you can only start a zonal shift for Network Load Balancers and +// Application Load Balancers with cross-zone load balancing turned off. When you +// start a zonal shift, traffic for the resource is no longer routed to the +// Availability Zone. The zonal shift is created immediately in Route 53 ARC. +// However, it can take a short time, typically up to a few minutes, for existing, +// in-progress connections in the Availability Zone to complete. For more // information, see Zonal shift (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-shift.html) // in the Amazon Route 53 Application Recovery Controller Developer Guide. func (c *Client) StartZonalShift(ctx context.Context, params *StartZonalShiftInput, optFns ...func(*Options)) (*StartZonalShiftOutput, error) { @@ -46,7 +47,8 @@ type StartZonalShiftInput struct { // The Availability Zone that traffic is moved away from for a resource when you // start a zonal shift. Until the zonal shift expires or you cancel it, traffic for - // the resource is instead moved to other Availability Zones in the AWS Region. + // the resource is instead moved to other Availability Zones in the Amazon Web + // Services Region. // // This member is required. AwayFrom *string @@ -74,10 +76,10 @@ type StartZonalShiftInput struct { // This member is required. ExpiresIn *string - // The identifier for the resource to include in a zonal shift. The identifier is - // the Amazon Resource Name (ARN) for the resource. At this time, you can only - // start a zonal shift for Network Load Balancers and Application Load Balancers - // with cross-zone load balancing turned off. + // The identifier for the resource to shift away traffic for. The identifier is + // the Amazon Resource Name (ARN) for the resource. At this time, supported + // resources are Network Load Balancers and Application Load Balancers with + // cross-zone load balancing turned off. // // This member is required. ResourceIdentifier *string @@ -89,7 +91,8 @@ type StartZonalShiftOutput struct { // The Availability Zone that traffic is moved away from for a resource when you // start a zonal shift. Until the zonal shift expires or you cancel it, traffic for - // the resource is instead moved to other Availability Zones in the AWS Region. + // the resource is instead moved to other Availability Zones in the Amazon Web + // Services Region. // // This member is required. AwayFrom *string @@ -101,35 +104,35 @@ type StartZonalShiftOutput struct { // This member is required. Comment *string - // The expiry time (expiration time) for the zonal shift. A zonal shift is - // temporary and must be set to expire when you start the zonal shift. You can - // initially set a zonal shift to expire in a maximum of three days (72 hours). + // The expiry time (expiration time) for a customer-started zonal shift. A zonal + // shift is temporary and must be set to expire when you start the zonal shift. You + // can initially set a zonal shift to expire in a maximum of three days (72 hours). // However, you can update a zonal shift to set a new expiration at any time. When // you start a zonal shift, you specify how long you want it to be active, which // Route 53 ARC converts to an expiry time (expiration time). You can cancel a - // zonal shift, for example, if you're ready to restore traffic to the Availability - // Zone. Or you can update the zonal shift to specify another length of time to - // expire in. + // zonal shift when you're ready to restore traffic to the Availability Zone, or + // just wait for it to expire. Or you can update the zonal shift to specify another + // length of time to expire in. // // This member is required. ExpiryTime *time.Time - // The identifier for the resource to include in a zonal shift. The identifier is - // the Amazon Resource Name (ARN) for the resource. At this time, you can only - // start a zonal shift for Network Load Balancers and Application Load Balancers - // with cross-zone load balancing turned off. + // The identifier for the resource to shift away traffic for. The identifier is + // the Amazon Resource Name (ARN) for the resource. At this time, supported + // resources are Network Load Balancers and Application Load Balancers with + // cross-zone load balancing turned off. // // This member is required. ResourceIdentifier *string - // The time (UTC) when the zonal shift is started. + // The time (UTC) when the zonal shift starts. // // This member is required. StartTime *time.Time // A status for a zonal shift. The Status for a zonal shift can have one of the // following values: - // - ACTIVE: The zonal shift is started and active. + // - ACTIVE: The zonal shift has been started and active. // - EXPIRED: The zonal shift has expired (the expiry time was exceeded). // - CANCELED: The zonal shift was canceled. // diff --git a/service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go b/service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go new file mode 100644 index 00000000000..35b01532605 --- /dev/null +++ b/service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go @@ -0,0 +1,188 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package arczonalshift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/arczonalshift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update a practice run configuration to change one or more of the following: +// add, change, or remove the blocking alarm; change the outcome alarm; or add, +// change, or remove blocking dates or time windows. +func (c *Client) UpdatePracticeRunConfiguration(ctx context.Context, params *UpdatePracticeRunConfigurationInput, optFns ...func(*Options)) (*UpdatePracticeRunConfigurationOutput, error) { + if params == nil { + params = &UpdatePracticeRunConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdatePracticeRunConfiguration", params, optFns, c.addOperationUpdatePracticeRunConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdatePracticeRunConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdatePracticeRunConfigurationInput struct { + + // The identifier for the resource that you want to update the practice run + // configuration for. The identifier is the Amazon Resource Name (ARN) for the + // resource. + // + // This member is required. + ResourceIdentifier *string + + // Add, change, or remove blocked dates for a practice run in zonal autoshift. + // Optionally, you can block practice runs for specific calendar dates. The format + // for blocked dates is: YYYY-MM-DD. Keep in mind, when you specify dates, that + // dates and times for practice runs are in UTC. Separate multiple blocked dates + // with spaces. For example, if you have an application update scheduled to launch + // on May 1, 2024, and you don't want practice runs to shift traffic away at that + // time, you could set a blocked date for 2024-05-01 . + BlockedDates []string + + // Add, change, or remove windows of days and times for when you can, optionally, + // block Route 53 ARC from starting a practice run for a resource. The format for + // blocked windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, + // that dates and times for practice runs are in UTC. Also, be aware of potential + // time adjustments that might be required for daylight saving time differences. + // Separate multiple blocked windows with spaces. For example, say you run business + // report summaries three days a week. For this scenario, you might set the + // following recurring days and times as blocked windows, for example: + // MON-20:30-21:30 WED-20:30-21:30 FRI-20:30-21:30 . + BlockedWindows []string + + // Add, change, or remove the Amazon CloudWatch alarm that you optionally specify + // as the blocking alarm for practice runs. + BlockingAlarms []types.ControlCondition + + // Specify a new the Amazon CloudWatch alarm as the outcome alarm for practice + // runs. + OutcomeAlarms []types.ControlCondition + + noSmithyDocumentSerde +} + +type UpdatePracticeRunConfigurationOutput struct { + + // The Amazon Resource Name (ARN) of the resource that you updated the practice + // run for. + // + // This member is required. + Arn *string + + // The name of the resource that you updated the practice run for. + // + // This member is required. + Name *string + + // The practice run configuration that was updated. + // + // This member is required. + PracticeRunConfiguration *types.PracticeRunConfiguration + + // The zonal autoshift status for the resource that you updated the practice run + // for. + // + // This member is required. + ZonalAutoshiftStatus types.ZonalAutoshiftStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdatePracticeRunConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePracticeRunConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePracticeRunConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdatePracticeRunConfiguration"); 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 = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdatePracticeRunConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePracticeRunConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdatePracticeRunConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdatePracticeRunConfiguration", + } +} diff --git a/service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go b/service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go new file mode 100644 index 00000000000..553e82bf8fc --- /dev/null +++ b/service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package arczonalshift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/arczonalshift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// You can update the zonal autoshift status for a resource, to enable or disable +// zonal autoshift. When zonal autoshift is ENABLED , Amazon Web Services shifts +// away resource traffic from an Availability Zone, on your behalf, when Amazon Web +// Services determines that there's an issue in the Availability Zone that could +// potentially affect customers. +func (c *Client) UpdateZonalAutoshiftConfiguration(ctx context.Context, params *UpdateZonalAutoshiftConfigurationInput, optFns ...func(*Options)) (*UpdateZonalAutoshiftConfigurationOutput, error) { + if params == nil { + params = &UpdateZonalAutoshiftConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateZonalAutoshiftConfiguration", params, optFns, c.addOperationUpdateZonalAutoshiftConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateZonalAutoshiftConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateZonalAutoshiftConfigurationInput struct { + + // The identifier for the resource that you want to update the zonal autoshift + // configuration for. The identifier is the Amazon Resource Name (ARN) for the + // resource. + // + // This member is required. + ResourceIdentifier *string + + // The zonal autoshift status for the resource that you want to update the zonal + // autoshift configuration for. + // + // This member is required. + ZonalAutoshiftStatus types.ZonalAutoshiftStatus + + noSmithyDocumentSerde +} + +type UpdateZonalAutoshiftConfigurationOutput struct { + + // The identifier for the resource that you updated the zonal autoshift + // configuration for. The identifier is the Amazon Resource Name (ARN) for the + // resource. + // + // This member is required. + ResourceIdentifier *string + + // The zonal autoshift status for the resource that you updated the zonal + // autoshift configuration for. + // + // This member is required. + ZonalAutoshiftStatus types.ZonalAutoshiftStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateZonalAutoshiftConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateZonalAutoshiftConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateZonalAutoshiftConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateZonalAutoshiftConfiguration"); 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 = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateZonalAutoshiftConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateZonalAutoshiftConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateZonalAutoshiftConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateZonalAutoshiftConfiguration", + } +} diff --git a/service/arczonalshift/api_op_UpdateZonalShift.go b/service/arczonalshift/api_op_UpdateZonalShift.go index cbdd8899b68..e56930ea440 100644 --- a/service/arczonalshift/api_op_UpdateZonalShift.go +++ b/service/arczonalshift/api_op_UpdateZonalShift.go @@ -14,8 +14,8 @@ import ( ) // Update an active zonal shift in Amazon Route 53 Application Recovery Controller -// in your AWS account. You can update a zonal shift to set a new expiration, or -// edit or replace the comment for the zonal shift. +// in your Amazon Web Services account. You can update a zonal shift to set a new +// expiration, or edit or replace the comment for the zonal shift. func (c *Client) UpdateZonalShift(ctx context.Context, params *UpdateZonalShiftInput, optFns ...func(*Options)) (*UpdateZonalShiftOutput, error) { if params == nil { params = &UpdateZonalShiftInput{} @@ -64,7 +64,8 @@ type UpdateZonalShiftOutput struct { // The Availability Zone that traffic is moved away from for a resource when you // start a zonal shift. Until the zonal shift expires or you cancel it, traffic for - // the resource is instead moved to other Availability Zones in the AWS Region. + // the resource is instead moved to other Availability Zones in the Amazon Web + // Services Region. // // This member is required. AwayFrom *string @@ -76,35 +77,35 @@ type UpdateZonalShiftOutput struct { // This member is required. Comment *string - // The expiry time (expiration time) for the zonal shift. A zonal shift is - // temporary and must be set to expire when you start the zonal shift. You can - // initially set a zonal shift to expire in a maximum of three days (72 hours). + // The expiry time (expiration time) for a customer-started zonal shift. A zonal + // shift is temporary and must be set to expire when you start the zonal shift. You + // can initially set a zonal shift to expire in a maximum of three days (72 hours). // However, you can update a zonal shift to set a new expiration at any time. When // you start a zonal shift, you specify how long you want it to be active, which // Route 53 ARC converts to an expiry time (expiration time). You can cancel a - // zonal shift, for example, if you're ready to restore traffic to the Availability - // Zone. Or you can update the zonal shift to specify another length of time to - // expire in. + // zonal shift when you're ready to restore traffic to the Availability Zone, or + // just wait for it to expire. Or you can update the zonal shift to specify another + // length of time to expire in. // // This member is required. ExpiryTime *time.Time - // The identifier for the resource to include in a zonal shift. The identifier is - // the Amazon Resource Name (ARN) for the resource. At this time, you can only - // start a zonal shift for Network Load Balancers and Application Load Balancers - // with cross-zone load balancing turned off. + // The identifier for the resource to shift away traffic for. The identifier is + // the Amazon Resource Name (ARN) for the resource. At this time, supported + // resources are Network Load Balancers and Application Load Balancers with + // cross-zone load balancing turned off. // // This member is required. ResourceIdentifier *string - // The time (UTC) when the zonal shift is started. + // The time (UTC) when the zonal shift starts. // // This member is required. StartTime *time.Time // A status for a zonal shift. The Status for a zonal shift can have one of the // following values: - // - ACTIVE: The zonal shift is started and active. + // - ACTIVE: The zonal shift has been started and active. // - EXPIRED: The zonal shift has expired (the expiry time was exceeded). // - CANCELED: The zonal shift was canceled. // diff --git a/service/arczonalshift/deserializers.go b/service/arczonalshift/deserializers.go index 706f3820e7a..3324c8671a0 100644 --- a/service/arczonalshift/deserializers.go +++ b/service/arczonalshift/deserializers.go @@ -254,14 +254,14 @@ func awsRestjson1_deserializeOpDocumentCancelZonalShiftOutput(v **CancelZonalShi return nil } -type awsRestjson1_deserializeOpGetManagedResource struct { +type awsRestjson1_deserializeOpCreatePracticeRunConfiguration struct { } -func (*awsRestjson1_deserializeOpGetManagedResource) ID() string { +func (*awsRestjson1_deserializeOpCreatePracticeRunConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetManagedResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreatePracticeRunConfiguration) 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) @@ -275,9 +275,9 @@ func (m *awsRestjson1_deserializeOpGetManagedResource) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetManagedResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreatePracticeRunConfiguration(response, &metadata) } - output := &GetManagedResourceOutput{} + output := &CreatePracticeRunConfigurationOutput{} out.Result = output var buff [1024]byte @@ -298,7 +298,7 @@ func (m *awsRestjson1_deserializeOpGetManagedResource) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetManagedResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreatePracticeRunConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -311,7 +311,7 @@ func (m *awsRestjson1_deserializeOpGetManagedResource) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetManagedResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreatePracticeRunConfiguration(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)} @@ -355,6 +355,9 @@ func awsRestjson1_deserializeOpErrorGetManagedResource(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -377,7 +380,7 @@ func awsRestjson1_deserializeOpErrorGetManagedResource(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentGetManagedResourceOutput(v **GetManagedResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreatePracticeRunConfigurationOutput(v **CreatePracticeRunConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -390,20 +393,15 @@ func awsRestjson1_deserializeOpDocumentGetManagedResourceOutput(v **GetManagedRe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetManagedResourceOutput + var sv *CreatePracticeRunConfigurationOutput if *v == nil { - sv = &GetManagedResourceOutput{} + sv = &CreatePracticeRunConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "appliedWeights": - if err := awsRestjson1_deserializeDocumentAppliedWeights(&sv.AppliedWeights, value); err != nil { - return err - } - case "arn": if value != nil { jtv, ok := value.(string) @@ -422,11 +420,20 @@ func awsRestjson1_deserializeOpDocumentGetManagedResourceOutput(v **GetManagedRe sv.Name = ptr.String(jtv) } - case "zonalShifts": - if err := awsRestjson1_deserializeDocumentZonalShiftsInResource(&sv.ZonalShifts, value); err != nil { + case "practiceRunConfiguration": + if err := awsRestjson1_deserializeDocumentPracticeRunConfiguration(&sv.PracticeRunConfiguration, value); err != nil { return err } + case "zonalAutoshiftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalAutoshiftStatus to be of type string, got %T instead", value) + } + sv.ZonalAutoshiftStatus = types.ZonalAutoshiftStatus(jtv) + } + default: _, _ = key, value @@ -436,14 +443,14 @@ func awsRestjson1_deserializeOpDocumentGetManagedResourceOutput(v **GetManagedRe return nil } -type awsRestjson1_deserializeOpListManagedResources struct { +type awsRestjson1_deserializeOpDeletePracticeRunConfiguration struct { } -func (*awsRestjson1_deserializeOpListManagedResources) ID() string { +func (*awsRestjson1_deserializeOpDeletePracticeRunConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListManagedResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePracticeRunConfiguration) 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) @@ -457,9 +464,9 @@ func (m *awsRestjson1_deserializeOpListManagedResources) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListManagedResources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePracticeRunConfiguration(response, &metadata) } - output := &ListManagedResourcesOutput{} + output := &DeletePracticeRunConfigurationOutput{} out.Result = output var buff [1024]byte @@ -480,7 +487,7 @@ func (m *awsRestjson1_deserializeOpListManagedResources) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListManagedResourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeletePracticeRunConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -493,7 +500,7 @@ func (m *awsRestjson1_deserializeOpListManagedResources) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListManagedResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePracticeRunConfiguration(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)} @@ -537,9 +544,15 @@ func awsRestjson1_deserializeOpErrorListManagedResources(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -556,7 +569,7 @@ func awsRestjson1_deserializeOpErrorListManagedResources(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListManagedResourcesOutput(v **ListManagedResourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeletePracticeRunConfigurationOutput(v **DeletePracticeRunConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -569,27 +582,40 @@ func awsRestjson1_deserializeOpDocumentListManagedResourcesOutput(v **ListManage return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListManagedResourcesOutput + var sv *DeletePracticeRunConfigurationOutput if *v == nil { - sv = &ListManagedResourcesOutput{} + sv = &DeletePracticeRunConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentManagedResourceSummaries(&sv.Items, value); err != nil { - return err + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "nextToken": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "zonalAutoshiftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalAutoshiftStatus to be of type string, got %T instead", value) + } + sv.ZonalAutoshiftStatus = types.ZonalAutoshiftStatus(jtv) } default: @@ -601,14 +627,14 @@ func awsRestjson1_deserializeOpDocumentListManagedResourcesOutput(v **ListManage return nil } -type awsRestjson1_deserializeOpListZonalShifts struct { +type awsRestjson1_deserializeOpGetManagedResource struct { } -func (*awsRestjson1_deserializeOpListZonalShifts) ID() string { +func (*awsRestjson1_deserializeOpGetManagedResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListZonalShifts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetManagedResource) 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) @@ -622,9 +648,9 @@ func (m *awsRestjson1_deserializeOpListZonalShifts) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListZonalShifts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetManagedResource(response, &metadata) } - output := &ListZonalShiftsOutput{} + output := &GetManagedResourceOutput{} out.Result = output var buff [1024]byte @@ -645,7 +671,7 @@ func (m *awsRestjson1_deserializeOpListZonalShifts) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListZonalShiftsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetManagedResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -658,7 +684,7 @@ func (m *awsRestjson1_deserializeOpListZonalShifts) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorListZonalShifts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetManagedResource(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)} @@ -705,6 +731,9 @@ func awsRestjson1_deserializeOpErrorListZonalShifts(response *smithyhttp.Respons case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -721,7 +750,7 @@ func awsRestjson1_deserializeOpErrorListZonalShifts(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentListZonalShiftsOutput(v **ListZonalShiftsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetManagedResourceOutput(v **GetManagedResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -734,27 +763,60 @@ func awsRestjson1_deserializeOpDocumentListZonalShiftsOutput(v **ListZonalShifts return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListZonalShiftsOutput + var sv *GetManagedResourceOutput if *v == nil { - sv = &ListZonalShiftsOutput{} + sv = &GetManagedResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentZonalShiftSummaries(&sv.Items, value); err != nil { + case "appliedWeights": + if err := awsRestjson1_deserializeDocumentAppliedWeights(&sv.AppliedWeights, value); err != nil { return err } - case "nextToken": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "autoshifts": + if err := awsRestjson1_deserializeDocumentAutoshiftsInResource(&sv.Autoshifts, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "practiceRunConfiguration": + if err := awsRestjson1_deserializeDocumentPracticeRunConfiguration(&sv.PracticeRunConfiguration, value); err != nil { + return err + } + + case "zonalAutoshiftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalAutoshiftStatus to be of type string, got %T instead", value) + } + sv.ZonalAutoshiftStatus = types.ZonalAutoshiftStatus(jtv) + } + + case "zonalShifts": + if err := awsRestjson1_deserializeDocumentZonalShiftsInResource(&sv.ZonalShifts, value); err != nil { + return err } default: @@ -766,14 +828,14 @@ func awsRestjson1_deserializeOpDocumentListZonalShiftsOutput(v **ListZonalShifts return nil } -type awsRestjson1_deserializeOpStartZonalShift struct { +type awsRestjson1_deserializeOpListAutoshifts struct { } -func (*awsRestjson1_deserializeOpStartZonalShift) ID() string { +func (*awsRestjson1_deserializeOpListAutoshifts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartZonalShift) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAutoshifts) 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) @@ -787,9 +849,9 @@ func (m *awsRestjson1_deserializeOpStartZonalShift) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartZonalShift(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAutoshifts(response, &metadata) } - output := &StartZonalShiftOutput{} + output := &ListAutoshiftsOutput{} out.Result = output var buff [1024]byte @@ -810,7 +872,7 @@ func (m *awsRestjson1_deserializeOpStartZonalShift) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartZonalShiftOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAutoshiftsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -823,7 +885,7 @@ func (m *awsRestjson1_deserializeOpStartZonalShift) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartZonalShift(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAutoshifts(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)} @@ -867,15 +929,9 @@ func awsRestjson1_deserializeOpErrorStartZonalShift(response *smithyhttp.Respons case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -892,7 +948,7 @@ func awsRestjson1_deserializeOpErrorStartZonalShift(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentStartZonalShiftOutput(v **StartZonalShiftOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAutoshiftsOutput(v **ListAutoshiftsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -905,90 +961,27 @@ func awsRestjson1_deserializeOpDocumentStartZonalShiftOutput(v **StartZonalShift return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartZonalShiftOutput + var sv *ListAutoshiftsOutput if *v == nil { - sv = &StartZonalShiftOutput{} + sv = &ListAutoshiftsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "awayFrom": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) - } - sv.AwayFrom = ptr.String(jtv) - } - - case "comment": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ZonalShiftComment to be of type string, got %T instead", value) - } - sv.Comment = ptr.String(jtv) - } - - case "expiryTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ExpiryTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected ExpiryTime to be a JSON Number, got %T instead", value) - - } - } - - case "resourceIdentifier": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) - } - sv.ResourceIdentifier = ptr.String(jtv) - } - - case "startTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected StartTime to be a JSON Number, got %T instead", value) - - } - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ZonalShiftStatus to be of type string, got %T instead", value) - } - sv.Status = types.ZonalShiftStatus(jtv) + case "items": + if err := awsRestjson1_deserializeDocumentAutoshiftSummaries(&sv.Items, value); err != nil { + return err } - case "zonalShiftId": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ZonalShiftId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ZonalShiftId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -1000,14 +993,14 @@ func awsRestjson1_deserializeOpDocumentStartZonalShiftOutput(v **StartZonalShift return nil } -type awsRestjson1_deserializeOpUpdateZonalShift struct { +type awsRestjson1_deserializeOpListManagedResources struct { } -func (*awsRestjson1_deserializeOpUpdateZonalShift) ID() string { +func (*awsRestjson1_deserializeOpListManagedResources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateZonalShift) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListManagedResources) 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) @@ -1021,9 +1014,9 @@ func (m *awsRestjson1_deserializeOpUpdateZonalShift) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateZonalShift(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListManagedResources(response, &metadata) } - output := &UpdateZonalShiftOutput{} + output := &ListManagedResourcesOutput{} out.Result = output var buff [1024]byte @@ -1044,7 +1037,7 @@ func (m *awsRestjson1_deserializeOpUpdateZonalShift) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateZonalShiftOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListManagedResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1057,7 +1050,7 @@ func (m *awsRestjson1_deserializeOpUpdateZonalShift) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateZonalShift(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListManagedResources(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)} @@ -1101,15 +1094,9 @@ func awsRestjson1_deserializeOpErrorUpdateZonalShift(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1126,7 +1113,7 @@ func awsRestjson1_deserializeOpErrorUpdateZonalShift(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentUpdateZonalShiftOutput(v **UpdateZonalShiftOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListManagedResourcesOutput(v **ListManagedResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1139,90 +1126,27 @@ func awsRestjson1_deserializeOpDocumentUpdateZonalShiftOutput(v **UpdateZonalShi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateZonalShiftOutput + var sv *ListManagedResourcesOutput if *v == nil { - sv = &UpdateZonalShiftOutput{} + sv = &ListManagedResourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "awayFrom": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) - } - sv.AwayFrom = ptr.String(jtv) + case "items": + if err := awsRestjson1_deserializeDocumentManagedResourceSummaries(&sv.Items, value); err != nil { + return err } - case "comment": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ZonalShiftComment to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Comment = ptr.String(jtv) - } - - case "expiryTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ExpiryTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected ExpiryTime to be a JSON Number, got %T instead", value) - - } - } - - case "resourceIdentifier": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) - } - sv.ResourceIdentifier = ptr.String(jtv) - } - - case "startTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected StartTime to be a JSON Number, got %T instead", value) - - } - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ZonalShiftStatus to be of type string, got %T instead", value) - } - sv.Status = types.ZonalShiftStatus(jtv) - } - - case "zonalShiftId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ZonalShiftId to be of type string, got %T instead", value) - } - sv.ZonalShiftId = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -1234,12 +1158,37 @@ func awsRestjson1_deserializeOpDocumentUpdateZonalShiftOutput(v **UpdateZonalShi return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} +type awsRestjson1_deserializeOpListZonalShifts struct { +} + +func (*awsRestjson1_deserializeOpListZonalShifts) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListZonalShifts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListZonalShifts(response, &metadata) + } + output := &ListZonalShiftsOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1250,36 +1199,45 @@ func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentListZonalShiftsOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} +func awsRestjson1_deserializeOpErrorListZonalShifts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1289,65 +1247,113 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons return err } - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentListZonalShiftsOutput(v **ListZonalShiftsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output -} + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + var sv *ListZonalShiftsOutput + if *v == nil { + sv = &ListZonalShiftsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsRestjson1_deserializeDocumentZonalShiftSummaries(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value - 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 } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) +type awsRestjson1_deserializeOpStartZonalShift struct { +} + +func (*awsRestjson1_deserializeOpStartZonalShift) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpStartZonalShift) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStartZonalShift(response, &metadata) + } + output := &StartZonalShiftOutput{} + out.Result = output -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1358,11 +1364,44 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentStartZonalShiftOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartZonalShift(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1374,16 +1413,181 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp } errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - return output + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} +func awsRestjson1_deserializeOpDocumentStartZonalShiftOutput(v **StartZonalShiftOutput, 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 *StartZonalShiftOutput + if *v == nil { + sv = &StartZonalShiftOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awayFrom": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AwayFrom = ptr.String(jtv) + } + + case "comment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalShiftComment to be of type string, got %T instead", value) + } + sv.Comment = ptr.String(jtv) + } + + case "expiryTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiryTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ExpiryTime to be a JSON Number, got %T instead", value) + + } + } + + case "resourceIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) + } + sv.ResourceIdentifier = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected StartTime to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalShiftStatus to be of type string, got %T instead", value) + } + sv.Status = types.ZonalShiftStatus(jtv) + } + + case "zonalShiftId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalShiftId to be of type string, got %T instead", value) + } + sv.ZonalShiftId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdatePracticeRunConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdatePracticeRunConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdatePracticeRunConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePracticeRunConfiguration(response, &metadata) + } + output := &UpdatePracticeRunConfigurationOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -1394,36 +1598,45 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentUpdatePracticeRunConfigurationOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} +func awsRestjson1_deserializeOpErrorUpdatePracticeRunConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -1433,24 +1646,1047 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return err } - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdatePracticeRunConfigurationOutput(v **UpdatePracticeRunConfigurationOutput, 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 *UpdatePracticeRunConfigurationOutput + if *v == nil { + sv = &UpdatePracticeRunConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "practiceRunConfiguration": + if err := awsRestjson1_deserializeDocumentPracticeRunConfiguration(&sv.PracticeRunConfiguration, value); err != nil { + return err + } + + case "zonalAutoshiftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalAutoshiftStatus to be of type string, got %T instead", value) + } + sv.ZonalAutoshiftStatus = types.ZonalAutoshiftStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateZonalAutoshiftConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateZonalAutoshiftConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateZonalAutoshiftConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateZonalAutoshiftConfiguration(response, &metadata) + } + output := &UpdateZonalAutoshiftConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateZonalAutoshiftConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateZonalAutoshiftConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateZonalAutoshiftConfigurationOutput(v **UpdateZonalAutoshiftConfigurationOutput, 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 *UpdateZonalAutoshiftConfigurationOutput + if *v == nil { + sv = &UpdateZonalAutoshiftConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "resourceIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) + } + sv.ResourceIdentifier = ptr.String(jtv) + } + + case "zonalAutoshiftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalAutoshiftStatus to be of type string, got %T instead", value) + } + sv.ZonalAutoshiftStatus = types.ZonalAutoshiftStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateZonalShift struct { +} + +func (*awsRestjson1_deserializeOpUpdateZonalShift) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateZonalShift) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateZonalShift(response, &metadata) + } + output := &UpdateZonalShiftOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateZonalShiftOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateZonalShift(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateZonalShiftOutput(v **UpdateZonalShiftOutput, 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 *UpdateZonalShiftOutput + if *v == nil { + sv = &UpdateZonalShiftOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awayFrom": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AwayFrom = ptr.String(jtv) + } + + case "comment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalShiftComment to be of type string, got %T instead", value) + } + sv.Comment = ptr.String(jtv) + } + + case "expiryTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpiryTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ExpiryTime to be a JSON Number, got %T instead", value) + + } + } + + case "resourceIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdentifier to be of type string, got %T instead", value) + } + sv.ResourceIdentifier = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected StartTime to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalShiftStatus to be of type string, got %T instead", value) + } + sv.Status = types.ZonalShiftStatus(jtv) + } + + case "zonalShiftId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalShiftId to be of type string, got %T instead", value) + } + sv.ZonalShiftId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_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 awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, 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.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppliedWeights(v *map[string]float32, 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]float32 + if *v == nil { + mv = map[string]float32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal float32 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + parsedVal = float32(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + parsedVal = float32(f64) + + default: + return fmt.Errorf("expected Weight to be a JSON Number, got %T instead", value) + + } + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentAutoshiftInResource(v **types.AutoshiftInResource, 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.AutoshiftInResource + if *v == nil { + sv = &types.AutoshiftInResource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appliedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoshiftAppliedStatus to be of type string, got %T instead", value) + } + sv.AppliedStatus = types.AutoshiftAppliedStatus(jtv) + } + + case "awayFrom": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AwayFrom = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected StartTime to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoshiftsInResource(v *[]types.AutoshiftInResource, 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.AutoshiftInResource + if *v == nil { + cv = []types.AutoshiftInResource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AutoshiftInResource + destAddr := &col + if err := awsRestjson1_deserializeDocumentAutoshiftInResource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAutoshiftSummaries(v *[]types.AutoshiftSummary, 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.AutoshiftSummary + if *v == nil { + cv = []types.AutoshiftSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AutoshiftSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAutoshiftSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAutoshiftSummary(v **types.AutoshiftSummary, 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.AutoshiftSummary + if *v == nil { + sv = &types.AutoshiftSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "awayFrom": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + } + sv.AwayFrom = ptr.String(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ExpiryTime to be a JSON Number, got %T instead", value) + + } + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected StartTime to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoshiftExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.AutoshiftExecutionStatus(jtv) + } + + default: + _, _ = key, value - 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 + *v = sv + return nil } -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeDocumentAvailabilityZones(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1458,39 +2694,35 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var cv []string if *v == nil { - sv = &types.AccessDeniedException{} + cv = []string{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = jtv } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentAppliedWeights(v *map[string]float32, value interface{}) error { +func awsRestjson1_deserializeDocumentBlockedDates(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1498,60 +2730,35 @@ func awsRestjson1_deserializeDocumentAppliedWeights(v *map[string]float32, value return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]float32 + var cv []string if *v == nil { - mv = map[string]float32{} + cv = []string{} } else { - mv = *v + cv = *v } - for key, value := range shape { - var parsedVal float32 + for _, value := range shape { + var col string if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - parsedVal = float32(f64) - - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() - - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) - - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) - - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) - - } - parsedVal = float32(f64) - - default: - return fmt.Errorf("expected Weight to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BlockedDate to be of type string, got %T instead", value) } + col = jtv } - mv[key] = parsedVal + cv = append(cv, col) } - *v = mv + *v = cv return nil } -func awsRestjson1_deserializeDocumentAvailabilityZones(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentBlockedWindows(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1576,7 +2783,7 @@ func awsRestjson1_deserializeDocumentAvailabilityZones(v *[]string, value interf if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AvailabilityZone to be of type string, got %T instead", value) + return fmt.Errorf("expected BlockedWindow to be of type string, got %T instead", value) } col = jtv } @@ -1645,6 +2852,89 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentControlCondition(v **types.ControlCondition, 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.ControlCondition + if *v == nil { + sv = &types.ControlCondition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alarmIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.AlarmIdentifier = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ControlConditionType to be of type string, got %T instead", value) + } + sv.Type = types.ControlConditionType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentControlConditions(v *[]types.ControlCondition, 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.ControlCondition + if *v == nil { + cv = []types.ControlCondition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ControlCondition + destAddr := &col + if err := awsRestjson1_deserializeDocumentControlCondition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -1741,6 +3031,11 @@ func awsRestjson1_deserializeDocumentManagedResourceSummary(v **types.ManagedRes for key, value := range shape { switch key { + case "appliedWeights": + if err := awsRestjson1_deserializeDocumentAppliedWeights(&sv.AppliedWeights, value); err != nil { + return err + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -1750,6 +3045,11 @@ func awsRestjson1_deserializeDocumentManagedResourceSummary(v **types.ManagedRes sv.Arn = ptr.String(jtv) } + case "autoshifts": + if err := awsRestjson1_deserializeDocumentAutoshiftsInResource(&sv.Autoshifts, value); err != nil { + return err + } + case "availabilityZones": if err := awsRestjson1_deserializeDocumentAvailabilityZones(&sv.AvailabilityZones, value); err != nil { return err @@ -1764,6 +3064,80 @@ func awsRestjson1_deserializeDocumentManagedResourceSummary(v **types.ManagedRes sv.Name = ptr.String(jtv) } + case "practiceRunStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalAutoshiftStatus to be of type string, got %T instead", value) + } + sv.PracticeRunStatus = types.ZonalAutoshiftStatus(jtv) + } + + case "zonalAutoshiftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonalAutoshiftStatus to be of type string, got %T instead", value) + } + sv.ZonalAutoshiftStatus = types.ZonalAutoshiftStatus(jtv) + } + + case "zonalShifts": + if err := awsRestjson1_deserializeDocumentZonalShiftsInResource(&sv.ZonalShifts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPracticeRunConfiguration(v **types.PracticeRunConfiguration, 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.PracticeRunConfiguration + if *v == nil { + sv = &types.PracticeRunConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "blockedDates": + if err := awsRestjson1_deserializeDocumentBlockedDates(&sv.BlockedDates, value); err != nil { + return err + } + + case "blockedWindows": + if err := awsRestjson1_deserializeDocumentBlockedWindows(&sv.BlockedWindows, value); err != nil { + return err + } + + case "blockingAlarms": + if err := awsRestjson1_deserializeDocumentControlConditions(&sv.BlockingAlarms, value); err != nil { + return err + } + + case "outcomeAlarms": + if err := awsRestjson1_deserializeDocumentControlConditions(&sv.OutcomeAlarms, value); err != nil { + return err + } + default: _, _ = key, value @@ -1967,6 +3341,15 @@ func awsRestjson1_deserializeDocumentZonalShiftInResource(v **types.ZonalShiftIn } } + case "practiceRunOutcome": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PracticeRunOutcome to be of type string, got %T instead", value) + } + sv.PracticeRunOutcome = types.PracticeRunOutcome(jtv) + } + case "resourceIdentifier": if value != nil { jtv, ok := value.(string) @@ -2134,6 +3517,15 @@ func awsRestjson1_deserializeDocumentZonalShiftSummary(v **types.ZonalShiftSumma } } + case "practiceRunOutcome": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PracticeRunOutcome to be of type string, got %T instead", value) + } + sv.PracticeRunOutcome = types.PracticeRunOutcome(jtv) + } + case "resourceIdentifier": if value != nil { jtv, ok := value.(string) diff --git a/service/arczonalshift/doc.go b/service/arczonalshift/doc.go index 6b95fdfe44a..3f85324ac38 100644 --- a/service/arczonalshift/doc.go +++ b/service/arczonalshift/doc.go @@ -3,26 +3,30 @@ // Package arczonalshift provides the API client, operations, and parameter types // for AWS ARC - Zonal Shift. // -// This is the API Reference Guide for the zonal shift feature of Amazon Route 53 -// Application Recovery Controller. This guide is for developers who need detailed -// information about zonal shift API actions, data types, and errors. Zonal shift -// is in preview release for Amazon Route 53 Application Recovery Controller and is -// subject to change. Zonal shift in Route 53 ARC enables you to move traffic for a -// load balancer resource away from an Availability Zone. Starting a zonal shift -// helps your application recover immediately, for example, from a developer's bad -// code deployment or from an AWS infrastructure failure in a single Availability -// Zone, reducing the impact and time lost from an issue in one zone. Supported AWS -// resources are automatically registered with Route 53 ARC. Resources that are -// registered for zonal shifts in Route 53 ARC are managed resources in Route 53 -// ARC. You can start a zonal shift for any managed resource in your account in a -// Region. At this time, you can only start a zonal shift for Network Load -// Balancers and Application Load Balancers with cross-zone load balancing turned -// off. Zonal shifts are temporary. You must specify an expiration when you start a -// zonal shift, of up to three days initially. If you want to still keep traffic -// away from an Availability Zone, you can update the zonal shift and set a new -// expiration. You can also cancel a zonal shift, before it expires, for example, -// if you're ready to restore traffic to the Availability Zone. For more -// information about using zonal shift, see the Amazon Route 53 Application -// Recovery Controller Developer Guide (https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html) +// Welcome to the Zonal Shift API Reference Guide for Amazon Route 53 Application +// Recovery Controller (Route 53 ARC). You can start a zonal shift to move traffic +// for a load balancer resource away from an Availability Zone to help your +// application recover quickly from an impairment in an Availability Zone. For +// example, you can recover your application from a developer's bad code deployment +// or from an Amazon Web Services infrastructure failure in a single Availability +// Zone. You can also configure zonal autoshift for a load balancer resource. Zonal +// autoshift is a capability in Route 53 ARC where Amazon Web Services shifts away +// application resource traffic from an Availability Zone, on your behalf, to help +// reduce your time to recovery during events. Amazon Web Services shifts away +// traffic for resources that are enabled for zonal autoshift whenever Amazon Web +// Services determines that there's an issue in the Availability Zone that could +// potentially affect customers. To ensure that zonal autoshift is safe for your +// application, you must also configure practice runs when you enable zonal +// autoshift for a resource. Practice runs start weekly zonal shifts for a +// resource, to shift traffic for the resource out of an Availability Zone. +// Practice runs make sure, on a regular basis, that you have enough capacity in +// all the Availability Zones in an Amazon Web Services Region for your application +// to continue to operate normally when traffic for a resource is shifted away from +// one Availability Zone. You must prescale resource capacity in all Availability +// Zones in the Region where your application is deployed, before you configure +// practice runs or enable zonal autoshift for a resource. You should not rely on +// scaling on demand when an autoshift or practice run starts. For more information +// about using zonal shift and zonal autoshift, see the Amazon Route 53 +// Application Recovery Controller Developer Guide (https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route53-recovery.html) // . package arczonalshift diff --git a/service/arczonalshift/endpoints.go b/service/arczonalshift/endpoints.go index 7549a9ec552..5523a2834fc 100644 --- a/service/arczonalshift/endpoints.go +++ b/service/arczonalshift/endpoints.go @@ -366,7 +366,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://arc-zonal-shift-fips.") diff --git a/service/arczonalshift/generated.json b/service/arczonalshift/generated.json index 5beae91cecf..880af995b79 100644 --- a/service/arczonalshift/generated.json +++ b/service/arczonalshift/generated.json @@ -10,10 +10,15 @@ "api_client.go", "api_client_test.go", "api_op_CancelZonalShift.go", + "api_op_CreatePracticeRunConfiguration.go", + "api_op_DeletePracticeRunConfiguration.go", "api_op_GetManagedResource.go", + "api_op_ListAutoshifts.go", "api_op_ListManagedResources.go", "api_op_ListZonalShifts.go", "api_op_StartZonalShift.go", + "api_op_UpdatePracticeRunConfiguration.go", + "api_op_UpdateZonalAutoshiftConfiguration.go", "api_op_UpdateZonalShift.go", "auth.go", "deserializers.go", diff --git a/service/arczonalshift/serializers.go b/service/arczonalshift/serializers.go index 9d602d38892..d5ae23ed3cb 100644 --- a/service/arczonalshift/serializers.go +++ b/service/arczonalshift/serializers.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/arczonalshift/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" @@ -78,6 +79,174 @@ func awsRestjson1_serializeOpHttpBindingsCancelZonalShiftInput(v *CancelZonalShi return nil } +type awsRestjson1_serializeOpCreatePracticeRunConfiguration struct { +} + +func (*awsRestjson1_serializeOpCreatePracticeRunConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreatePracticeRunConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreatePracticeRunConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreatePracticeRunConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreatePracticeRunConfigurationInput(v *CreatePracticeRunConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreatePracticeRunConfigurationInput(v *CreatePracticeRunConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BlockedDates != nil { + ok := object.Key("blockedDates") + if err := awsRestjson1_serializeDocumentBlockedDates(v.BlockedDates, ok); err != nil { + return err + } + } + + if v.BlockedWindows != nil { + ok := object.Key("blockedWindows") + if err := awsRestjson1_serializeDocumentBlockedWindows(v.BlockedWindows, ok); err != nil { + return err + } + } + + if v.BlockingAlarms != nil { + ok := object.Key("blockingAlarms") + if err := awsRestjson1_serializeDocumentControlConditions(v.BlockingAlarms, ok); err != nil { + return err + } + } + + if v.OutcomeAlarms != nil { + ok := object.Key("outcomeAlarms") + if err := awsRestjson1_serializeDocumentControlConditions(v.OutcomeAlarms, ok); err != nil { + return err + } + } + + if v.ResourceIdentifier != nil { + ok := object.Key("resourceIdentifier") + ok.String(*v.ResourceIdentifier) + } + + return nil +} + +type awsRestjson1_serializeOpDeletePracticeRunConfiguration struct { +} + +func (*awsRestjson1_serializeOpDeletePracticeRunConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeletePracticeRunConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeletePracticeRunConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/configuration/{resourceIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeletePracticeRunConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeletePracticeRunConfigurationInput(v *DeletePracticeRunConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceIdentifier == nil || len(*v.ResourceIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceIdentifier must not be empty")} + } + if v.ResourceIdentifier != nil { + if err := encoder.SetURI("resourceIdentifier").String(*v.ResourceIdentifier); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetManagedResource struct { } @@ -143,6 +312,74 @@ func awsRestjson1_serializeOpHttpBindingsGetManagedResourceInput(v *GetManagedRe return nil } +type awsRestjson1_serializeOpListAutoshifts struct { +} + +func (*awsRestjson1_serializeOpListAutoshifts) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAutoshifts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAutoshiftsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/autoshifts") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListAutoshiftsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAutoshiftsInput(v *ListAutoshiftsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if len(v.Status) > 0 { + encoder.SetQuery("status").String(string(v.Status)) + } + + return nil +} + type awsRestjson1_serializeOpListManagedResources struct { } @@ -268,6 +505,10 @@ func awsRestjson1_serializeOpHttpBindingsListZonalShiftsInput(v *ListZonalShifts encoder.SetQuery("nextToken").String(*v.NextToken) } + if v.ResourceIdentifier != nil { + encoder.SetQuery("resourceIdentifier").String(*v.ResourceIdentifier) + } + if len(v.Status) > 0 { encoder.SetQuery("status").String(string(v.Status)) } @@ -365,6 +606,205 @@ func awsRestjson1_serializeOpDocumentStartZonalShiftInput(v *StartZonalShiftInpu return nil } +type awsRestjson1_serializeOpUpdatePracticeRunConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdatePracticeRunConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdatePracticeRunConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdatePracticeRunConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/configuration/{resourceIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdatePracticeRunConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdatePracticeRunConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdatePracticeRunConfigurationInput(v *UpdatePracticeRunConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceIdentifier == nil || len(*v.ResourceIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceIdentifier must not be empty")} + } + if v.ResourceIdentifier != nil { + if err := encoder.SetURI("resourceIdentifier").String(*v.ResourceIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdatePracticeRunConfigurationInput(v *UpdatePracticeRunConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BlockedDates != nil { + ok := object.Key("blockedDates") + if err := awsRestjson1_serializeDocumentBlockedDates(v.BlockedDates, ok); err != nil { + return err + } + } + + if v.BlockedWindows != nil { + ok := object.Key("blockedWindows") + if err := awsRestjson1_serializeDocumentBlockedWindows(v.BlockedWindows, ok); err != nil { + return err + } + } + + if v.BlockingAlarms != nil { + ok := object.Key("blockingAlarms") + if err := awsRestjson1_serializeDocumentControlConditions(v.BlockingAlarms, ok); err != nil { + return err + } + } + + if v.OutcomeAlarms != nil { + ok := object.Key("outcomeAlarms") + if err := awsRestjson1_serializeDocumentControlConditions(v.OutcomeAlarms, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateZonalAutoshiftConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateZonalAutoshiftConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateZonalAutoshiftConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateZonalAutoshiftConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/managedresources/{resourceIdentifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateZonalAutoshiftConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateZonalAutoshiftConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateZonalAutoshiftConfigurationInput(v *UpdateZonalAutoshiftConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceIdentifier == nil || len(*v.ResourceIdentifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceIdentifier must not be empty")} + } + if v.ResourceIdentifier != nil { + if err := encoder.SetURI("resourceIdentifier").String(*v.ResourceIdentifier); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateZonalAutoshiftConfigurationInput(v *UpdateZonalAutoshiftConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ZonalAutoshiftStatus) > 0 { + ok := object.Key("zonalAutoshiftStatus") + ok.String(string(v.ZonalAutoshiftStatus)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateZonalShift struct { } @@ -457,3 +897,55 @@ func awsRestjson1_serializeOpDocumentUpdateZonalShiftInput(v *UpdateZonalShiftIn return nil } + +func awsRestjson1_serializeDocumentBlockedDates(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentBlockedWindows(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentControlCondition(v *types.ControlCondition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlarmIdentifier != nil { + ok := object.Key("alarmIdentifier") + ok.String(*v.AlarmIdentifier) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsRestjson1_serializeDocumentControlConditions(v []types.ControlCondition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentControlCondition(&v[i], av); err != nil { + return err + } + } + return nil +} diff --git a/service/arczonalshift/types/enums.go b/service/arczonalshift/types/enums.go index 727011709b5..b7c13e1d146 100644 --- a/service/arczonalshift/types/enums.go +++ b/service/arczonalshift/types/enums.go @@ -20,13 +20,52 @@ func (AppliedStatus) Values() []AppliedStatus { } } +type AutoshiftAppliedStatus string + +// Enum values for AutoshiftAppliedStatus +const ( + AutoshiftAppliedStatusApplied AutoshiftAppliedStatus = "APPLIED" + AutoshiftAppliedStatusNotApplied AutoshiftAppliedStatus = "NOT_APPLIED" +) + +// Values returns all known values for AutoshiftAppliedStatus. 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 (AutoshiftAppliedStatus) Values() []AutoshiftAppliedStatus { + return []AutoshiftAppliedStatus{ + "APPLIED", + "NOT_APPLIED", + } +} + +type AutoshiftExecutionStatus string + +// Enum values for AutoshiftExecutionStatus +const ( + AutoshiftExecutionStatusActive AutoshiftExecutionStatus = "ACTIVE" + AutoshiftExecutionStatusCompleted AutoshiftExecutionStatus = "COMPLETED" +) + +// Values returns all known values for AutoshiftExecutionStatus. 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 (AutoshiftExecutionStatus) Values() []AutoshiftExecutionStatus { + return []AutoshiftExecutionStatus{ + "ACTIVE", + "COMPLETED", + } +} + type ConflictExceptionReason string // Enum values for ConflictExceptionReason const ( - ConflictExceptionReasonZonalShiftAlreadyExists ConflictExceptionReason = "ZonalShiftAlreadyExists" - ConflictExceptionReasonZonalShiftStatusNotActive ConflictExceptionReason = "ZonalShiftStatusNotActive" - ConflictExceptionReasonSimultaneousZonalShiftsConflict ConflictExceptionReason = "SimultaneousZonalShiftsConflict" + ConflictExceptionReasonZonalShiftAlreadyExists ConflictExceptionReason = "ZonalShiftAlreadyExists" + ConflictExceptionReasonZonalShiftStatusNotActive ConflictExceptionReason = "ZonalShiftStatusNotActive" + ConflictExceptionReasonSimultaneousZonalShiftsConflict ConflictExceptionReason = "SimultaneousZonalShiftsConflict" + ConflictExceptionReasonPracticeConfigurationAlreadyExists ConflictExceptionReason = "PracticeConfigurationAlreadyExists" + ConflictExceptionReasonAutoshiftEnabled ConflictExceptionReason = "AutoShiftEnabled" + ConflictExceptionReasonPracticeConfigurationDoesNotExist ConflictExceptionReason = "PracticeConfigurationDoesNotExist" ) // Values returns all known values for ConflictExceptionReason. Note that this can @@ -37,6 +76,47 @@ func (ConflictExceptionReason) Values() []ConflictExceptionReason { "ZonalShiftAlreadyExists", "ZonalShiftStatusNotActive", "SimultaneousZonalShiftsConflict", + "PracticeConfigurationAlreadyExists", + "AutoShiftEnabled", + "PracticeConfigurationDoesNotExist", + } +} + +type ControlConditionType string + +// Enum values for ControlConditionType +const ( + ControlConditionTypeCloudwatch ControlConditionType = "CLOUDWATCH" +) + +// Values returns all known values for ControlConditionType. 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 (ControlConditionType) Values() []ControlConditionType { + return []ControlConditionType{ + "CLOUDWATCH", + } +} + +type PracticeRunOutcome string + +// Enum values for PracticeRunOutcome +const ( + PracticeRunOutcomeFailed PracticeRunOutcome = "FAILED" + PracticeRunOutcomeInterrupted PracticeRunOutcome = "INTERRUPTED" + PracticeRunOutcomePending PracticeRunOutcome = "PENDING" + PracticeRunOutcomeSucceeded PracticeRunOutcome = "SUCCEEDED" +) + +// Values returns all known values for PracticeRunOutcome. 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 (PracticeRunOutcome) Values() []PracticeRunOutcome { + return []PracticeRunOutcome{ + "FAILED", + "INTERRUPTED", + "PENDING", + "SUCCEEDED", } } @@ -51,6 +131,9 @@ const ( ValidationExceptionReasonInvalidResourceIdentifier ValidationExceptionReason = "InvalidResourceIdentifier" ValidationExceptionReasonInvalidAz ValidationExceptionReason = "InvalidAz" ValidationExceptionReasonUnsupportedAz ValidationExceptionReason = "UnsupportedAz" + ValidationExceptionReasonInvalidAlarmCondition ValidationExceptionReason = "InvalidAlarmCondition" + ValidationExceptionReasonInvalidConditionType ValidationExceptionReason = "InvalidConditionType" + ValidationExceptionReasonInvalidPracticeBlocker ValidationExceptionReason = "InvalidPracticeBlocker" ) // Values returns all known values for ValidationExceptionReason. Note that this @@ -65,6 +148,27 @@ func (ValidationExceptionReason) Values() []ValidationExceptionReason { "InvalidResourceIdentifier", "InvalidAz", "UnsupportedAz", + "InvalidAlarmCondition", + "InvalidConditionType", + "InvalidPracticeBlocker", + } +} + +type ZonalAutoshiftStatus string + +// Enum values for ZonalAutoshiftStatus +const ( + ZonalAutoshiftStatusEnabled ZonalAutoshiftStatus = "ENABLED" + ZonalAutoshiftStatusDisabled ZonalAutoshiftStatus = "DISABLED" +) + +// Values returns all known values for ZonalAutoshiftStatus. 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 (ZonalAutoshiftStatus) Values() []ZonalAutoshiftStatus { + return []ZonalAutoshiftStatus{ + "ENABLED", + "DISABLED", } } diff --git a/service/arczonalshift/types/errors.go b/service/arczonalshift/types/errors.go index 6942baeb852..8971886ee74 100644 --- a/service/arczonalshift/types/errors.go +++ b/service/arczonalshift/types/errors.go @@ -141,7 +141,8 @@ func (e *ThrottlingException) ErrorCode() string { } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The input fails to satisfy the constraints specified by an AWS service. +// The input fails to satisfy the constraints specified by an Amazon Web Services +// service. type ValidationException struct { Message *string diff --git a/service/arczonalshift/types/types.go b/service/arczonalshift/types/types.go index 8b28bf260b1..7f7b8c9bb98 100644 --- a/service/arczonalshift/types/types.go +++ b/service/arczonalshift/types/types.go @@ -7,13 +7,119 @@ import ( "time" ) -// A complex structure for a managed resource in an account. A managed resource is -// a Network Load Balancer or Application Load Balancer that has been registered -// with Route 53 ARC by Elastic Load Balancing. You can start a zonal shift in -// Route 53 ARC for a managed resource to temporarily move traffic for the resource -// away from an Availability Zone in an AWS Region. At this time, you can only -// start a zonal shift for Network Load Balancers and Application Load Balancers -// with cross-zone load balancing turned off. +// A complex structure that lists an autoshift that is currently active for a +// managed resource and information about the autoshift. For more information, see +// How zonal autoshift and practice runs work (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.how-it-works.html) +// in the Amazon Route 53 Application Recovery Controller Developer Guide. +type AutoshiftInResource struct { + + // The appliedStatus field specifies which application traffic shift is in effect + // for a resource when there is more than one traffic shift active. There can be + // more than one application traffic shift in progress at the same time - that is, + // practice run zonal shifts, customer-started zonal shifts, or an autoshift. The + // appliedStatus field for an autoshift for a resource can have one of two values: + // APPLIED or NOT_APPLIED . The zonal shift or autoshift that is currently in + // effect for the resource has an applied status set to APPLIED . The overall + // principle for precedence is that zonal shifts that you start as a customer take + // precedence autoshifts, which take precedence over practice runs. That is, + // customer-started zonal shifts > autoshifts > practice run zonal shifts. For more + // information, see How zonal autoshift and practice runs work (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.how-it-works.html) + // in the Amazon Route 53 Application Recovery Controller Developer Guide. + // + // This member is required. + AppliedStatus AutoshiftAppliedStatus + + // The Availability Zone that traffic is shifted away from for a resource, when + // Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for + // the resource is instead directed to other Availability Zones in the Amazon Web + // Services Region. An autoshift can end for a resource, for example, when Amazon + // Web Services ends the autoshift for the Availability Zone or when you disable + // zonal autoshift for the resource. + // + // This member is required. + AwayFrom *string + + // The time (UTC) when the autoshift started. + // + // This member is required. + StartTime *time.Time + + noSmithyDocumentSerde +} + +// Information about an autoshift. Amazon Web Services starts an autoshift to +// temporarily move traffic for a resource away from an Availability Zone in an +// Amazon Web Services Region when Amazon Web Services determines that there's an +// issue in the Availability Zone that could potentially affect customers. You can +// configure zonal autoshift in Route 53 ARC for managed resources in your Amazon +// Web Services account in a Region. Supported Amazon Web Services resources are +// automatically registered with Route 53 ARC. Autoshifts are temporary. When the +// Availability Zone recovers, Amazon Web Services ends the autoshift, and traffic +// for the resource is no longer directed to the other Availability Zones in the +// Region. You can stop an autoshift for a resource by disabling zonal autoshift. +type AutoshiftSummary struct { + + // The Availability Zone that traffic is shifted away from for a resource when + // Amazon Web Services starts an autoshift. Until the autoshift ends, traffic for + // the resource is instead directed to other Availability Zones in the Amazon Web + // Services Region. An autoshift can end for a resource, for example, when Amazon + // Web Services ends the autoshift for the Availability Zone or when you disable + // zonal autoshift for the resource. + // + // This member is required. + AwayFrom *string + + // The time (in UTC) when the autoshift ended. + // + // This member is required. + EndTime *time.Time + + // The time (in UTC) when the autoshift started. + // + // This member is required. + StartTime *time.Time + + // The status for an autoshift. + // + // This member is required. + Status AutoshiftExecutionStatus + + noSmithyDocumentSerde +} + +// A control condition is an alarm that you specify for a practice run. When you +// configure practice runs with zonal autoshift for a resource, you specify Amazon +// CloudWatch alarms, which you create in CloudWatch to use with the practice run. +// The alarms that you specify are an outcome alarm, to monitor application health +// during practice runs and, optionally, a blocking alarm, to block practice runs +// from starting. Control condition alarms do not apply for autoshifts. For more +// information, see Considerations when you configure zonal autoshift (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.considerations.html) +// in the Amazon Route 53 Application Recovery Controller Developer Guide. +type ControlCondition struct { + + // The Amazon Resource Name (ARN) for the Amazon CloudWatch alarm that you specify + // as a control condition for a practice run. + // + // This member is required. + AlarmIdentifier *string + + // The type of alarm specified for a practice run. The only valid value is + // CLOUDWATCH . + // + // This member is required. + Type ControlConditionType + + noSmithyDocumentSerde +} + +// A complex structure for a managed resource in an Amazon Web Services account +// with information about zonal shifts and autoshifts. A managed resource is a load +// balancer that has been registered with Route 53 ARC by Elastic Load Balancing. +// You can start a zonal shift in Route 53 ARC for a managed resource to +// temporarily move traffic for the resource away from an Availability Zone in an +// Amazon Web Services Region. You can also configure zonal autoshift for a managed +// resource. At this time, managed resources are Network Load Balancers and +// Application Load Balancers with cross-zone load balancing turned off. type ManagedResourceSummary struct { // The Availability Zones that a resource is deployed in. @@ -21,12 +127,67 @@ type ManagedResourceSummary struct { // This member is required. AvailabilityZones []string + // A collection of key-value pairs that indicate whether resources are active in + // Availability Zones or not. The key name is the Availability Zone where the + // resource is deployed. The value is 1 or 0. + AppliedWeights map[string]float32 + // The Amazon Resource Name (ARN) for the managed resource. Arn *string + // An array of the autoshifts that have been completed for a resource. + Autoshifts []AutoshiftInResource + // The name of the managed resource. Name *string + // This status tracks whether a practice run configuration exists for a resource. + // When you configure a practice run for a resource so that a practice run + // configuration exists, Route 53 ARC sets this value to ENABLED . If a you have + // not configured a practice run for the resource, or delete a practice run + // configuration, Route 53 ARC sets the value to DISABLED . Route 53 ARC updates + // this status; you can't set a practice run status to ENABLED or DISABLED . + PracticeRunStatus ZonalAutoshiftStatus + + // The status of autoshift for a resource. When you configure zonal autoshift for + // a resource, you can set the value of the status to ENABLED or DISABLED . + ZonalAutoshiftStatus ZonalAutoshiftStatus + + // An array of the zonal shifts for a resource. + ZonalShifts []ZonalShiftInResource + + noSmithyDocumentSerde +} + +// A practice run configuration for a resource includes the Amazon CloudWatch +// alarms that you've specified for a practice run, as well as any blocked dates or +// blocked windows for the practice run. You can update or delete a practice run +// configuration. Before you delete a practice run configuration, you must disable +// zonal autoshift for the resource. A practice run configuration is required when +// zonal autoshift is enabled. +type PracticeRunConfiguration struct { + + // The outcome alarm for practice runs is an alarm that you specify that ends a + // practice run when the alarm is in an ALARM state. + // + // This member is required. + OutcomeAlarms []ControlCondition + + // An array of one or more dates that you can specify when Amazon Web Services + // does not start practice runs for a resource. Specify blocked dates, in UTC, in + // the format YYYY-MM-DD , separated by spaces. + BlockedDates []string + + // An array of one or more windows of days and times that you can block Route 53 + // ARC from starting practice runs for a resource. Specify the blocked windows in + // UTC, using the format DAY:HH:MM-DAY:HH:MM , separated by spaces. For example, + // MON:18:30-MON:19:30 TUE:18:30-TUE:19:30 . + BlockedWindows []string + + // The blocking alarm for practice runs is an optional alarm that you can specify + // that blocks practice runs when the alarm is in an ALARM state. + BlockingAlarms []ControlCondition + noSmithyDocumentSerde } @@ -34,15 +195,26 @@ type ManagedResourceSummary struct { // their statuses for the resource. type ZonalShiftInResource struct { - // An appliedStatus for a zonal shift for a resource can have one of two values: - // APPLIED or NOT_APPLIED . + // The appliedStatus field specifies which application traffic shift is in effect + // for a resource when there is more than one traffic shift active. There can be + // more than one application traffic shift in progress at the same time - that is, + // practice run zonal shifts, customer-started zonal shifts, or an autoshift. The + // appliedStatus field for an autoshift for a resource can have one of two values: + // APPLIED or NOT_APPLIED . The zonal shift or autoshift that is currently in + // effect for the resource has an applied status set to APPLIED . The overall + // principle for precedence is that zonal shifts that you start as a customer take + // precedence autoshifts, which take precedence over practice runs. That is, + // customer-started zonal shifts > autoshifts > practice run zonal shifts. For more + // information, see How zonal autoshift and practice runs work (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.how-it-works.html) + // in the Amazon Route 53 Application Recovery Controller Developer Guide. // // This member is required. AppliedStatus AppliedStatus // The Availability Zone that traffic is moved away from for a resource when you // start a zonal shift. Until the zonal shift expires or you cancel it, traffic for - // the resource is instead moved to other Availability Zones in the AWS Region. + // the resource is instead moved to other Availability Zones in the Amazon Web + // Services Region. // // This member is required. AwayFrom *string @@ -54,15 +226,15 @@ type ZonalShiftInResource struct { // This member is required. Comment *string - // The expiry time (expiration time) for the zonal shift. A zonal shift is - // temporary and must be set to expire when you start the zonal shift. You can - // initially set a zonal shift to expire in a maximum of three days (72 hours). + // The expiry time (expiration time) for a customer-started zonal shift. A zonal + // shift is temporary and must be set to expire when you start the zonal shift. You + // can initially set a zonal shift to expire in a maximum of three days (72 hours). // However, you can update a zonal shift to set a new expiration at any time. When // you start a zonal shift, you specify how long you want it to be active, which // Route 53 ARC converts to an expiry time (expiration time). You can cancel a - // zonal shift, for example, if you're ready to restore traffic to the Availability - // Zone. Or you can update the zonal shift to specify another length of time to - // expire in. + // zonal shift when you're ready to restore traffic to the Availability Zone, or + // just wait for it to expire. Or you can update the zonal shift to specify another + // length of time to expire in. // // This member is required. ExpiryTime *time.Time @@ -75,7 +247,7 @@ type ZonalShiftInResource struct { // This member is required. ResourceIdentifier *string - // The time (UTC) when the zonal shift is started. + // The time (UTC) when the zonal shift starts. // // This member is required. StartTime *time.Time @@ -85,26 +257,40 @@ type ZonalShiftInResource struct { // This member is required. ZonalShiftId *string + // The outcome, or end state, returned for a practice run. The following values + // can be returned: + // - PENDING: Outcome value when a practice run is in progress. + // - SUCCEEDED: Outcome value when the outcome alarm specified for the practice + // run configuration does not go into an ALARM state during the practice run, and + // the practice run was not interrupted before it completed the expected 30 minute + // zonal shift. + // - INTERRUPTED: Outcome value when the practice run was stopped before the + // expected 30 minute zonal shift duration, or there was another problem with the + // practice run that created an inconclusive outcome. + // - FAILED: Outcome value when the outcome alarm specified for the practice run + // configuration goes into an ALARM state during the practice run, and the + // practice run was not interrupted before it completed. + // For more information about practice run outcomes, see Considerations when you + // configure zonal autoshift (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.configure.html) + // in the Amazon Route 53 Application Recovery Controller Developer Guide. + PracticeRunOutcome PracticeRunOutcome + noSmithyDocumentSerde } -// You start a zonal shift to temporarily move load balancer traffic away from an -// Availability Zone in a AWS Region. A zonal shift helps your application recover -// immediately, for example, from a developer's bad code deployment or from an AWS -// infrastructure failure in a single Availability Zone. You can start a zonal -// shift in Route 53 ARC only for managed resources in your account in an AWS -// Region. Supported AWS resources are automatically registered with Route 53 ARC. -// Zonal shifts are temporary. A zonal shift can be active for up to three days (72 -// hours). When you start a zonal shift, you specify how long you want it to be -// active, which Amazon Route 53 Application Recovery Controller converts to an -// expiry time (expiration time). You can cancel a zonal shift, for example, if -// you're ready to restore traffic to the Availability Zone. Or you can extend the -// zonal shift by updating the expiration so the zonal shift is active longer. +// Lists information about zonal shifts in Amazon Route 53 Application Recovery +// Controller, including zonal shifts that you start yourself and zonal shifts that +// Route 53 ARC starts on your behalf for practice runs with zonal autoshift. Zonal +// shifts are temporary, including customer-started zonal shifts and the zonal +// autoshift practice run zonal shifts that Route 53 ARC starts weekly, on your +// behalf. A zonal shift that a customer starts can be active for up to three days +// (72 hours). A practice run zonal shift has a 30 minute duration. type ZonalShiftSummary struct { // The Availability Zone that traffic is moved away from for a resource when you // start a zonal shift. Until the zonal shift expires or you cancel it, traffic for - // the resource is instead moved to other Availability Zones in the AWS Region. + // the resource is instead moved to other Availability Zones in the Amazon Web + // Services Region. // // This member is required. AwayFrom *string @@ -116,15 +302,15 @@ type ZonalShiftSummary struct { // This member is required. Comment *string - // The expiry time (expiration time) for the zonal shift. A zonal shift is - // temporary and must be set to expire when you start the zonal shift. You can - // initially set a zonal shift to expire in a maximum of three days (72 hours). + // The expiry time (expiration time) for a customer-started zonal shift. A zonal + // shift is temporary and must be set to expire when you start the zonal shift. You + // can initially set a zonal shift to expire in a maximum of three days (72 hours). // However, you can update a zonal shift to set a new expiration at any time. When // you start a zonal shift, you specify how long you want it to be active, which // Route 53 ARC converts to an expiry time (expiration time). You can cancel a - // zonal shift, for example, if you're ready to restore traffic to the Availability - // Zone. Or you can update the zonal shift to specify another length of time to - // expire in. + // zonal shift when you're ready to restore traffic to the Availability Zone, or + // just wait for it to expire. Or you can update the zonal shift to specify another + // length of time to expire in. // // This member is required. ExpiryTime *time.Time @@ -137,14 +323,14 @@ type ZonalShiftSummary struct { // This member is required. ResourceIdentifier *string - // The time (UTC) when the zonal shift is started. + // The time (UTC) when the zonal shift starts. // // This member is required. StartTime *time.Time // A status for a zonal shift. The Status for a zonal shift can have one of the // following values: - // - ACTIVE: The zonal shift is started and active. + // - ACTIVE: The zonal shift has been started and active. // - EXPIRED: The zonal shift has expired (the expiry time was exceeded). // - CANCELED: The zonal shift was canceled. // @@ -156,6 +342,23 @@ type ZonalShiftSummary struct { // This member is required. ZonalShiftId *string + // The outcome, or end state, of a practice run. The following values can be + // returned: + // - PENDING: Outcome value when the practice run is in progress. + // - SUCCEEDED: Outcome value when the outcome alarm specified for the practice + // run configuration does not go into an ALARM state during the practice run, and + // the practice run was not interrupted before it completed. + // - INTERRUPTED: Outcome value when the practice run did not run for the + // expected 30 minutes or there was another problem with the practice run that + // created an inconclusive outcome. + // - FAILED: Outcome value when the outcome alarm specified for the practice run + // configuration goes into an ALARM state during the practice run, and the + // practice run was not interrupted before it completed. + // For more information about practice run outcomes, see Considerations when you + // configure zonal autoshift (https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.configure.html) + // in the Amazon Route 53 Application Recovery Controller Developer Guide. + PracticeRunOutcome PracticeRunOutcome + noSmithyDocumentSerde } diff --git a/service/arczonalshift/validators.go b/service/arczonalshift/validators.go index 6aa30cd7ebe..e4086034975 100644 --- a/service/arczonalshift/validators.go +++ b/service/arczonalshift/validators.go @@ -5,6 +5,7 @@ package arczonalshift import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/arczonalshift/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) @@ -29,6 +30,46 @@ func (m *validateOpCancelZonalShift) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpCreatePracticeRunConfiguration struct { +} + +func (*validateOpCreatePracticeRunConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePracticeRunConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePracticeRunConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePracticeRunConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeletePracticeRunConfiguration struct { +} + +func (*validateOpDeletePracticeRunConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePracticeRunConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePracticeRunConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePracticeRunConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetManagedResource struct { } @@ -69,6 +110,46 @@ func (m *validateOpStartZonalShift) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpUpdatePracticeRunConfiguration struct { +} + +func (*validateOpUpdatePracticeRunConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdatePracticeRunConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdatePracticeRunConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdatePracticeRunConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateZonalAutoshiftConfiguration struct { +} + +func (*validateOpUpdateZonalAutoshiftConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateZonalAutoshiftConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateZonalAutoshiftConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateZonalAutoshiftConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateZonalShift struct { } @@ -93,6 +174,14 @@ func addOpCancelZonalShiftValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelZonalShift{}, middleware.After) } +func addOpCreatePracticeRunConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePracticeRunConfiguration{}, middleware.After) +} + +func addOpDeletePracticeRunConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePracticeRunConfiguration{}, middleware.After) +} + func addOpGetManagedResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetManagedResource{}, middleware.After) } @@ -101,10 +190,53 @@ func addOpStartZonalShiftValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartZonalShift{}, middleware.After) } +func addOpUpdatePracticeRunConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdatePracticeRunConfiguration{}, middleware.After) +} + +func addOpUpdateZonalAutoshiftConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateZonalAutoshiftConfiguration{}, middleware.After) +} + func addOpUpdateZonalShiftValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateZonalShift{}, middleware.After) } +func validateControlCondition(v *types.ControlCondition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ControlCondition"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.AlarmIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("AlarmIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateControlConditions(v []types.ControlCondition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ControlConditions"} + for i := range v { + if err := validateControlCondition(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelZonalShiftInput(v *CancelZonalShiftInput) error { if v == nil { return nil @@ -120,6 +252,48 @@ func validateOpCancelZonalShiftInput(v *CancelZonalShiftInput) error { } } +func validateOpCreatePracticeRunConfigurationInput(v *CreatePracticeRunConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePracticeRunConfigurationInput"} + if v.ResourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) + } + if v.BlockingAlarms != nil { + if err := validateControlConditions(v.BlockingAlarms); err != nil { + invalidParams.AddNested("BlockingAlarms", err.(smithy.InvalidParamsError)) + } + } + if v.OutcomeAlarms == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutcomeAlarms")) + } else if v.OutcomeAlarms != nil { + if err := validateControlConditions(v.OutcomeAlarms); err != nil { + invalidParams.AddNested("OutcomeAlarms", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeletePracticeRunConfigurationInput(v *DeletePracticeRunConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePracticeRunConfigurationInput"} + if v.ResourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetManagedResourceInput(v *GetManagedResourceInput) error { if v == nil { return nil @@ -159,6 +333,49 @@ func validateOpStartZonalShiftInput(v *StartZonalShiftInput) error { } } +func validateOpUpdatePracticeRunConfigurationInput(v *UpdatePracticeRunConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdatePracticeRunConfigurationInput"} + if v.ResourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) + } + if v.BlockingAlarms != nil { + if err := validateControlConditions(v.BlockingAlarms); err != nil { + invalidParams.AddNested("BlockingAlarms", err.(smithy.InvalidParamsError)) + } + } + if v.OutcomeAlarms != nil { + if err := validateControlConditions(v.OutcomeAlarms); err != nil { + invalidParams.AddNested("OutcomeAlarms", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateZonalAutoshiftConfigurationInput(v *UpdateZonalAutoshiftConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateZonalAutoshiftConfigurationInput"} + if v.ResourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) + } + if len(v.ZonalAutoshiftStatus) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ZonalAutoshiftStatus")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateZonalShiftInput(v *UpdateZonalShiftInput) error { if v == nil { return nil diff --git a/service/glue/api_op_GetDataQualityResult.go b/service/glue/api_op_GetDataQualityResult.go index 9f09194658f..0c03ae9840e 100644 --- a/service/glue/api_op_GetDataQualityResult.go +++ b/service/glue/api_op_GetDataQualityResult.go @@ -41,6 +41,10 @@ type GetDataQualityResultInput struct { type GetDataQualityResultOutput struct { + // A list of DataQualityAnalyzerResult objects representing the results for each + // analyzer. + AnalyzerResults []types.DataQualityAnalyzerResult + // The date and time when the run for this data quality result was completed. CompletedOn *time.Time @@ -58,6 +62,10 @@ type GetDataQualityResultOutput struct { // The job run ID associated with the data quality result, if any. JobRunId *string + // A list of DataQualityObservation objects representing the observations + // generated after evaluating the rules and analyzers. + Observations []types.DataQualityObservation + // A unique result ID for the data quality result. ResultId *string diff --git a/service/glue/deserializers.go b/service/glue/deserializers.go index b70e899552c..759e937f13a 100644 --- a/service/glue/deserializers.go +++ b/service/glue/deserializers.go @@ -34551,6 +34551,103 @@ func awsAwsjson11_deserializeDocumentDataLakePrincipal(v **types.DataLakePrincip return nil } +func awsAwsjson11_deserializeDocumentDataQualityAnalyzerResult(v **types.DataQualityAnalyzerResult, 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.DataQualityAnalyzerResult + if *v == nil { + sv = &types.DataQualityAnalyzerResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataQualityRuleResultDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "EvaluatedMetrics": + if err := awsAwsjson11_deserializeDocumentEvaluatedMetricsMap(&sv.EvaluatedMetrics, value); err != nil { + return err + } + + case "EvaluationMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataQualityRuleResultDescription to be of type string, got %T instead", value) + } + sv.EvaluationMessage = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataQualityAnalyzerResults(v *[]types.DataQualityAnalyzerResult, 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.DataQualityAnalyzerResult + if *v == nil { + cv = []types.DataQualityAnalyzerResult{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataQualityAnalyzerResult + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDataQualityAnalyzerResult(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentDataQualityEvaluationRunAdditionalRunOptions(v **types.DataQualityEvaluationRunAdditionalRunOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34600,6 +34697,252 @@ func awsAwsjson11_deserializeDocumentDataQualityEvaluationRunAdditionalRunOption return nil } +func awsAwsjson11_deserializeDocumentDataQualityMetricValues(v **types.DataQualityMetricValues, 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.DataQualityMetricValues + if *v == nil { + sv = &types.DataQualityMetricValues{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActualValue": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ActualValue = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ActualValue = ptr.Float64(f64) + + default: + return fmt.Errorf("expected NullableDouble to be a JSON Number, got %T instead", value) + + } + } + + case "ExpectedValue": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ExpectedValue = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ExpectedValue = ptr.Float64(f64) + + default: + return fmt.Errorf("expected NullableDouble to be a JSON Number, got %T instead", value) + + } + } + + case "LowerLimit": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LowerLimit = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LowerLimit = ptr.Float64(f64) + + default: + return fmt.Errorf("expected NullableDouble to be a JSON Number, got %T instead", value) + + } + } + + case "UpperLimit": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpperLimit = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.UpperLimit = ptr.Float64(f64) + + default: + return fmt.Errorf("expected NullableDouble to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataQualityObservation(v **types.DataQualityObservation, 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.DataQualityObservation + if *v == nil { + sv = &types.DataQualityObservation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataQualityObservationDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "MetricBasedObservation": + if err := awsAwsjson11_deserializeDocumentMetricBasedObservation(&sv.MetricBasedObservation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataQualityObservations(v *[]types.DataQualityObservation, 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.DataQualityObservation + if *v == nil { + cv = []types.DataQualityObservation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataQualityObservation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDataQualityObservation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentDataQualityResult(v **types.DataQualityResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -34622,6 +34965,11 @@ func awsAwsjson11_deserializeDocumentDataQualityResult(v **types.DataQualityResu for key, value := range shape { switch key { + case "AnalyzerResults": + if err := awsAwsjson11_deserializeDocumentDataQualityAnalyzerResults(&sv.AnalyzerResults, value); err != nil { + return err + } + case "CompletedOn": if value != nil { switch jtv := value.(type) { @@ -34670,6 +35018,11 @@ func awsAwsjson11_deserializeDocumentDataQualityResult(v **types.DataQualityResu sv.JobRunId = ptr.String(jtv) } + case "Observations": + if err := awsAwsjson11_deserializeDocumentDataQualityObservations(&sv.Observations, value); err != nil { + return err + } + case "ResultId": if value != nil { jtv, ok := value.(string) @@ -35110,7 +35463,7 @@ func awsAwsjson11_deserializeDocumentDataQualityRuleResult(v **types.DataQuality if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DescriptionString to be of type string, got %T instead", value) + return fmt.Errorf("expected DataQualityRuleResultDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -35124,7 +35477,7 @@ func awsAwsjson11_deserializeDocumentDataQualityRuleResult(v **types.DataQuality if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DescriptionString to be of type string, got %T instead", value) + return fmt.Errorf("expected DataQualityRuleResultDescription to be of type string, got %T instead", value) } sv.EvaluationMessage = ptr.String(jtv) } @@ -43591,6 +43944,56 @@ func awsAwsjson11_deserializeDocumentMetadataInfoMap(v *map[string]types.Metadat return nil } +func awsAwsjson11_deserializeDocumentMetricBasedObservation(v **types.MetricBasedObservation, 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.MetricBasedObservation + if *v == nil { + sv = &types.MetricBasedObservation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MetricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "MetricValues": + if err := awsAwsjson11_deserializeDocumentDataQualityMetricValues(&sv.MetricValues, value); err != nil { + return err + } + + case "NewRules": + if err := awsAwsjson11_deserializeDocumentNewRules(&sv.NewRules, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentMicrosoftSQLServerCatalogSource(v **types.MicrosoftSQLServerCatalogSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44287,6 +44690,42 @@ func awsAwsjson11_deserializeDocumentNameStringList(v *[]string, value interface return nil } +func awsAwsjson11_deserializeDocumentNewRules(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 NameString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentNode(v **types.Node, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -58219,6 +58658,11 @@ func awsAwsjson11_deserializeOpDocumentGetDataQualityResultOutput(v **GetDataQua for key, value := range shape { switch key { + case "AnalyzerResults": + if err := awsAwsjson11_deserializeDocumentDataQualityAnalyzerResults(&sv.AnalyzerResults, value); err != nil { + return err + } + case "CompletedOn": if value != nil { switch jtv := value.(type) { @@ -58267,6 +58711,11 @@ func awsAwsjson11_deserializeOpDocumentGetDataQualityResultOutput(v **GetDataQua sv.JobRunId = ptr.String(jtv) } + case "Observations": + if err := awsAwsjson11_deserializeDocumentDataQualityObservations(&sv.Observations, value); err != nil { + return err + } + case "ResultId": if value != nil { jtv, ok := value.(string) diff --git a/service/glue/types/types.go b/service/glue/types/types.go index 0c8361a16da..d67f3f84c38 100644 --- a/service/glue/types/types.go +++ b/service/glue/types/types.go @@ -2294,6 +2294,24 @@ type DataLakePrincipal struct { noSmithyDocumentSerde } +// Describes the result of the evaluation of a data quality analyzer. +type DataQualityAnalyzerResult struct { + + // A description of the data quality analyzer. + Description *string + + // A map of metrics associated with the evaluation of the analyzer. + EvaluatedMetrics map[string]float64 + + // An evaluation message. + EvaluationMessage *string + + // The name of the data quality analyzer. + Name *string + + noSmithyDocumentSerde +} + // Additional run options you can specify for an evaluation run. type DataQualityEvaluationRunAdditionalRunOptions struct { @@ -2306,9 +2324,48 @@ type DataQualityEvaluationRunAdditionalRunOptions struct { noSmithyDocumentSerde } +// Describes the data quality metric value according to the analysis of historical +// data. +type DataQualityMetricValues struct { + + // The actual value of the data quality metric. + ActualValue *float64 + + // The expected value of the data quality metric according to the analysis of + // historical data. + ExpectedValue *float64 + + // The lower limit of the data quality metric value according to the analysis of + // historical data. + LowerLimit *float64 + + // The upper limit of the data quality metric value according to the analysis of + // historical data. + UpperLimit *float64 + + noSmithyDocumentSerde +} + +// Describes the observation generated after evaluating the rules and analyzers. +type DataQualityObservation struct { + + // A description of the data quality observation. + Description *string + + // An object of type MetricBasedObservation representing the observation that is + // based on evaluated data quality metrics. + MetricBasedObservation *MetricBasedObservation + + noSmithyDocumentSerde +} + // Describes a data quality result. type DataQualityResult struct { + // A list of DataQualityAnalyzerResult objects representing the results for each + // analyzer. + AnalyzerResults []DataQualityAnalyzerResult + // The date and time when this data quality run completed. CompletedOn *time.Time @@ -2326,6 +2383,10 @@ type DataQualityResult struct { // The job run ID associated with the data quality result, if any. JobRunId *string + // A list of DataQualityObservation objects representing the observations + // generated after evaluating the rules and analyzers. + Observations []DataQualityObservation + // A unique result ID for the data quality result. ResultId *string @@ -5019,6 +5080,24 @@ type MetadataKeyValuePair struct { noSmithyDocumentSerde } +// Describes the metric based observation generated based on evaluated data +// quality metrics. +type MetricBasedObservation struct { + + // The name of the data quality metric used for generating the observation. + MetricName *string + + // An object of type DataQualityMetricValues representing the analysis of the data + // quality metric value. + MetricValues *DataQualityMetricValues + + // A list of new data quality rules generated as part of the observation based on + // the data quality metric value. + NewRules []string + + noSmithyDocumentSerde +} + // Specifies a Microsoft SQL server data source in the Glue Data Catalog. type MicrosoftSQLServerCatalogSource struct { diff --git a/service/sagemaker/api_op_CreateAppImageConfig.go b/service/sagemaker/api_op_CreateAppImageConfig.go index 25fe2f828e3..0623d759c25 100644 --- a/service/sagemaker/api_op_CreateAppImageConfig.go +++ b/service/sagemaker/api_op_CreateAppImageConfig.go @@ -37,6 +37,11 @@ type CreateAppImageConfigInput struct { // This member is required. AppImageConfigName *string + // The JupyterLabAppImageConfig . You can only specify one image kernel in the + // AppImageConfig API. This kernel is shown to users before the image starts. After + // the image runs, all kernels are visible in JupyterLab. + JupyterLabAppImageConfig *types.JupyterLabAppImageConfig + // The KernelGatewayImageConfig. You can only specify one image kernel in the // AppImageConfig API. This kernel will be shown to users before the image starts. // Once the image runs, all kernels are visible in JupyterLab. diff --git a/service/sagemaker/api_op_CreateSpace.go b/service/sagemaker/api_op_CreateSpace.go index 7f9a00b935e..da34d3c3d1b 100644 --- a/service/sagemaker/api_op_CreateSpace.go +++ b/service/sagemaker/api_op_CreateSpace.go @@ -40,9 +40,18 @@ type CreateSpaceInput struct { // This member is required. SpaceName *string + // A collection of ownership settings. + OwnershipSettings *types.OwnershipSettings + + // The name of the space that appears in the SageMaker Studio UI. + SpaceDisplayName *string + // A collection of space settings. SpaceSettings *types.SpaceSettings + // A collection of space sharing settings. + SpaceSharingSettings *types.SpaceSharingSettings + // Tags to associated with the space. Each tag consists of a key and an optional // value. Tag keys must be unique for each resource. Tags are searchable using the // Search API. diff --git a/service/sagemaker/api_op_DescribeAppImageConfig.go b/service/sagemaker/api_op_DescribeAppImageConfig.go index 2bfa694b635..c308999f3e5 100644 --- a/service/sagemaker/api_op_DescribeAppImageConfig.go +++ b/service/sagemaker/api_op_DescribeAppImageConfig.go @@ -50,6 +50,9 @@ type DescribeAppImageConfigOutput struct { // When the AppImageConfig was created. CreationTime *time.Time + // The configuration of the JupyterLab app. + JupyterLabAppImageConfig *types.JupyterLabAppImageConfig + // The configuration of a KernelGateway app. KernelGatewayImageConfig *types.KernelGatewayImageConfig diff --git a/service/sagemaker/api_op_DescribeSpace.go b/service/sagemaker/api_op_DescribeSpace.go index dc05bc0836c..900876b924e 100644 --- a/service/sagemaker/api_op_DescribeSpace.go +++ b/service/sagemaker/api_op_DescribeSpace.go @@ -61,15 +61,24 @@ type DescribeSpaceOutput struct { // The last modified time. LastModifiedTime *time.Time + // The collection of ownership settings for a space. + OwnershipSettings *types.OwnershipSettings + // The space's Amazon Resource Name (ARN). SpaceArn *string + // The name of the space that appears in the Amazon SageMaker Studio UI. + SpaceDisplayName *string + // The name of the space. SpaceName *string // A collection of space settings. SpaceSettings *types.SpaceSettings + // The collection of space sharing settings for a space. + SpaceSharingSettings *types.SpaceSharingSettings + // The status. Status types.SpaceStatus diff --git a/service/sagemaker/api_op_UpdateAppImageConfig.go b/service/sagemaker/api_op_UpdateAppImageConfig.go index 69af10954b0..39c35855076 100644 --- a/service/sagemaker/api_op_UpdateAppImageConfig.go +++ b/service/sagemaker/api_op_UpdateAppImageConfig.go @@ -35,6 +35,9 @@ type UpdateAppImageConfigInput struct { // This member is required. AppImageConfigName *string + // The JupyterLab app running on the image. + JupyterLabAppImageConfig *types.JupyterLabAppImageConfig + // The new KernelGateway app to run on the image. KernelGatewayImageConfig *types.KernelGatewayImageConfig diff --git a/service/sagemaker/api_op_UpdateSpace.go b/service/sagemaker/api_op_UpdateSpace.go index aad622ef7a5..52cbcde8461 100644 --- a/service/sagemaker/api_op_UpdateSpace.go +++ b/service/sagemaker/api_op_UpdateSpace.go @@ -40,6 +40,9 @@ type UpdateSpaceInput struct { // This member is required. SpaceName *string + // The name of the space that appears in the Amazon SageMaker Studio UI. + SpaceDisplayName *string + // A collection of space settings. SpaceSettings *types.SpaceSettings diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 69df863e98b..f450179b6f8 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -35294,6 +35294,11 @@ func awsAwsjson11_deserializeDocumentAppDetails(v **types.AppDetails, value inte sv.DomainId = ptr.String(jtv) } + case "ResourceSpec": + if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.ResourceSpec, value); err != nil { + return err + } + case "SpaceName": if value != nil { jtv, ok := value.(string) @@ -35386,6 +35391,11 @@ func awsAwsjson11_deserializeDocumentAppImageConfigDetails(v **types.AppImageCon } } + case "JupyterLabAppImageConfig": + if err := awsAwsjson11_deserializeDocumentJupyterLabAppImageConfig(&sv.JupyterLabAppImageConfig, value); err != nil { + return err + } + case "KernelGatewayImageConfig": if err := awsAwsjson11_deserializeDocumentKernelGatewayImageConfig(&sv.KernelGatewayImageConfig, value); err != nil { return err @@ -40812,6 +40822,47 @@ func awsAwsjson11_deserializeDocumentClusterSummary(v **types.ClusterSummary, va return nil } +func awsAwsjson11_deserializeDocumentCodeEditorAppSettings(v **types.CodeEditorAppSettings, 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.CodeEditorAppSettings + if *v == nil { + sv = &types.CodeEditorAppSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultResourceSpec": + if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil { + return err + } + + case "LifecycleConfigArns": + if err := awsAwsjson11_deserializeDocumentLifecycleConfigArns(&sv.LifecycleConfigArns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentCodeRepositories(v *[]types.CodeRepository, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -41612,6 +41663,52 @@ func awsAwsjson11_deserializeDocumentContainerArguments(v *[]string, value inter return nil } +func awsAwsjson11_deserializeDocumentContainerConfig(v **types.ContainerConfig, 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.ContainerConfig + if *v == nil { + sv = &types.ContainerConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerArguments": + if err := awsAwsjson11_deserializeDocumentCustomImageContainerArguments(&sv.ContainerArguments, value); err != nil { + return err + } + + case "ContainerEntrypoint": + if err := awsAwsjson11_deserializeDocumentCustomImageContainerEntrypoint(&sv.ContainerEntrypoint, value); err != nil { + return err + } + + case "ContainerEnvironmentVariables": + if err := awsAwsjson11_deserializeDocumentCustomImageContainerEnvironmentVariables(&sv.ContainerEnvironmentVariables, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentContainerDefinition(v **types.ContainerDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42308,6 +42405,150 @@ func awsAwsjson11_deserializeDocumentCustomerMetadataMap(v *map[string]string, v return nil } +func awsAwsjson11_deserializeDocumentCustomFileSystem(v *types.CustomFileSystem, 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.CustomFileSystem +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "EFSFileSystem": + var mv types.EFSFileSystem + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentEFSFileSystem(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.CustomFileSystemMemberEFSFileSystem{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson11_deserializeDocumentCustomFileSystemConfig(v *types.CustomFileSystemConfig, 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.CustomFileSystemConfig +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "EFSFileSystemConfig": + var mv types.EFSFileSystemConfig + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentEFSFileSystemConfig(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.CustomFileSystemConfigMemberEFSFileSystemConfig{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson11_deserializeDocumentCustomFileSystemConfigs(v *[]types.CustomFileSystemConfig, 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.CustomFileSystemConfig + if *v == nil { + cv = []types.CustomFileSystemConfig{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CustomFileSystemConfig + if err := awsAwsjson11_deserializeDocumentCustomFileSystemConfig(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCustomFileSystems(v *[]types.CustomFileSystem, 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.CustomFileSystem + if *v == nil { + cv = []types.CustomFileSystem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CustomFileSystem + if err := awsAwsjson11_deserializeDocumentCustomFileSystem(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentCustomImage(v **types.CustomImage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42370,6 +42611,114 @@ func awsAwsjson11_deserializeDocumentCustomImage(v **types.CustomImage, value in return nil } +func awsAwsjson11_deserializeDocumentCustomImageContainerArguments(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 NonEmptyString64 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCustomImageContainerEntrypoint(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 NonEmptyString256 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCustomImageContainerEnvironmentVariables(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 String256 to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsAwsjson11_deserializeDocumentCustomImages(v *[]types.CustomImage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -42462,6 +42811,63 @@ func awsAwsjson11_deserializeDocumentCustomizedMetricSpecification(v **types.Cus return nil } +func awsAwsjson11_deserializeDocumentCustomPosixUserConfig(v **types.CustomPosixUserConfig, 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.CustomPosixUserConfig + if *v == nil { + sv = &types.CustomPosixUserConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Gid": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Gid to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Gid = ptr.Int64(i64) + } + + case "Uid": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Uid to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Uid = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentDataCaptureConfig(v **types.DataCaptureConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -43316,6 +43722,63 @@ func awsAwsjson11_deserializeDocumentDebugRuleEvaluationStatuses(v *[]types.Debu return nil } +func awsAwsjson11_deserializeDocumentDefaultEbsStorageSettings(v **types.DefaultEbsStorageSettings, 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.DefaultEbsStorageSettings + if *v == nil { + sv = &types.DefaultEbsStorageSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultEbsVolumeSizeInGb": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SpaceEbsVolumeSizeInGb to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DefaultEbsVolumeSizeInGb = ptr.Int32(int32(i64)) + } + + case "MaximumEbsVolumeSizeInGb": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SpaceEbsVolumeSizeInGb to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumEbsVolumeSizeInGb = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentDefaultSpaceSettings(v **types.DefaultSpaceSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -43371,6 +43834,42 @@ func awsAwsjson11_deserializeDocumentDefaultSpaceSettings(v **types.DefaultSpace return nil } +func awsAwsjson11_deserializeDocumentDefaultSpaceStorageSettings(v **types.DefaultSpaceStorageSettings, 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.DefaultSpaceStorageSettings + if *v == nil { + sv = &types.DefaultSpaceStorageSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultEbsStorageSettings": + if err := awsAwsjson11_deserializeDocumentDefaultEbsStorageSettings(&sv.DefaultEbsStorageSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentDeployedImage(v **types.DeployedImage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44868,6 +45367,50 @@ func awsAwsjson11_deserializeDocumentDynamicScalingConfiguration(v **types.Dynam return nil } +func awsAwsjson11_deserializeDocumentEbsStorageSettings(v **types.EbsStorageSettings, 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.EbsStorageSettings + if *v == nil { + sv = &types.EbsStorageSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EbsVolumeSizeInGb": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SpaceEbsVolumeSizeInGb to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EbsVolumeSizeInGb = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentEdge(v **types.Edge, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -45968,6 +46511,95 @@ func awsAwsjson11_deserializeDocumentEdges(v *[]types.Edge, value interface{}) e return nil } +func awsAwsjson11_deserializeDocumentEFSFileSystem(v **types.EFSFileSystem, 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.EFSFileSystem + if *v == nil { + sv = &types.EFSFileSystem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEFSFileSystemConfig(v **types.EFSFileSystemConfig, 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.EFSFileSystemConfig + if *v == nil { + sv = &types.EFSFileSystemConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "FileSystemPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemPath to be of type string, got %T instead", value) + } + sv.FileSystemPath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentEMRStepMetadata(v **types.EMRStepMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -54036,6 +54668,93 @@ func awsAwsjson11_deserializeDocumentJsonContentTypes(v *[]string, value interfa return nil } +func awsAwsjson11_deserializeDocumentJupyterLabAppImageConfig(v **types.JupyterLabAppImageConfig, 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.JupyterLabAppImageConfig + if *v == nil { + sv = &types.JupyterLabAppImageConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerConfig": + if err := awsAwsjson11_deserializeDocumentContainerConfig(&sv.ContainerConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentJupyterLabAppSettings(v **types.JupyterLabAppSettings, 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.JupyterLabAppSettings + if *v == nil { + sv = &types.JupyterLabAppSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeRepositories": + if err := awsAwsjson11_deserializeDocumentCodeRepositories(&sv.CodeRepositories, value); err != nil { + return err + } + + case "CustomImages": + if err := awsAwsjson11_deserializeDocumentCustomImages(&sv.CustomImages, value); err != nil { + return err + } + + case "DefaultResourceSpec": + if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil { + return err + } + + case "LifecycleConfigArns": + if err := awsAwsjson11_deserializeDocumentLifecycleConfigArns(&sv.LifecycleConfigArns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentJupyterServerAppSettings(v **types.JupyterServerAppSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -63161,6 +63880,86 @@ func awsAwsjson11_deserializeDocumentOutputParameterList(v *[]types.OutputParame return nil } +func awsAwsjson11_deserializeDocumentOwnershipSettings(v **types.OwnershipSettings, 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.OwnershipSettings + if *v == nil { + sv = &types.OwnershipSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OwnerUserProfileName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value) + } + sv.OwnerUserProfileName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOwnershipSettingsSummary(v **types.OwnershipSettingsSummary, 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.OwnershipSettingsSummary + if *v == nil { + sv = &types.OwnershipSettingsSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OwnerUserProfileName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value) + } + sv.OwnerUserProfileName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentParallelismConfiguration(v **types.ParallelismConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -71241,6 +72040,42 @@ func awsAwsjson11_deserializeDocumentSourceIpConfig(v **types.SourceIpConfig, va return nil } +func awsAwsjson11_deserializeDocumentSpaceCodeEditorAppSettings(v **types.SpaceCodeEditorAppSettings, 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.SpaceCodeEditorAppSettings + if *v == nil { + sv = &types.SpaceCodeEditorAppSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultResourceSpec": + if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentSpaceDetails(v **types.SpaceDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -71304,6 +72139,20 @@ func awsAwsjson11_deserializeDocumentSpaceDetails(v **types.SpaceDetails, value } } + case "OwnershipSettingsSummary": + if err := awsAwsjson11_deserializeDocumentOwnershipSettingsSummary(&sv.OwnershipSettingsSummary, value); err != nil { + return err + } + + case "SpaceDisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString64 to be of type string, got %T instead", value) + } + sv.SpaceDisplayName = ptr.String(jtv) + } + case "SpaceName": if value != nil { jtv, ok := value.(string) @@ -71313,6 +72162,16 @@ func awsAwsjson11_deserializeDocumentSpaceDetails(v **types.SpaceDetails, value sv.SpaceName = ptr.String(jtv) } + case "SpaceSettingsSummary": + if err := awsAwsjson11_deserializeDocumentSpaceSettingsSummary(&sv.SpaceSettingsSummary, value); err != nil { + return err + } + + case "SpaceSharingSettingsSummary": + if err := awsAwsjson11_deserializeDocumentSpaceSharingSettingsSummary(&sv.SpaceSharingSettingsSummary, value); err != nil { + return err + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -71331,6 +72190,47 @@ func awsAwsjson11_deserializeDocumentSpaceDetails(v **types.SpaceDetails, value return nil } +func awsAwsjson11_deserializeDocumentSpaceJupyterLabAppSettings(v **types.SpaceJupyterLabAppSettings, 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.SpaceJupyterLabAppSettings + if *v == nil { + sv = &types.SpaceJupyterLabAppSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeRepositories": + if err := awsAwsjson11_deserializeDocumentCodeRepositories(&sv.CodeRepositories, value); err != nil { + return err + } + + case "DefaultResourceSpec": + if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentSpaceList(v *[]types.SpaceDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -71387,6 +72287,30 @@ func awsAwsjson11_deserializeDocumentSpaceSettings(v **types.SpaceSettings, valu for key, value := range shape { switch key { + case "AppType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppType to be of type string, got %T instead", value) + } + sv.AppType = types.AppType(jtv) + } + + case "CodeEditorAppSettings": + if err := awsAwsjson11_deserializeDocumentSpaceCodeEditorAppSettings(&sv.CodeEditorAppSettings, value); err != nil { + return err + } + + case "CustomFileSystems": + if err := awsAwsjson11_deserializeDocumentCustomFileSystems(&sv.CustomFileSystems, value); err != nil { + return err + } + + case "JupyterLabAppSettings": + if err := awsAwsjson11_deserializeDocumentSpaceJupyterLabAppSettings(&sv.JupyterLabAppSettings, value); err != nil { + return err + } + case "JupyterServerAppSettings": if err := awsAwsjson11_deserializeDocumentJupyterServerAppSettings(&sv.JupyterServerAppSettings, value); err != nil { return err @@ -71397,6 +72321,172 @@ func awsAwsjson11_deserializeDocumentSpaceSettings(v **types.SpaceSettings, valu return err } + case "SpaceStorageSettings": + if err := awsAwsjson11_deserializeDocumentSpaceStorageSettings(&sv.SpaceStorageSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSpaceSettingsSummary(v **types.SpaceSettingsSummary, 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.SpaceSettingsSummary + if *v == nil { + sv = &types.SpaceSettingsSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AppType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AppType to be of type string, got %T instead", value) + } + sv.AppType = types.AppType(jtv) + } + + case "SpaceStorageSettings": + if err := awsAwsjson11_deserializeDocumentSpaceStorageSettings(&sv.SpaceStorageSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSpaceSharingSettings(v **types.SpaceSharingSettings, 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.SpaceSharingSettings + if *v == nil { + sv = &types.SpaceSharingSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SharingType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SharingType to be of type string, got %T instead", value) + } + sv.SharingType = types.SharingType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSpaceSharingSettingsSummary(v **types.SpaceSharingSettingsSummary, 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.SpaceSharingSettingsSummary + if *v == nil { + sv = &types.SpaceSharingSettingsSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SharingType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SharingType to be of type string, got %T instead", value) + } + sv.SharingType = types.SharingType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSpaceStorageSettings(v **types.SpaceStorageSettings, 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.SpaceStorageSettings + if *v == nil { + sv = &types.SpaceStorageSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EbsStorageSettings": + if err := awsAwsjson11_deserializeDocumentEbsStorageSettings(&sv.EbsStorageSettings, value); err != nil { + return err + } + default: _, _ = key, value @@ -76662,6 +77752,21 @@ func awsAwsjson11_deserializeDocumentUserSettings(v **types.UserSettings, value return err } + case "CodeEditorAppSettings": + if err := awsAwsjson11_deserializeDocumentCodeEditorAppSettings(&sv.CodeEditorAppSettings, value); err != nil { + return err + } + + case "CustomFileSystemConfigs": + if err := awsAwsjson11_deserializeDocumentCustomFileSystemConfigs(&sv.CustomFileSystemConfigs, value); err != nil { + return err + } + + case "CustomPosixUserConfig": + if err := awsAwsjson11_deserializeDocumentCustomPosixUserConfig(&sv.CustomPosixUserConfig, value); err != nil { + return err + } + case "DefaultLandingUri": if value != nil { jtv, ok := value.(string) @@ -76680,6 +77785,11 @@ func awsAwsjson11_deserializeDocumentUserSettings(v **types.UserSettings, value sv.ExecutionRole = ptr.String(jtv) } + case "JupyterLabAppSettings": + if err := awsAwsjson11_deserializeDocumentJupyterLabAppSettings(&sv.JupyterLabAppSettings, value); err != nil { + return err + } + case "JupyterServerAppSettings": if err := awsAwsjson11_deserializeDocumentJupyterServerAppSettings(&sv.JupyterServerAppSettings, value); err != nil { return err @@ -76710,6 +77820,11 @@ func awsAwsjson11_deserializeDocumentUserSettings(v **types.UserSettings, value return err } + case "SpaceStorageSettings": + if err := awsAwsjson11_deserializeDocumentDefaultSpaceStorageSettings(&sv.SpaceStorageSettings, value); err != nil { + return err + } + case "StudioWebPortal": if value != nil { jtv, ok := value.(string) @@ -80774,6 +81889,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeAppImageConfigOutput(v **Describe } } + case "JupyterLabAppImageConfig": + if err := awsAwsjson11_deserializeDocumentJupyterLabAppImageConfig(&sv.JupyterLabAppImageConfig, value); err != nil { + return err + } + case "KernelGatewayImageConfig": if err := awsAwsjson11_deserializeDocumentKernelGatewayImageConfig(&sv.KernelGatewayImageConfig, value); err != nil { return err @@ -87607,6 +88727,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeSpaceOutput(v **DescribeSpaceOutp } } + case "OwnershipSettings": + if err := awsAwsjson11_deserializeDocumentOwnershipSettings(&sv.OwnershipSettings, value); err != nil { + return err + } + case "SpaceArn": if value != nil { jtv, ok := value.(string) @@ -87616,6 +88741,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeSpaceOutput(v **DescribeSpaceOutp sv.SpaceArn = ptr.String(jtv) } + case "SpaceDisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString64 to be of type string, got %T instead", value) + } + sv.SpaceDisplayName = ptr.String(jtv) + } + case "SpaceName": if value != nil { jtv, ok := value.(string) @@ -87630,6 +88764,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeSpaceOutput(v **DescribeSpaceOutp return err } + case "SpaceSharingSettings": + if err := awsAwsjson11_deserializeDocumentSpaceSharingSettings(&sv.SpaceSharingSettings, value); err != nil { + return err + } + case "Status": if value != nil { jtv, ok := value.(string) diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 50a22bae210..fe0a8886571 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -19166,6 +19166,27 @@ func awsAwsjson11_serializeDocumentClusterLifeCycleConfig(v *types.ClusterLifeCy return nil } +func awsAwsjson11_serializeDocumentCodeEditorAppSettings(v *types.CodeEditorAppSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultResourceSpec != nil { + ok := object.Key("DefaultResourceSpec") + if err := awsAwsjson11_serializeDocumentResourceSpec(v.DefaultResourceSpec, ok); err != nil { + return err + } + } + + if v.LifecycleConfigArns != nil { + ok := object.Key("LifecycleConfigArns") + if err := awsAwsjson11_serializeDocumentLifecycleConfigArns(v.LifecycleConfigArns, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentCodeRepositories(v []types.CodeRepository, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -19313,6 +19334,34 @@ func awsAwsjson11_serializeDocumentContainerArguments(v []string, value smithyjs return nil } +func awsAwsjson11_serializeDocumentContainerConfig(v *types.ContainerConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContainerArguments != nil { + ok := object.Key("ContainerArguments") + if err := awsAwsjson11_serializeDocumentCustomImageContainerArguments(v.ContainerArguments, ok); err != nil { + return err + } + } + + if v.ContainerEntrypoint != nil { + ok := object.Key("ContainerEntrypoint") + if err := awsAwsjson11_serializeDocumentCustomImageContainerEntrypoint(v.ContainerEntrypoint, ok); err != nil { + return err + } + } + + if v.ContainerEnvironmentVariables != nil { + ok := object.Key("ContainerEnvironmentVariables") + if err := awsAwsjson11_serializeDocumentCustomImageContainerEnvironmentVariables(v.ContainerEnvironmentVariables, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentContainerDefinition(v *types.ContainerDefinition, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -19548,6 +19597,74 @@ func awsAwsjson11_serializeDocumentCustomerMetadataMap(v map[string]string, valu return nil } +func awsAwsjson11_serializeDocumentCustomFileSystem(v types.CustomFileSystem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.CustomFileSystemMemberEFSFileSystem: + av := object.Key("EFSFileSystem") + if err := awsAwsjson11_serializeDocumentEFSFileSystem(&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_serializeDocumentCustomFileSystemConfig(v types.CustomFileSystemConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.CustomFileSystemConfigMemberEFSFileSystemConfig: + av := object.Key("EFSFileSystemConfig") + if err := awsAwsjson11_serializeDocumentEFSFileSystemConfig(&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_serializeDocumentCustomFileSystemConfigs(v []types.CustomFileSystemConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentCustomFileSystemConfig(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentCustomFileSystems(v []types.CustomFileSystem, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentCustomFileSystem(v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentCustomImage(v *types.CustomImage, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -19570,6 +19687,39 @@ func awsAwsjson11_serializeDocumentCustomImage(v *types.CustomImage, value smith return nil } +func awsAwsjson11_serializeDocumentCustomImageContainerArguments(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_serializeDocumentCustomImageContainerEntrypoint(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_serializeDocumentCustomImageContainerEnvironmentVariables(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsAwsjson11_serializeDocumentCustomImages(v []types.CustomImage, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -19583,6 +19733,23 @@ func awsAwsjson11_serializeDocumentCustomImages(v []types.CustomImage, value smi return nil } +func awsAwsjson11_serializeDocumentCustomPosixUserConfig(v *types.CustomPosixUserConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Gid != nil { + ok := object.Key("Gid") + ok.Long(*v.Gid) + } + + if v.Uid != nil { + ok := object.Key("Uid") + ok.Long(*v.Uid) + } + + return nil +} + func awsAwsjson11_serializeDocumentDataCaptureConfig(v *types.DataCaptureConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -19903,6 +20070,23 @@ func awsAwsjson11_serializeDocumentDebugRuleConfigurations(v []types.DebugRuleCo return nil } +func awsAwsjson11_serializeDocumentDefaultEbsStorageSettings(v *types.DefaultEbsStorageSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultEbsVolumeSizeInGb != nil { + ok := object.Key("DefaultEbsVolumeSizeInGb") + ok.Integer(*v.DefaultEbsVolumeSizeInGb) + } + + if v.MaximumEbsVolumeSizeInGb != nil { + ok := object.Key("MaximumEbsVolumeSizeInGb") + ok.Integer(*v.MaximumEbsVolumeSizeInGb) + } + + return nil +} + func awsAwsjson11_serializeDocumentDefaultSpaceSettings(v *types.DefaultSpaceSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -19936,6 +20120,20 @@ func awsAwsjson11_serializeDocumentDefaultSpaceSettings(v *types.DefaultSpaceSet return nil } +func awsAwsjson11_serializeDocumentDefaultSpaceStorageSettings(v *types.DefaultSpaceStorageSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultEbsStorageSettings != nil { + ok := object.Key("DefaultEbsStorageSettings") + if err := awsAwsjson11_serializeDocumentDefaultEbsStorageSettings(v.DefaultEbsStorageSettings, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentDeploymentConfig(v *types.DeploymentConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -20334,6 +20532,18 @@ func awsAwsjson11_serializeDocumentDriftCheckModelQuality(v *types.DriftCheckMod return nil } +func awsAwsjson11_serializeDocumentEbsStorageSettings(v *types.EbsStorageSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EbsVolumeSizeInGb != nil { + ok := object.Key("EbsVolumeSizeInGb") + ok.Integer(*v.EbsVolumeSizeInGb) + } + + return nil +} + func awsAwsjson11_serializeDocumentEdgeDeploymentConfig(v *types.EdgeDeploymentConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -20403,6 +20613,35 @@ func awsAwsjson11_serializeDocumentEdgeOutputConfig(v *types.EdgeOutputConfig, v return nil } +func awsAwsjson11_serializeDocumentEFSFileSystem(v *types.EFSFileSystem, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FileSystemId != nil { + ok := object.Key("FileSystemId") + ok.String(*v.FileSystemId) + } + + return nil +} + +func awsAwsjson11_serializeDocumentEFSFileSystemConfig(v *types.EFSFileSystemConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FileSystemId != nil { + ok := object.Key("FileSystemId") + ok.String(*v.FileSystemId) + } + + if v.FileSystemPath != nil { + ok := object.Key("FileSystemPath") + ok.String(*v.FileSystemPath) + } + + return nil +} + func awsAwsjson11_serializeDocumentEndpointInfo(v *types.EndpointInfo, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -22147,6 +22386,55 @@ func awsAwsjson11_serializeDocumentJsonContentTypes(v []string, value smithyjson return nil } +func awsAwsjson11_serializeDocumentJupyterLabAppImageConfig(v *types.JupyterLabAppImageConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContainerConfig != nil { + ok := object.Key("ContainerConfig") + if err := awsAwsjson11_serializeDocumentContainerConfig(v.ContainerConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentJupyterLabAppSettings(v *types.JupyterLabAppSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CodeRepositories != nil { + ok := object.Key("CodeRepositories") + if err := awsAwsjson11_serializeDocumentCodeRepositories(v.CodeRepositories, ok); err != nil { + return err + } + } + + if v.CustomImages != nil { + ok := object.Key("CustomImages") + if err := awsAwsjson11_serializeDocumentCustomImages(v.CustomImages, ok); err != nil { + return err + } + } + + if v.DefaultResourceSpec != nil { + ok := object.Key("DefaultResourceSpec") + if err := awsAwsjson11_serializeDocumentResourceSpec(v.DefaultResourceSpec, ok); err != nil { + return err + } + } + + if v.LifecycleConfigArns != nil { + ok := object.Key("LifecycleConfigArns") + if err := awsAwsjson11_serializeDocumentLifecycleConfigArns(v.LifecycleConfigArns, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentJupyterServerAppSettings(v *types.JupyterServerAppSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -24140,6 +24428,18 @@ func awsAwsjson11_serializeDocumentOutputParameterList(v []types.OutputParameter return nil } +func awsAwsjson11_serializeDocumentOwnershipSettings(v *types.OwnershipSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OwnerUserProfileName != nil { + ok := object.Key("OwnerUserProfileName") + ok.String(*v.OwnerUserProfileName) + } + + return nil +} + func awsAwsjson11_serializeDocumentParallelismConfiguration(v *types.ParallelismConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -26163,10 +26463,71 @@ func awsAwsjson11_serializeDocumentSourceIpConfig(v *types.SourceIpConfig, value return nil } +func awsAwsjson11_serializeDocumentSpaceCodeEditorAppSettings(v *types.SpaceCodeEditorAppSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultResourceSpec != nil { + ok := object.Key("DefaultResourceSpec") + if err := awsAwsjson11_serializeDocumentResourceSpec(v.DefaultResourceSpec, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentSpaceJupyterLabAppSettings(v *types.SpaceJupyterLabAppSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CodeRepositories != nil { + ok := object.Key("CodeRepositories") + if err := awsAwsjson11_serializeDocumentCodeRepositories(v.CodeRepositories, ok); err != nil { + return err + } + } + + if v.DefaultResourceSpec != nil { + ok := object.Key("DefaultResourceSpec") + if err := awsAwsjson11_serializeDocumentResourceSpec(v.DefaultResourceSpec, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentSpaceSettings(v *types.SpaceSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() + if len(v.AppType) > 0 { + ok := object.Key("AppType") + ok.String(string(v.AppType)) + } + + if v.CodeEditorAppSettings != nil { + ok := object.Key("CodeEditorAppSettings") + if err := awsAwsjson11_serializeDocumentSpaceCodeEditorAppSettings(v.CodeEditorAppSettings, ok); err != nil { + return err + } + } + + if v.CustomFileSystems != nil { + ok := object.Key("CustomFileSystems") + if err := awsAwsjson11_serializeDocumentCustomFileSystems(v.CustomFileSystems, ok); err != nil { + return err + } + } + + if v.JupyterLabAppSettings != nil { + ok := object.Key("JupyterLabAppSettings") + if err := awsAwsjson11_serializeDocumentSpaceJupyterLabAppSettings(v.JupyterLabAppSettings, ok); err != nil { + return err + } + } + if v.JupyterServerAppSettings != nil { ok := object.Key("JupyterServerAppSettings") if err := awsAwsjson11_serializeDocumentJupyterServerAppSettings(v.JupyterServerAppSettings, ok); err != nil { @@ -26181,6 +26542,39 @@ func awsAwsjson11_serializeDocumentSpaceSettings(v *types.SpaceSettings, value s } } + if v.SpaceStorageSettings != nil { + ok := object.Key("SpaceStorageSettings") + if err := awsAwsjson11_serializeDocumentSpaceStorageSettings(v.SpaceStorageSettings, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentSpaceSharingSettings(v *types.SpaceSharingSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SharingType) > 0 { + ok := object.Key("SharingType") + ok.String(string(v.SharingType)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentSpaceStorageSettings(v *types.SpaceStorageSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EbsStorageSettings != nil { + ok := object.Key("EbsStorageSettings") + if err := awsAwsjson11_serializeDocumentEbsStorageSettings(v.EbsStorageSettings, ok); err != nil { + return err + } + } + return nil } @@ -27233,6 +27627,27 @@ func awsAwsjson11_serializeDocumentUserSettings(v *types.UserSettings, value smi } } + if v.CodeEditorAppSettings != nil { + ok := object.Key("CodeEditorAppSettings") + if err := awsAwsjson11_serializeDocumentCodeEditorAppSettings(v.CodeEditorAppSettings, ok); err != nil { + return err + } + } + + if v.CustomFileSystemConfigs != nil { + ok := object.Key("CustomFileSystemConfigs") + if err := awsAwsjson11_serializeDocumentCustomFileSystemConfigs(v.CustomFileSystemConfigs, ok); err != nil { + return err + } + } + + if v.CustomPosixUserConfig != nil { + ok := object.Key("CustomPosixUserConfig") + if err := awsAwsjson11_serializeDocumentCustomPosixUserConfig(v.CustomPosixUserConfig, ok); err != nil { + return err + } + } + if v.DefaultLandingUri != nil { ok := object.Key("DefaultLandingUri") ok.String(*v.DefaultLandingUri) @@ -27243,6 +27658,13 @@ func awsAwsjson11_serializeDocumentUserSettings(v *types.UserSettings, value smi ok.String(*v.ExecutionRole) } + if v.JupyterLabAppSettings != nil { + ok := object.Key("JupyterLabAppSettings") + if err := awsAwsjson11_serializeDocumentJupyterLabAppSettings(v.JupyterLabAppSettings, ok); err != nil { + return err + } + } + if v.JupyterServerAppSettings != nil { ok := object.Key("JupyterServerAppSettings") if err := awsAwsjson11_serializeDocumentJupyterServerAppSettings(v.JupyterServerAppSettings, ok); err != nil { @@ -27285,6 +27707,13 @@ func awsAwsjson11_serializeDocumentUserSettings(v *types.UserSettings, value smi } } + if v.SpaceStorageSettings != nil { + ok := object.Key("SpaceStorageSettings") + if err := awsAwsjson11_serializeDocumentDefaultSpaceStorageSettings(v.SpaceStorageSettings, ok); err != nil { + return err + } + } + if len(v.StudioWebPortal) > 0 { ok := object.Key("StudioWebPortal") ok.String(string(v.StudioWebPortal)) @@ -27620,6 +28049,13 @@ func awsAwsjson11_serializeOpDocumentCreateAppImageConfigInput(v *CreateAppImage ok.String(*v.AppImageConfigName) } + if v.JupyterLabAppImageConfig != nil { + ok := object.Key("JupyterLabAppImageConfig") + if err := awsAwsjson11_serializeDocumentJupyterLabAppImageConfig(v.JupyterLabAppImageConfig, ok); err != nil { + return err + } + } + if v.KernelGatewayImageConfig != nil { ok := object.Key("KernelGatewayImageConfig") if err := awsAwsjson11_serializeDocumentKernelGatewayImageConfig(v.KernelGatewayImageConfig, ok); err != nil { @@ -29902,6 +30338,18 @@ func awsAwsjson11_serializeOpDocumentCreateSpaceInput(v *CreateSpaceInput, value ok.String(*v.DomainId) } + if v.OwnershipSettings != nil { + ok := object.Key("OwnershipSettings") + if err := awsAwsjson11_serializeDocumentOwnershipSettings(v.OwnershipSettings, ok); err != nil { + return err + } + } + + if v.SpaceDisplayName != nil { + ok := object.Key("SpaceDisplayName") + ok.String(*v.SpaceDisplayName) + } + if v.SpaceName != nil { ok := object.Key("SpaceName") ok.String(*v.SpaceName) @@ -29914,6 +30362,13 @@ func awsAwsjson11_serializeOpDocumentCreateSpaceInput(v *CreateSpaceInput, value } } + if v.SpaceSharingSettings != nil { + ok := object.Key("SpaceSharingSettings") + if err := awsAwsjson11_serializeDocumentSpaceSharingSettings(v.SpaceSharingSettings, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { @@ -36215,6 +36670,13 @@ func awsAwsjson11_serializeOpDocumentUpdateAppImageConfigInput(v *UpdateAppImage ok.String(*v.AppImageConfigName) } + if v.JupyterLabAppImageConfig != nil { + ok := object.Key("JupyterLabAppImageConfig") + if err := awsAwsjson11_serializeDocumentJupyterLabAppImageConfig(v.JupyterLabAppImageConfig, ok); err != nil { + return err + } + } + if v.KernelGatewayImageConfig != nil { ok := object.Key("KernelGatewayImageConfig") if err := awsAwsjson11_serializeDocumentKernelGatewayImageConfig(v.KernelGatewayImageConfig, ok); err != nil { @@ -37131,6 +37593,11 @@ func awsAwsjson11_serializeOpDocumentUpdateSpaceInput(v *UpdateSpaceInput, value ok.String(*v.DomainId) } + if v.SpaceDisplayName != nil { + ok := object.Key("SpaceDisplayName") + ok.String(*v.SpaceDisplayName) + } + if v.SpaceName != nil { ok := object.Key("SpaceName") ok.String(*v.SpaceName) diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 0f4f5380f41..3691abf6080 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -357,6 +357,8 @@ const ( AppTypeTensorBoard AppType = "TensorBoard" AppTypeRStudioServerPro AppType = "RStudioServerPro" AppTypeRSessionGateway AppType = "RSessionGateway" + AppTypeJupyterLab AppType = "JupyterLab" + AppTypeCodeEditor AppType = "CodeEditor" ) // Values returns all known values for AppType. Note that this can be expanded in @@ -369,6 +371,8 @@ func (AppType) Values() []AppType { "TensorBoard", "RStudioServerPro", "RSessionGateway", + "JupyterLab", + "CodeEditor", } } @@ -5350,6 +5354,24 @@ func (SecondaryStatus) Values() []SecondaryStatus { } } +type SharingType string + +// Enum values for SharingType +const ( + SharingTypePrivate SharingType = "Private" + SharingTypeShared SharingType = "Shared" +) + +// Values returns all known values for SharingType. 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 (SharingType) Values() []SharingType { + return []SharingType{ + "Private", + "Shared", + } +} + type SkipModelValidation string // Enum values for SkipModelValidation @@ -5782,6 +5804,8 @@ type StudioLifecycleConfigAppType string const ( StudioLifecycleConfigAppTypeJupyterServer StudioLifecycleConfigAppType = "JupyterServer" StudioLifecycleConfigAppTypeKernelGateway StudioLifecycleConfigAppType = "KernelGateway" + StudioLifecycleConfigAppTypeJupyterLab StudioLifecycleConfigAppType = "JupyterLab" + StudioLifecycleConfigAppTypeCodeEditor StudioLifecycleConfigAppType = "CodeEditor" ) // Values returns all known values for StudioLifecycleConfigAppType. Note that @@ -5792,6 +5816,8 @@ func (StudioLifecycleConfigAppType) Values() []StudioLifecycleConfigAppType { return []StudioLifecycleConfigAppType{ "JupyterServer", "KernelGateway", + "JupyterLab", + "CodeEditor", } } diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index f4a102bee8f..ac22790833f 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -851,6 +851,10 @@ type AppDetails struct { // The domain ID. DomainId *string + // Specifies the ARN's of a SageMaker image and SageMaker image version, and the + // instance type that the version runs on. + ResourceSpec *ResourceSpec + // The name of the space. SpaceName *string @@ -875,6 +879,10 @@ type AppImageConfigDetails struct { // When the AppImageConfig was created. CreationTime *time.Time + // The configuration for the file system and the runtime, such as the environment + // variables and entry point. + JupyterLabAppImageConfig *JupyterLabAppImageConfig + // The configuration for the file system and kernels in the SageMaker image. KernelGatewayImageConfig *KernelGatewayImageConfig @@ -2759,6 +2767,22 @@ type ClusterSummary struct { noSmithyDocumentSerde } +// The Code Editor application settings. For more information about Code Editor, +// see Get started with Code Editor in Amazon SageMaker (https://docs.aws.amazon.com/sagemaker/latest/dg/code-editor.html) +// . +type CodeEditorAppSettings struct { + + // Specifies the ARN's of a SageMaker image and SageMaker image version, and the + // instance type that the version runs on. + DefaultResourceSpec *ResourceSpec + + // The Amazon Resource Name (ARN) of the Code Editor application lifecycle + // configuration. + LifecycleConfigArns []string + + noSmithyDocumentSerde +} + // A Git repository that SageMaker automatically displays to users for cloning in // the JupyterServer application. type CodeRepository struct { @@ -2943,6 +2967,21 @@ type ConditionStepMetadata struct { noSmithyDocumentSerde } +// The configuration used to run the application image container. +type ContainerConfig struct { + + // The arguments for the container when you're running the application. + ContainerArguments []string + + // The entrypoint used to run the application in the container. + ContainerEntrypoint []string + + // The environment variables to set in the container + ContainerEnvironmentVariables map[string]string + + noSmithyDocumentSerde +} + // Describes the container, as part of model definition. type ContainerDefinition struct { @@ -3131,6 +3170,46 @@ type ConvergenceDetected struct { noSmithyDocumentSerde } +// A file system, created by you, that you assign to a user profile or space for +// an Amazon SageMaker Domain. Permitted users can access this file system in +// Amazon SageMaker Studio. +// +// The following types satisfy this interface: +// +// CustomFileSystemMemberEFSFileSystem +type CustomFileSystem interface { + isCustomFileSystem() +} + +// A custom file system in Amazon EFS. +type CustomFileSystemMemberEFSFileSystem struct { + Value EFSFileSystem + + noSmithyDocumentSerde +} + +func (*CustomFileSystemMemberEFSFileSystem) isCustomFileSystem() {} + +// The settings for assigning a custom file system to a user profile or space for +// an Amazon SageMaker Domain. Permitted users can access this file system in +// Amazon SageMaker Studio. +// +// The following types satisfy this interface: +// +// CustomFileSystemConfigMemberEFSFileSystemConfig +type CustomFileSystemConfig interface { + isCustomFileSystemConfig() +} + +// The settings for a custom Amazon EFS file system. +type CustomFileSystemConfigMemberEFSFileSystemConfig struct { + Value EFSFileSystemConfig + + noSmithyDocumentSerde +} + +func (*CustomFileSystemConfigMemberEFSFileSystemConfig) isCustomFileSystemConfig() {} + // A custom SageMaker image. For more information, see Bring your own SageMaker // image (https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi.html) . type CustomImage struct { @@ -3166,6 +3245,22 @@ type CustomizedMetricSpecification struct { noSmithyDocumentSerde } +// Details about the POSIX identity that is used for file system operations. +type CustomPosixUserConfig struct { + + // The POSIX group ID. + // + // This member is required. + Gid *int64 + + // The POSIX user ID. + // + // This member is required. + Uid *int64 + + noSmithyDocumentSerde +} + // Configuration to control how SageMaker captures inference data. type DataCaptureConfig struct { @@ -3496,6 +3591,23 @@ type DebugRuleEvaluationStatus struct { noSmithyDocumentSerde } +// A collection of default EBS storage settings that applies to private spaces +// created within a domain or user profile. +type DefaultEbsStorageSettings struct { + + // The default size of the EBS storage volume for a private space. + // + // This member is required. + DefaultEbsVolumeSizeInGb *int32 + + // The maximum size of the EBS storage volume for a private space. + // + // This member is required. + MaximumEbsVolumeSizeInGb *int32 + + noSmithyDocumentSerde +} + // A collection of settings that apply to spaces created in the Domain. type DefaultSpaceSettings struct { @@ -3515,6 +3627,15 @@ type DefaultSpaceSettings struct { noSmithyDocumentSerde } +// The default storage settings for a private space. +type DefaultSpaceStorageSettings struct { + + // The default EBS storage settings for a private space. + DefaultEbsStorageSettings *DefaultEbsStorageSettings + + noSmithyDocumentSerde +} + // Gets the Amazon EC2 Container Registry path of the docker image of the model // that is hosted in this ProductionVariant (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariant.html) // . If you used the registry/repository[:tag] form to specify the image path of @@ -4001,6 +4122,17 @@ type DynamicScalingConfiguration struct { noSmithyDocumentSerde } +// A collection of EBS storage settings that applies to private spaces. +type EbsStorageSettings struct { + + // The size of an EBS storage volume for a private space. + // + // This member is required. + EbsVolumeSizeInGb *int32 + + noSmithyDocumentSerde +} + // A directed edge connecting two lineage entities. type Edge struct { @@ -4295,6 +4427,35 @@ type EdgePresetDeploymentOutput struct { noSmithyDocumentSerde } +// A file system, created by you in Amazon EFS, that you assign to a user profile +// or space for an Amazon SageMaker Domain. Permitted users can access this file +// system in Amazon SageMaker Studio. +type EFSFileSystem struct { + + // The ID of your Amazon EFS file system. + // + // This member is required. + FileSystemId *string + + noSmithyDocumentSerde +} + +// The settings for assigning a custom Amazon EFS file system to a user profile or +// space for an Amazon SageMaker Domain. +type EFSFileSystemConfig struct { + + // The ID of your Amazon EFS file system. + // + // This member is required. + FileSystemId *string + + // The path to the file system directory that is accessible in Amazon SageMaker + // Studio. Permitted users can access only this directory and below. + FileSystemPath *string + + noSmithyDocumentSerde +} + // The configurations and outcomes of an Amazon EMR step execution. type EMRStepMetadata struct { @@ -7699,6 +7860,39 @@ type IntegerParameterRangeSpecification struct { noSmithyDocumentSerde } +// The configuration for the file system and kernels in a SageMaker image running +// as a JupyterLab app. +type JupyterLabAppImageConfig struct { + + // The configuration used to run the application image container. + ContainerConfig *ContainerConfig + + noSmithyDocumentSerde +} + +// The settings for the JupyterLab application. +type JupyterLabAppSettings struct { + + // A list of Git repositories that SageMaker automatically displays to users for + // cloning in the JupyterLab application. + CodeRepositories []CodeRepository + + // A list of custom SageMaker images that are configured to run as a JupyterLab + // app. + CustomImages []CustomImage + + // Specifies the ARN's of a SageMaker image and SageMaker image version, and the + // instance type that the version runs on. + DefaultResourceSpec *ResourceSpec + + // The Amazon Resource Name (ARN) of the lifecycle configurations attached to the + // user profile or domain. To remove a lifecycle config, you must set + // LifecycleConfigArns to an empty list. + LifecycleConfigArns []string + + noSmithyDocumentSerde +} + // The JupyterServer app settings. type JupyterServerAppSettings struct { @@ -10724,6 +10918,26 @@ type OutputParameter struct { noSmithyDocumentSerde } +// The collection of ownership settings for a space. +type OwnershipSettings struct { + + // The user profile who is the owner of the private space. + // + // This member is required. + OwnerUserProfileName *string + + noSmithyDocumentSerde +} + +// Specifies summary information about the ownership settings. +type OwnershipSettingsSummary struct { + + // The user profile who is the owner of the private space. + OwnerUserProfileName *string + + noSmithyDocumentSerde +} + // Configuration that controls the parallelism of the pipeline. By default, the // parallelism configuration specified applies to all executions of the pipeline // unless overridden. @@ -13702,6 +13916,16 @@ type SourceIpConfig struct { noSmithyDocumentSerde } +// The application settings for a Code Editor space. +type SpaceCodeEditorAppSettings struct { + + // Specifies the ARN's of a SageMaker image and SageMaker image version, and the + // instance type that the version runs on. + DefaultResourceSpec *ResourceSpec + + noSmithyDocumentSerde +} + // The space's details. type SpaceDetails struct { @@ -13714,24 +13938,108 @@ type SpaceDetails struct { // The last modified time. LastModifiedTime *time.Time + // Specifies summary information about the ownership settings. + OwnershipSettingsSummary *OwnershipSettingsSummary + + // The name of the space that appears in the Studio UI. + SpaceDisplayName *string + // The name of the space. SpaceName *string + // Specifies summary information about the space settings. + SpaceSettingsSummary *SpaceSettingsSummary + + // Specifies summary information about the space sharing settings. + SpaceSharingSettingsSummary *SpaceSharingSettingsSummary + // The status. Status SpaceStatus noSmithyDocumentSerde } +// The settings for the JupyterLab application within a space. +type SpaceJupyterLabAppSettings struct { + + // A list of Git repositories that SageMaker automatically displays to users for + // cloning in the JupyterLab application. + CodeRepositories []CodeRepository + + // Specifies the ARN's of a SageMaker image and SageMaker image version, and the + // instance type that the version runs on. + DefaultResourceSpec *ResourceSpec + + noSmithyDocumentSerde +} + // A collection of space settings. type SpaceSettings struct { + // The type of app created within the space. + AppType AppType + + // The Code Editor application settings. + CodeEditorAppSettings *SpaceCodeEditorAppSettings + + // A file system, created by you, that you assign to a space for an Amazon + // SageMaker Domain. Permitted users can access this file system in Amazon + // SageMaker Studio. + CustomFileSystems []CustomFileSystem + + // The settings for the JupyterLab application. + JupyterLabAppSettings *SpaceJupyterLabAppSettings + // The JupyterServer app settings. JupyterServerAppSettings *JupyterServerAppSettings // The KernelGateway app settings. KernelGatewayAppSettings *KernelGatewayAppSettings + // The storage settings for a private space. + SpaceStorageSettings *SpaceStorageSettings + + noSmithyDocumentSerde +} + +// Specifies summary information about the space settings. +type SpaceSettingsSummary struct { + + // The type of app created within the space. + AppType AppType + + // The storage settings for a private space. + SpaceStorageSettings *SpaceStorageSettings + + noSmithyDocumentSerde +} + +// A collection of space sharing settings. +type SpaceSharingSettings struct { + + // Specifies the sharing type of the space. + // + // This member is required. + SharingType SharingType + + noSmithyDocumentSerde +} + +// Specifies summary information about the space sharing settings. +type SpaceSharingSettingsSummary struct { + + // Specifies the sharing type of the space. + SharingType SharingType + + noSmithyDocumentSerde +} + +// The storage settings for a private space. +type SpaceStorageSettings struct { + + // A collection of EBS storage settings for a private space. + EbsStorageSettings *EbsStorageSettings + noSmithyDocumentSerde } @@ -15665,6 +15973,16 @@ type UserSettings struct { // The Canvas app settings. CanvasAppSettings *CanvasAppSettings + // The Code Editor application settings. + CodeEditorAppSettings *CodeEditorAppSettings + + // The settings for assigning a custom file system to a user profile. Permitted + // users can access this file system in Amazon SageMaker Studio. + CustomFileSystemConfigs []CustomFileSystemConfig + + // Details about the POSIX identity that is used for file system operations. + CustomPosixUserConfig *CustomPosixUserConfig + // The default experience that the user is directed to when accessing the domain. // The supported values are: // - studio:: : Indicates that Studio is the default experience. This value can @@ -15676,6 +15994,9 @@ type UserSettings struct { // The execution role for the user. ExecutionRole *string + // The settings for the JupyterLab application. + JupyterLabAppSettings *JupyterLabAppSettings + // The Jupyter server's app settings. JupyterServerAppSettings *JupyterServerAppSettings @@ -15702,6 +16023,9 @@ type UserSettings struct { // Specifies options for sharing Amazon SageMaker Studio notebooks. SharingSettings *SharingSettings + // The storage settings for a private space. + SpaceStorageSettings *DefaultSpaceStorageSettings + // Whether the user can access Studio. If this value is set to DISABLED , the user // cannot access Studio, even if that is the default experience for the domain. StudioWebPortal StudioWebPortal @@ -15990,6 +16314,8 @@ type UnknownUnionMember struct { func (*UnknownUnionMember) isAutoMLProblemTypeConfig() {} func (*UnknownUnionMember) isAutoMLProblemTypeResolvedAttributes() {} func (*UnknownUnionMember) isCollectionConfig() {} +func (*UnknownUnionMember) isCustomFileSystem() {} +func (*UnknownUnionMember) isCustomFileSystemConfig() {} func (*UnknownUnionMember) isMetricSpecification() {} func (*UnknownUnionMember) isScalingPolicy() {} func (*UnknownUnionMember) isTrialComponentParameterValue() {} diff --git a/service/sagemaker/types/types_exported_test.go b/service/sagemaker/types/types_exported_test.go index a93ae6df30f..d0c63bbf829 100644 --- a/service/sagemaker/types/types_exported_test.go +++ b/service/sagemaker/types/types_exported_test.go @@ -81,6 +81,42 @@ func ExampleCollectionConfig_outputUsage() { var _ *types.VectorConfig +func ExampleCustomFileSystem_outputUsage() { + var union types.CustomFileSystem + // type switches can be used to check the union value + switch v := union.(type) { + case *types.CustomFileSystemMemberEFSFileSystem: + _ = v.Value // Value is types.EFSFileSystem + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.EFSFileSystem + +func ExampleCustomFileSystemConfig_outputUsage() { + var union types.CustomFileSystemConfig + // type switches can be used to check the union value + switch v := union.(type) { + case *types.CustomFileSystemConfigMemberEFSFileSystemConfig: + _ = v.Value // Value is types.EFSFileSystemConfig + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.EFSFileSystemConfig + func ExampleMetricSpecification_outputUsage() { var union types.MetricSpecification // type switches can be used to check the union value diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index dabab2acfe0..aa13582b51b 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -7364,6 +7364,78 @@ func validateContinuousParameterRangeSpecification(v *types.ContinuousParameterR } } +func validateCustomFileSystem(v types.CustomFileSystem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomFileSystem"} + switch uv := v.(type) { + case *types.CustomFileSystemMemberEFSFileSystem: + if err := validateEFSFileSystem(&uv.Value); err != nil { + invalidParams.AddNested("[EFSFileSystem]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomFileSystemConfig(v types.CustomFileSystemConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomFileSystemConfig"} + switch uv := v.(type) { + case *types.CustomFileSystemConfigMemberEFSFileSystemConfig: + if err := validateEFSFileSystemConfig(&uv.Value); err != nil { + invalidParams.AddNested("[EFSFileSystemConfig]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomFileSystemConfigs(v []types.CustomFileSystemConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomFileSystemConfigs"} + for i := range v { + if err := validateCustomFileSystemConfig(v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCustomFileSystems(v []types.CustomFileSystem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomFileSystems"} + for i := range v { + if err := validateCustomFileSystem(v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCustomImage(v *types.CustomImage) error { if v == nil { return nil @@ -7399,6 +7471,24 @@ func validateCustomImages(v []types.CustomImage) error { } } +func validateCustomPosixUserConfig(v *types.CustomPosixUserConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CustomPosixUserConfig"} + if v.Uid == nil { + invalidParams.Add(smithy.NewErrParamRequired("Uid")) + } + if v.Gid == nil { + invalidParams.Add(smithy.NewErrParamRequired("Gid")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDataCaptureConfig(v *types.DataCaptureConfig) error { if v == nil { return nil @@ -7576,6 +7666,24 @@ func validateDebugRuleConfigurations(v []types.DebugRuleConfiguration) error { } } +func validateDefaultEbsStorageSettings(v *types.DefaultEbsStorageSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DefaultEbsStorageSettings"} + if v.DefaultEbsVolumeSizeInGb == nil { + invalidParams.Add(smithy.NewErrParamRequired("DefaultEbsVolumeSizeInGb")) + } + if v.MaximumEbsVolumeSizeInGb == nil { + invalidParams.Add(smithy.NewErrParamRequired("MaximumEbsVolumeSizeInGb")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDefaultSpaceSettings(v *types.DefaultSpaceSettings) error { if v == nil { return nil @@ -7598,6 +7706,23 @@ func validateDefaultSpaceSettings(v *types.DefaultSpaceSettings) error { } } +func validateDefaultSpaceStorageSettings(v *types.DefaultSpaceStorageSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DefaultSpaceStorageSettings"} + if v.DefaultEbsStorageSettings != nil { + if err := validateDefaultEbsStorageSettings(v.DefaultEbsStorageSettings); err != nil { + invalidParams.AddNested("DefaultEbsStorageSettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDeploymentConfig(v *types.DeploymentConfig) error { if v == nil { return nil @@ -7902,6 +8027,21 @@ func validateDriftCheckModelQuality(v *types.DriftCheckModelQuality) error { } } +func validateEbsStorageSettings(v *types.EbsStorageSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EbsStorageSettings"} + if v.EbsVolumeSizeInGb == nil { + invalidParams.Add(smithy.NewErrParamRequired("EbsVolumeSizeInGb")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEdgeDeploymentConfig(v *types.EdgeDeploymentConfig) error { if v == nil { return nil @@ -7967,6 +8107,36 @@ func validateEdgeOutputConfig(v *types.EdgeOutputConfig) error { } } +func validateEFSFileSystem(v *types.EFSFileSystem) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EFSFileSystem"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEFSFileSystemConfig(v *types.EFSFileSystemConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EFSFileSystemConfig"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEndpointInfo(v *types.EndpointInfo) error { if v == nil { return nil @@ -8926,6 +9096,28 @@ func validateIntegerParameterRangeSpecification(v *types.IntegerParameterRangeSp } } +func validateJupyterLabAppSettings(v *types.JupyterLabAppSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "JupyterLabAppSettings"} + if v.CustomImages != nil { + if err := validateCustomImages(v.CustomImages); err != nil { + invalidParams.AddNested("CustomImages", err.(smithy.InvalidParamsError)) + } + } + if v.CodeRepositories != nil { + if err := validateCodeRepositories(v.CodeRepositories); err != nil { + invalidParams.AddNested("CodeRepositories", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateJupyterServerAppSettings(v *types.JupyterServerAppSettings) error { if v == nil { return nil @@ -10201,6 +10393,21 @@ func validateOutputParameterList(v []types.OutputParameter) error { } } +func validateOwnershipSettings(v *types.OwnershipSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OwnershipSettings"} + if v.OwnerUserProfileName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OwnerUserProfileName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateParallelismConfiguration(v *types.ParallelismConfiguration) error { if v == nil { return nil @@ -11272,6 +11479,23 @@ func validateSourceIpConfig(v *types.SourceIpConfig) error { } } +func validateSpaceJupyterLabAppSettings(v *types.SpaceJupyterLabAppSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SpaceJupyterLabAppSettings"} + if v.CodeRepositories != nil { + if err := validateCodeRepositories(v.CodeRepositories); err != nil { + invalidParams.AddNested("CodeRepositories", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSpaceSettings(v *types.SpaceSettings) error { if v == nil { return nil @@ -11287,6 +11511,53 @@ func validateSpaceSettings(v *types.SpaceSettings) error { invalidParams.AddNested("KernelGatewayAppSettings", err.(smithy.InvalidParamsError)) } } + if v.JupyterLabAppSettings != nil { + if err := validateSpaceJupyterLabAppSettings(v.JupyterLabAppSettings); err != nil { + invalidParams.AddNested("JupyterLabAppSettings", err.(smithy.InvalidParamsError)) + } + } + if v.SpaceStorageSettings != nil { + if err := validateSpaceStorageSettings(v.SpaceStorageSettings); err != nil { + invalidParams.AddNested("SpaceStorageSettings", err.(smithy.InvalidParamsError)) + } + } + if v.CustomFileSystems != nil { + if err := validateCustomFileSystems(v.CustomFileSystems); err != nil { + invalidParams.AddNested("CustomFileSystems", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSpaceSharingSettings(v *types.SpaceSharingSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SpaceSharingSettings"} + if len(v.SharingType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SharingType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSpaceStorageSettings(v *types.SpaceStorageSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SpaceStorageSettings"} + if v.EbsStorageSettings != nil { + if err := validateEbsStorageSettings(v.EbsStorageSettings); err != nil { + invalidParams.AddNested("EbsStorageSettings", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -11800,6 +12071,26 @@ func validateUserSettings(v *types.UserSettings) error { invalidParams.AddNested("RSessionAppSettings", err.(smithy.InvalidParamsError)) } } + if v.JupyterLabAppSettings != nil { + if err := validateJupyterLabAppSettings(v.JupyterLabAppSettings); err != nil { + invalidParams.AddNested("JupyterLabAppSettings", err.(smithy.InvalidParamsError)) + } + } + if v.SpaceStorageSettings != nil { + if err := validateDefaultSpaceStorageSettings(v.SpaceStorageSettings); err != nil { + invalidParams.AddNested("SpaceStorageSettings", err.(smithy.InvalidParamsError)) + } + } + if v.CustomPosixUserConfig != nil { + if err := validateCustomPosixUserConfig(v.CustomPosixUserConfig); err != nil { + invalidParams.AddNested("CustomPosixUserConfig", err.(smithy.InvalidParamsError)) + } + } + if v.CustomFileSystemConfigs != nil { + if err := validateCustomFileSystemConfigs(v.CustomFileSystemConfigs); err != nil { + invalidParams.AddNested("CustomFileSystemConfigs", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -13640,6 +13931,16 @@ func validateOpCreateSpaceInput(v *CreateSpaceInput) error { invalidParams.AddNested("SpaceSettings", err.(smithy.InvalidParamsError)) } } + if v.OwnershipSettings != nil { + if err := validateOwnershipSettings(v.OwnershipSettings); err != nil { + invalidParams.AddNested("OwnershipSettings", err.(smithy.InvalidParamsError)) + } + } + if v.SpaceSharingSettings != nil { + if err := validateSpaceSharingSettings(v.SpaceSharingSettings); err != nil { + invalidParams.AddNested("SpaceSharingSettings", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else {