diff --git a/.changelog/03aab8b3c13043dfa213b12a97f3389a.json b/.changelog/03aab8b3c13043dfa213b12a97f3389a.json new file mode 100644 index 00000000000..ca83fdd8813 --- /dev/null +++ b/.changelog/03aab8b3c13043dfa213b12a97f3389a.json @@ -0,0 +1,8 @@ +{ + "id": "03aab8b3-c130-43df-a213-b12a97f3389a", + "type": "feature", + "description": "EMRonEKS Service support for SecurityConfiguration enforcement for Spark Jobs.", + "modules": [ + "service/emrcontainers" + ] +} \ No newline at end of file diff --git a/.changelog/0e8c68cb2c7148d0b26d9108381339f8.json b/.changelog/0e8c68cb2c7148d0b26d9108381339f8.json new file mode 100644 index 00000000000..9d0ab8702f9 --- /dev/null +++ b/.changelog/0e8c68cb2c7148d0b26d9108381339f8.json @@ -0,0 +1,8 @@ +{ + "id": "0e8c68cb-2c71-48d0-b26d-9108381339f8", + "type": "feature", + "description": "Launching capability for customers to enable or disable automatic assignment of public IPv4 addresses to their network interface", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/2570232947f346ca978e154a6467943a.json b/.changelog/2570232947f346ca978e154a6467943a.json new file mode 100644 index 00000000000..600b39a845b --- /dev/null +++ b/.changelog/2570232947f346ca978e154a6467943a.json @@ -0,0 +1,8 @@ +{ + "id": "25702329-47f3-46ca-978e-154a6467943a", + "type": "feature", + "description": "Support Batch Unique IDs Deletion.", + "modules": [ + "service/entityresolution" + ] +} \ No newline at end of file diff --git a/.changelog/2db8e2f995214d529533f2d6f34125b4.json b/.changelog/2db8e2f995214d529533f2d6f34125b4.json new file mode 100644 index 00000000000..6840ae74494 --- /dev/null +++ b/.changelog/2db8e2f995214d529533f2d6f34125b4.json @@ -0,0 +1,8 @@ +{ + "id": "2db8e2f9-9521-4d52-9533-f2d6f34125b4", + "type": "feature", + "description": "Amazon GameLift releases container fleets support for public preview. Deploy Linux-based containerized game server software for hosting on Amazon GameLift.", + "modules": [ + "service/gamelift" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..1cc0d8d6b2d --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "internal/protocoltest/smithyrpcv2cbor" + ] +} \ No newline at end of file diff --git a/.changelog/72ed97c732b14ff096964c674ba59f10.json b/.changelog/72ed97c732b14ff096964c674ba59f10.json new file mode 100644 index 00000000000..f4ba9cf8f45 --- /dev/null +++ b/.changelog/72ed97c732b14ff096964c674ba59f10.json @@ -0,0 +1,8 @@ +{ + "id": "72ed97c7-32b1-4ff0-9696-4c674ba59f10", + "type": "feature", + "description": "This change allows users to disable and enable the schedules associated with their tasks.", + "modules": [ + "service/datasync" + ] +} \ No newline at end of file diff --git a/.changelog/b9ce843fe52448eab9a1c95ae4427ad3.json b/.changelog/b9ce843fe52448eab9a1c95ae4427ad3.json new file mode 100644 index 00000000000..010688306d8 --- /dev/null +++ b/.changelog/b9ce843fe52448eab9a1c95ae4427ad3.json @@ -0,0 +1,8 @@ +{ + "id": "b9ce843f-e524-48ea-b9a1-c95ae4427ad3", + "type": "feature", + "description": "Add SSM DescribeInstanceProperties API to public AWS SDK.", + "modules": [ + "service/ssm" + ] +} \ No newline at end of file diff --git a/service/datasync/api_op_CreateTask.go b/service/datasync/api_op_CreateTask.go index 1ceb5bb9eb1..fc9e2d2184e 100644 --- a/service/datasync/api_op_CreateTask.go +++ b/service/datasync/api_op_CreateTask.go @@ -11,11 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Configures a transfer task, which defines where and how DataSync moves your -// data. A task includes a source location, destination location, and the options -// for how and when you want to transfer your data (such as bandwidth limits, -// scheduling, among other options). If you're planning to transfer data to or from -// an Amazon S3 location, review how DataSync can affect your S3 request charges (https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-s3-requests) +// Configures a task, which defines where and how DataSync transfers your data. A +// task includes a source location, destination location, and transfer options +// (such as bandwidth limits, scheduling, and more). If you're planning to transfer +// data to or from an Amazon S3 location, review how DataSync can affect your S3 +// request charges (https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#create-s3-location-s3-requests) // and the DataSync pricing page (http://aws.amazon.com/datasync/pricing/) before // you begin. func (c *Client) CreateTask(ctx context.Context, params *CreateTaskInput, optFns ...func(*Options)) (*CreateTaskOutput, error) { @@ -36,29 +36,30 @@ func (c *Client) CreateTask(ctx context.Context, params *CreateTaskInput, optFns // CreateTaskRequest type CreateTaskInput struct { - // The Amazon Resource Name (ARN) of an Amazon Web Services storage resource's - // location. + // Specifies the ARN of your transfer's destination location. // // This member is required. DestinationLocationArn *string - // The Amazon Resource Name (ARN) of the source location for the task. + // Specifies the ARN of your transfer's source location. // // This member is required. SourceLocationArn *string - // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used - // to monitor and log events in the task. + // Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for + // monitoring your task. CloudWatchLogGroupArn *string - // Specifies a list of filter rules that exclude specific data during your - // transfer. For more information and examples, see Filtering data transferred by - // DataSync (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) . + // Specifies exclude filters that define the files, objects, and folders in your + // source location that you don't want DataSync to transfer. For more information + // and examples, see Specifying what DataSync transfers by using filters (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) + // . Excludes []types.FilterRule - // Specifies a list of filter rules that include specific data during your - // transfer. For more information and examples, see Filtering data transferred by - // DataSync (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) . + // Specifies include filters define the files, objects, and folders in your source + // location that you want DataSync to transfer. For more information and examples, + // see Specifying what DataSync transfers by using filters (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) + // . Includes []types.FilterRule // Configures a manifest, which is a list of files or objects that you want @@ -69,26 +70,20 @@ type CreateTaskInput struct { // policy includes this permission. ManifestConfig *types.ManifestConfig - // The name of a task. This value is a text reference that is used to identify the - // task in the console. + // Specifies the name of your task. Name *string - // Specifies the configuration options for a task. Some options include preserving - // file or object metadata and verifying data integrity. You can also override - // these options before starting an individual run of a task (also known as a task - // execution). For more information, see StartTaskExecution (https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) - // . + // Specifies your task's settings, such as preserving file metadata, verifying + // data integrity, among other options. Options *types.Options - // Specifies a schedule used to periodically transfer files from a source to a - // destination location. The schedule should be specified in UTC time. For more - // information, see Scheduling your task (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) + // Specifies a schedule for when you want your task to run. For more information, + // see Scheduling your task (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) // . Schedule *types.TaskSchedule - // Specifies the tags that you want to apply to the Amazon Resource Name (ARN) - // representing the task. Tags are key-value pairs that help you manage, filter, - // and search for your DataSync resources. + // Specifies the tags that you want to apply to your task. Tags are key-value + // pairs that help you manage, filter, and search for your DataSync resources. Tags []types.TagListEntry // Specifies how you want to configure a task report, which provides detailed diff --git a/service/datasync/api_op_DescribeTask.go b/service/datasync/api_op_DescribeTask.go index b0f90c222f6..a1712da59e1 100644 --- a/service/datasync/api_op_DescribeTask.go +++ b/service/datasync/api_op_DescribeTask.go @@ -12,7 +12,8 @@ import ( "time" ) -// Provides information about an DataSync transfer task. +// Provides information about a task, which defines where and how DataSync +// transfers your data. func (c *Client) DescribeTask(ctx context.Context, params *DescribeTaskInput, optFns ...func(*Options)) (*DescribeTaskOutput, error) { if params == nil { params = &DescribeTaskInput{} @@ -31,7 +32,8 @@ func (c *Client) DescribeTask(ctx context.Context, params *DescribeTaskInput, op // DescribeTaskRequest type DescribeTaskInput struct { - // Specifies the Amazon Resource Name (ARN) of the transfer task. + // Specifies the Amazon Resource Name (ARN) of the transfer task that you want + // information about. // // This member is required. TaskArn *string @@ -42,81 +44,89 @@ type DescribeTaskInput struct { // DescribeTaskResponse type DescribeTaskOutput struct { - // The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was used - // to monitor and log events in the task. For more information on these groups, see - // Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide. + // The Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring + // your task. For more information, see Monitoring DataSync with Amazon CloudWatch (https://docs.aws.amazon.com/datasync/latest/userguide/monitor-datasync.html) + // . CloudWatchLogGroupArn *string // The time that the task was created. CreationTime *time.Time - // The Amazon Resource Name (ARN) of the task execution that is transferring files. + // The ARN of the most recent task execution. CurrentTaskExecutionArn *string - // The Amazon Resource Name (ARN) of the Amazon Web Services storage resource's - // location. + // The ARN of your transfer's destination location. DestinationLocationArn *string - // The Amazon Resource Names (ARNs) of the network interfaces created for your - // destination location. For more information, see Network interface requirements (https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces) - // . + // The ARNs of the network interfaces (https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces) + // that DataSync created for your destination location. DestinationNetworkInterfaceArns []string - // Errors that DataSync encountered during execution of the task. You can use this - // error code to help troubleshoot issues. + // If there's an issue with your task, you can use the error code to help you + // troubleshoot the problem. For more information, see Troubleshooting issues with + // DataSync transfers (https://docs.aws.amazon.com/datasync/latest/userguide/troubleshooting-datasync-locations-tasks.html) + // . ErrorCode *string - // Detailed description of an error that was encountered during the task - // execution. You can use this information to help troubleshoot issues. + // If there's an issue with your task, you can use the error details to help you + // troubleshoot the problem. For more information, see Troubleshooting issues with + // DataSync transfers (https://docs.aws.amazon.com/datasync/latest/userguide/troubleshooting-datasync-locations-tasks.html) + // . ErrorDetail *string - // A list of filter rules that exclude specific data during your transfer. For - // more information and examples, see Filtering data transferred by DataSync (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) + // The exclude filters that define the files, objects, and folders in your source + // location that you don't want DataSync to transfer. For more information and + // examples, see Specifying what DataSync transfers by using filters (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) // . Excludes []types.FilterRule - // A list of filter rules that include specific data during your transfer. For - // more information and examples, see Filtering data transferred by DataSync (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) + // The include filters that define the files, objects, and folders in your source + // location that you want DataSync to transfer. For more information and examples, + // see Specifying what DataSync transfers by using filters (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) // . Includes []types.FilterRule - // The configuration of the manifest that lists the files or objects to transfer. - // For more information, see Specifying what DataSync transfers by using a manifest (https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html) + // The configuration of the manifest that lists the files or objects that you want + // DataSync to transfer. For more information, see Specifying what DataSync + // transfers by using a manifest (https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html) // . ManifestConfig *types.ManifestConfig - // The name of the task that was described. + // The name of your task. Name *string - // The configuration options that control the behavior of the StartTaskExecution - // operation. Some options include preserving file or object metadata and verifying - // data integrity. You can override these options for each task execution. For more - // information, see StartTaskExecution (https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) - // . + // The task's settings. For example, what file metadata gets preserved, how data + // integrity gets verified at the end of your transfer, bandwidth limits, among + // other options. Options *types.Options - // The schedule used to periodically transfer files from a source to a destination - // location. + // The schedule for when you want your task to run. For more information, see + // Scheduling your task (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) + // . Schedule *types.TaskSchedule - // The Amazon Resource Name (ARN) of the source file system's location. + // The details about your task schedule (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) + // . + ScheduleDetails *types.TaskScheduleDetails + + // The ARN of your transfer's source location. SourceLocationArn *string - // The Amazon Resource Names (ARNs) of the network interfaces created for your - // source location. For more information, see Network interface requirements (https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces) - // . + // The ARNs of the network interfaces (https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#required-network-interfaces) + // that DataSync created for your source location. SourceNetworkInterfaceArns []string - // The status of the task that was described. For detailed information about task - // execution statuses, see Understanding Task Statuses in the DataSync User Guide. + // The status of your task. For information about what each status means, see Task + // statuses (https://docs.aws.amazon.com/datasync/latest/userguide/understand-task-statuses.html#understand-task-creation-statuses) + // . Status types.TaskStatus - // The Amazon Resource Name (ARN) of the task that was described. + // The ARN of your task. TaskArn *string // The configuration of your task report, which provides detailed information - // about for your DataSync transfer. For more information, see Creating a task - // report (https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html) + // about your DataSync transfer. For more information, see Monitoring your + // DataSync transfers with task reports (https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html) // . TaskReportConfig *types.TaskReportConfig diff --git a/service/datasync/api_op_DescribeTaskExecution.go b/service/datasync/api_op_DescribeTaskExecution.go index 21c3bc42377..028e688786b 100644 --- a/service/datasync/api_op_DescribeTaskExecution.go +++ b/service/datasync/api_op_DescribeTaskExecution.go @@ -119,8 +119,10 @@ type DescribeTaskExecutionOutput struct { // DataSync handles files, objects, and their associated metadata during your // transfer. You also can specify how to verify data integrity, set bandwidth // limits for your task, among other options. Each option has a default value. - // Unless you need to, you don't have to configure any of these options before - // starting your task. + // Unless you need to, you don't have to configure any option before calling + // StartTaskExecution (https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) + // . You also can override your task options for each task execution. For example, + // you might want to adjust the LogLevel for an individual execution. Options *types.Options // Indicates whether DataSync generated a complete task report (https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html) diff --git a/service/datasync/api_op_StartTaskExecution.go b/service/datasync/api_op_StartTaskExecution.go index 9c5bdb7f385..6db39682cb0 100644 --- a/service/datasync/api_op_StartTaskExecution.go +++ b/service/datasync/api_op_StartTaskExecution.go @@ -66,8 +66,10 @@ type StartTaskExecutionInput struct { // DataSync handles files, objects, and their associated metadata during your // transfer. You also can specify how to verify data integrity, set bandwidth // limits for your task, among other options. Each option has a default value. - // Unless you need to, you don't have to configure any of these options before - // starting your task. + // Unless you need to, you don't have to configure any option before calling + // StartTaskExecution (https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) + // . You also can override your task options for each task execution. For example, + // you might want to adjust the LogLevel for an individual execution. OverrideOptions *types.Options // Specifies the tags that you want to apply to the Amazon Resource Name (ARN) diff --git a/service/datasync/api_op_UpdateTask.go b/service/datasync/api_op_UpdateTask.go index 3d2a0a4a7be..a1d2af61cff 100644 --- a/service/datasync/api_op_UpdateTask.go +++ b/service/datasync/api_op_UpdateTask.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the configuration of an DataSync transfer task. +// Updates the configuration of a task, which defines where and how DataSync +// transfers your data. func (c *Client) UpdateTask(ctx context.Context, params *UpdateTaskInput, optFns ...func(*Options)) (*UpdateTaskOutput, error) { if params == nil { params = &UpdateTaskInput{} @@ -30,23 +31,25 @@ func (c *Client) UpdateTask(ctx context.Context, params *UpdateTaskInput, optFns // UpdateTaskResponse type UpdateTaskInput struct { - // The Amazon Resource Name (ARN) of the resource name of the task to update. + // Specifies the ARN of the task that you want to update. // // This member is required. TaskArn *string - // The Amazon Resource Name (ARN) of the resource name of the Amazon CloudWatch - // log group. + // Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for + // monitoring your task. CloudWatchLogGroupArn *string - // Specifies a list of filter rules that exclude specific data during your - // transfer. For more information and examples, see Filtering data transferred by - // DataSync (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) . + // Specifies exclude filters that define the files, objects, and folders in your + // source location that you don't want DataSync to transfer. For more information + // and examples, see Specifying what DataSync transfers by using filters (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) + // . Excludes []types.FilterRule - // Specifies a list of filter rules that include specific data during your - // transfer. For more information and examples, see Filtering data transferred by - // DataSync (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) . + // Specifies include filters define the files, objects, and folders in your source + // location that you want DataSync to transfer. For more information and examples, + // see Specifying what DataSync transfers by using filters (https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) + // . Includes []types.FilterRule // Configures a manifest, which is a list of files or objects that you want @@ -59,22 +62,21 @@ type UpdateTaskInput struct { // this parameter as empty. ManifestConfig *types.ManifestConfig - // The name of the task to update. + // Specifies the name of your task. Name *string // Indicates how your transfer task is configured. These options include how // DataSync handles files, objects, and their associated metadata during your // transfer. You also can specify how to verify data integrity, set bandwidth // limits for your task, among other options. Each option has a default value. - // Unless you need to, you don't have to configure any of these options before - // starting your task. + // Unless you need to, you don't have to configure any option before calling + // StartTaskExecution (https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) + // . You also can override your task options for each task execution. For example, + // you might want to adjust the LogLevel for an individual execution. Options *types.Options - // Specifies a schedule used to periodically transfer files from a source to a - // destination location. You can configure your task to execute hourly, daily, - // weekly or on specific days of the week. You control when in the day or hour you - // want the task to execute. The time you specify is UTC time. For more - // information, see Scheduling your task (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) + // Specifies a schedule for when you want your task to run. For more information, + // see Scheduling your task (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) // . Schedule *types.TaskSchedule diff --git a/service/datasync/api_op_UpdateTaskExecution.go b/service/datasync/api_op_UpdateTaskExecution.go index ffaccbef415..9a484a97b76 100644 --- a/service/datasync/api_op_UpdateTaskExecution.go +++ b/service/datasync/api_op_UpdateTaskExecution.go @@ -35,8 +35,10 @@ type UpdateTaskExecutionInput struct { // DataSync handles files, objects, and their associated metadata during your // transfer. You also can specify how to verify data integrity, set bandwidth // limits for your task, among other options. Each option has a default value. - // Unless you need to, you don't have to configure any of these options before - // starting your task. + // Unless you need to, you don't have to configure any option before calling + // StartTaskExecution (https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) + // . You also can override your task options for each task execution. For example, + // you might want to adjust the LogLevel for an individual execution. // // This member is required. Options *types.Options diff --git a/service/datasync/deserializers.go b/service/datasync/deserializers.go index cb9ea09dccc..01d5d86d1e4 100644 --- a/service/datasync/deserializers.go +++ b/service/datasync/deserializers.go @@ -10928,6 +10928,80 @@ func awsAwsjson11_deserializeDocumentTaskSchedule(v **types.TaskSchedule, value sv.ScheduleExpression = ptr.String(jtv) } + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleStatus to be of type string, got %T instead", value) + } + sv.Status = types.ScheduleStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTaskScheduleDetails(v **types.TaskScheduleDetails, 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.TaskScheduleDetails + if *v == nil { + sv = &types.TaskScheduleDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DisabledBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleDisabledBy to be of type string, got %T instead", value) + } + sv.DisabledBy = types.ScheduleDisabledBy(jtv) + } + + case "DisabledReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleDisabledReason to be of type string, got %T instead", value) + } + sv.DisabledReason = ptr.String(jtv) + } + + case "StatusUpdateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StatusUpdateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Time to be a JSON Number, got %T instead", value) + + } + } + default: _, _ = key, value @@ -13590,6 +13664,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeTaskOutput(v **DescribeTaskOutput return err } + case "ScheduleDetails": + if err := awsAwsjson11_deserializeDocumentTaskScheduleDetails(&sv.ScheduleDetails, value); err != nil { + return err + } + case "SourceLocationArn": if value != nil { jtv, ok := value.(string) diff --git a/service/datasync/serializers.go b/service/datasync/serializers.go index 833322e3df7..1e6785ddde7 100644 --- a/service/datasync/serializers.go +++ b/service/datasync/serializers.go @@ -4065,6 +4065,11 @@ func awsAwsjson11_serializeDocumentTaskSchedule(v *types.TaskSchedule, value smi ok.String(*v.ScheduleExpression) } + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + return nil } diff --git a/service/datasync/types/enums.go b/service/datasync/types/enums.go index 5b605c55fe2..33b7fcaa457 100644 --- a/service/datasync/types/enums.go +++ b/service/datasync/types/enums.go @@ -688,6 +688,42 @@ func (S3StorageClass) Values() []S3StorageClass { } } +type ScheduleDisabledBy string + +// Enum values for ScheduleDisabledBy +const ( + ScheduleDisabledByUser ScheduleDisabledBy = "USER" + ScheduleDisabledByService ScheduleDisabledBy = "SERVICE" +) + +// Values returns all known values for ScheduleDisabledBy. 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 (ScheduleDisabledBy) Values() []ScheduleDisabledBy { + return []ScheduleDisabledBy{ + "USER", + "SERVICE", + } +} + +type ScheduleStatus string + +// Enum values for ScheduleStatus +const ( + ScheduleStatusEnabled ScheduleStatus = "ENABLED" + ScheduleStatusDisabled ScheduleStatus = "DISABLED" +) + +// Values returns all known values for ScheduleStatus. 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 (ScheduleStatus) Values() []ScheduleStatus { + return []ScheduleStatus{ + "ENABLED", + "DISABLED", + } +} + type SmbSecurityDescriptorCopyFlags string // Enum values for SmbSecurityDescriptorCopyFlags diff --git a/service/datasync/types/types.go b/service/datasync/types/types.go index 8d523c30738..bcfde12ad5c 100644 --- a/service/datasync/types/types.go +++ b/service/datasync/types/types.go @@ -592,8 +592,10 @@ type OnPremConfig struct { // DataSync handles files, objects, and their associated metadata during your // transfer. You also can specify how to verify data integrity, set bandwidth // limits for your task, among other options. Each option has a default value. -// Unless you need to, you don't have to configure any of these options before -// starting your task. +// Unless you need to, you don't have to configure any option before calling +// StartTaskExecution (https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) +// . You also can override your task options for each task execution. For example, +// you might want to adjust the LogLevel for an individual execution. type Options struct { // Specifies whether to preserve metadata indicating the last time a file was read @@ -751,9 +753,11 @@ type Options struct { // . // - POINT_IN_TIME_CONSISTENT (default) - At the end of the transfer, DataSync // scans the entire source and destination to verify that both locations are fully - // synchronized. You can't use this option when transferring to S3 Glacier Flexible - // Retrieval or S3 Glacier Deep Archive storage classes. For more information, see - // Storage class considerations with Amazon S3 locations (https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes) + // synchronized. If you use a manifest (https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html) + // , DataSync only scans and verifies what's listed in the manifest. You can't use + // this option when transferring to S3 Glacier Flexible Retrieval or S3 Glacier + // Deep Archive storage classes. For more information, see Storage class + // considerations with Amazon S3 locations (https://docs.aws.amazon.com/datasync/latest/userguide/create-s3-location.html#using-storage-classes) // . // - NONE - DataSync doesn't run additional verification at the end of the // transfer. All data transmissions are still integrity-checked with checksum @@ -786,12 +790,7 @@ type P95Metrics struct { // number. type Platform struct { - // The version of the DataSync agent. On December 7, 2023, we discontinued version - // 1 DataSync agents. Check the DataSync console to see if you have affected - // agents. If you do, replace (https://docs.aws.amazon.com/datasync/latest/userguide/replacing-agent.html) - // those agents or delete (https://docs.aws.amazon.com/datasync/latest/userguide/deleting-agent.html) - // them if they aren't in use. If you need more help, contact Amazon Web Services - // Support (https://aws.amazon.com/contact-us/) . + // The version of the DataSync agent. Version *string noSmithyDocumentSerde @@ -1253,17 +1252,53 @@ type TaskReportConfig struct { noSmithyDocumentSerde } -// Specifies the schedule you want your task to use for repeated executions. For -// more information, see Schedule Expressions for Rules (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html) -// . +// Configures your DataSync task to run on a schedule (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) +// (at a minimum interval of 1 hour). type TaskSchedule struct { - // A cron expression that specifies when DataSync initiates a scheduled transfer - // from a source to a destination location. + // Specifies your task schedule by using a cron expression in UTC time. For + // information about cron expression syntax, see the Amazon EventBridge User Guide (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html) + // . // // This member is required. ScheduleExpression *string + // Specifies whether to enable or disable your task schedule. Your schedule is + // enabled by default, but there can be situations where you need to disable it. + // For example, you might need to pause a recurring transfer or fix an issue with + // your task or perform maintenance on your storage system. DataSync might disable + // your schedule automatically if your task fails repeatedly with the same error. + // For more information, see TaskScheduleDetails (https://docs.aws.amazon.com/datasync/latest/userguide/API_TaskScheduleDetails.html) + // . + Status ScheduleStatus + + noSmithyDocumentSerde +} + +// Provides information about your DataSync task schedule (https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) +// . +type TaskScheduleDetails struct { + + // Indicates how your task schedule was disabled. + // - USER - Your schedule was manually disabled by using the UpdateTask (https://docs.aws.amazon.com/datasync/latest/userguide/API_UpdateTask.html) + // operation or DataSync console. + // - SERVICE - Your schedule was automatically disabled by DataSync because the + // task failed repeatedly with the same error. + DisabledBy ScheduleDisabledBy + + // Provides a reason if the task schedule is disabled. If your schedule is + // disabled by USER , you see a Manually disabled by user. message. If your + // schedule is disabled by SERVICE , you see an error message to help you + // understand why the task keeps failing. For information on resolving DataSync + // errors, see Troubleshooting issues with DataSync transfers (https://docs.aws.amazon.com/datasync/latest/userguide/troubleshooting-datasync-locations-tasks.html) + // . + DisabledReason *string + + // Indicates the last time the status of your task schedule changed. For example, + // if DataSync automatically disables your schedule because of a repeated error, + // you can see when the schedule was disabled. + StatusUpdateTime *time.Time + noSmithyDocumentSerde } diff --git a/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go b/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go index c0b19beed4f..bb6b0354ac3 100644 --- a/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go +++ b/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go @@ -51,6 +51,11 @@ type DescribeNetworkInterfaceAttributeInput struct { // Contains the output of DescribeNetworkInterfaceAttribute. type DescribeNetworkInterfaceAttributeOutput struct { + // Indicates whether to assign a public IPv4 address to a network interface. This + // option can be enabled for any network interface but will only apply to the + // primary network interface (eth0). + AssociatePublicIpAddress *bool + // The attachment (if any) of the network interface. Attachment *types.NetworkInterfaceAttachment diff --git a/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go b/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go index 79ecf14f78c..cd135e73f60 100644 --- a/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go +++ b/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go @@ -37,6 +37,11 @@ type ModifyNetworkInterfaceAttributeInput struct { // This member is required. NetworkInterfaceId *string + // Indicates whether to assign a public IPv4 address to a network interface. This + // option can be enabled for any network interface but will only apply to the + // primary network interface (eth0). + AssociatePublicIpAddress *bool + // Information about the interface attachment. If modifying the delete on // termination attribute, you must specify the ID of the interface attachment. Attachment *types.NetworkInterfaceAttachmentChanges diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index aa663dcdedd..8082383d738 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -154116,6 +154116,22 @@ func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("associatePublicIpAddress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.AssociatePublicIpAddress = ptr.Bool(xtv) + } + case strings.EqualFold("attachment", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil { diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index 0eff15dac27..2f67c2edad1 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -65033,6 +65033,11 @@ func awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(v *Modi object := value.Object() _ = object + if v.AssociatePublicIpAddress != nil { + objectKey := object.Key("AssociatePublicIpAddress") + objectKey.Boolean(*v.AssociatePublicIpAddress) + } + if v.Attachment != nil { objectKey := object.Key("Attachment") if err := awsEc2query_serializeDocumentNetworkInterfaceAttachmentChanges(v.Attachment, objectKey); err != nil { diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index ad370665281..1c6c8c96bea 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -5831,10 +5831,11 @@ type NetworkInterfaceAttribute string // Enum values for NetworkInterfaceAttribute const ( - NetworkInterfaceAttributeDescription NetworkInterfaceAttribute = "description" - NetworkInterfaceAttributeGroupSet NetworkInterfaceAttribute = "groupSet" - NetworkInterfaceAttributeSourceDestCheck NetworkInterfaceAttribute = "sourceDestCheck" - NetworkInterfaceAttributeAttachment NetworkInterfaceAttribute = "attachment" + NetworkInterfaceAttributeDescription NetworkInterfaceAttribute = "description" + NetworkInterfaceAttributeGroupSet NetworkInterfaceAttribute = "groupSet" + NetworkInterfaceAttributeSourceDestCheck NetworkInterfaceAttribute = "sourceDestCheck" + NetworkInterfaceAttributeAttachment NetworkInterfaceAttribute = "attachment" + NetworkInterfaceAttributeAssociatePublicIpAddress NetworkInterfaceAttribute = "associatePublicIpAddress" ) // Values returns all known values for NetworkInterfaceAttribute. Note that this @@ -5846,6 +5847,7 @@ func (NetworkInterfaceAttribute) Values() []NetworkInterfaceAttribute { "groupSet", "sourceDestCheck", "attachment", + "associatePublicIpAddress", } } diff --git a/service/emrcontainers/api_op_CreateSecurityConfiguration.go b/service/emrcontainers/api_op_CreateSecurityConfiguration.go new file mode 100644 index 00000000000..bbd0052ccb2 --- /dev/null +++ b/service/emrcontainers/api_op_CreateSecurityConfiguration.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package emrcontainers + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/emrcontainers/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a security configuration. Security configurations in Amazon EMR on EKS +// are templates for different security setups. You can use security configurations +// to configure the Lake Formation integration setup. You can also create a +// security configuration to re-use a security setup each time you create a virtual +// cluster. +func (c *Client) CreateSecurityConfiguration(ctx context.Context, params *CreateSecurityConfigurationInput, optFns ...func(*Options)) (*CreateSecurityConfigurationOutput, error) { + if params == nil { + params = &CreateSecurityConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateSecurityConfiguration", params, optFns, c.addOperationCreateSecurityConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateSecurityConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateSecurityConfigurationInput struct { + + // The client idempotency token to use when creating the security configuration. + // + // This member is required. + ClientToken *string + + // The name of the security configuration. + // + // This member is required. + Name *string + + // Security configuration input for the request. + // + // This member is required. + SecurityConfigurationData *types.SecurityConfigurationData + + // The tags to add to the security configuration. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateSecurityConfigurationOutput struct { + + // The ARN (Amazon Resource Name) of the security configuration. + Arn *string + + // The ID of the security configuration. + Id *string + + // The name of the security configuration. + Name *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateSecurityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSecurityConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSecurityConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSecurityConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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 = addIdempotencyToken_opCreateSecurityConfigurationMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateSecurityConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSecurityConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateSecurityConfiguration struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateSecurityConfiguration) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateSecurityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateSecurityConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateSecurityConfigurationInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateSecurityConfigurationMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateSecurityConfiguration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateSecurityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateSecurityConfiguration", + } +} diff --git a/service/emrcontainers/api_op_CreateVirtualCluster.go b/service/emrcontainers/api_op_CreateVirtualCluster.go index bebba1b64e1..073ae8713d7 100644 --- a/service/emrcontainers/api_op_CreateVirtualCluster.go +++ b/service/emrcontainers/api_op_CreateVirtualCluster.go @@ -48,6 +48,9 @@ type CreateVirtualClusterInput struct { // This member is required. Name *string + // The ID of the security configuration. + SecurityConfigurationId *string + // The tags assigned to the virtual cluster. Tags map[string]string diff --git a/service/emrcontainers/api_op_DescribeSecurityConfiguration.go b/service/emrcontainers/api_op_DescribeSecurityConfiguration.go new file mode 100644 index 00000000000..5c6f2fa945a --- /dev/null +++ b/service/emrcontainers/api_op_DescribeSecurityConfiguration.go @@ -0,0 +1,140 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package emrcontainers + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/emrcontainers/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays detailed information about a specified security configuration. +// Security configurations in Amazon EMR on EKS are templates for different +// security setups. You can use security configurations to configure the Lake +// Formation integration setup. You can also create a security configuration to +// re-use a security setup each time you create a virtual cluster. +func (c *Client) DescribeSecurityConfiguration(ctx context.Context, params *DescribeSecurityConfigurationInput, optFns ...func(*Options)) (*DescribeSecurityConfigurationOutput, error) { + if params == nil { + params = &DescribeSecurityConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityConfiguration", params, optFns, c.addOperationDescribeSecurityConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeSecurityConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeSecurityConfigurationInput struct { + + // The ID of the security configuration. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DescribeSecurityConfigurationOutput struct { + + // Details of the security configuration. + SecurityConfiguration *types.SecurityConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeSecurityConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeSecurityConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeSecurityConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSecurityConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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 = addOpDescribeSecurityConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecurityConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeSecurityConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeSecurityConfiguration", + } +} diff --git a/service/emrcontainers/api_op_ListSecurityConfigurations.go b/service/emrcontainers/api_op_ListSecurityConfigurations.go new file mode 100644 index 00000000000..8be3c4d3993 --- /dev/null +++ b/service/emrcontainers/api_op_ListSecurityConfigurations.go @@ -0,0 +1,241 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package emrcontainers + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/emrcontainers/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Lists security configurations based on a set of parameters. Security +// configurations in Amazon EMR on EKS are templates for different security setups. +// You can use security configurations to configure the Lake Formation integration +// setup. You can also create a security configuration to re-use a security setup +// each time you create a virtual cluster. +func (c *Client) ListSecurityConfigurations(ctx context.Context, params *ListSecurityConfigurationsInput, optFns ...func(*Options)) (*ListSecurityConfigurationsOutput, error) { + if params == nil { + params = &ListSecurityConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSecurityConfigurations", params, optFns, c.addOperationListSecurityConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSecurityConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSecurityConfigurationsInput struct { + + // The date and time after which the security configuration was created. + CreatedAfter *time.Time + + // The date and time before which the security configuration was created. + CreatedBefore *time.Time + + // The maximum number of security configurations the operation can list. + MaxResults *int32 + + // The token for the next set of security configurations to return. + NextToken *string + + noSmithyDocumentSerde +} + +type ListSecurityConfigurationsOutput struct { + + // The token for the next set of security configurations to return. + NextToken *string + + // The list of returned security configurations. + SecurityConfigurations []types.SecurityConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSecurityConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListSecurityConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSecurityConfigurations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSecurityConfigurations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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_opListSecurityConfigurations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListSecurityConfigurationsAPIClient is a client that implements the +// ListSecurityConfigurations operation. +type ListSecurityConfigurationsAPIClient interface { + ListSecurityConfigurations(context.Context, *ListSecurityConfigurationsInput, ...func(*Options)) (*ListSecurityConfigurationsOutput, error) +} + +var _ ListSecurityConfigurationsAPIClient = (*Client)(nil) + +// ListSecurityConfigurationsPaginatorOptions is the paginator options for +// ListSecurityConfigurations +type ListSecurityConfigurationsPaginatorOptions struct { + // The maximum number of security configurations the operation can list. + 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 +} + +// ListSecurityConfigurationsPaginator is a paginator for +// ListSecurityConfigurations +type ListSecurityConfigurationsPaginator struct { + options ListSecurityConfigurationsPaginatorOptions + client ListSecurityConfigurationsAPIClient + params *ListSecurityConfigurationsInput + nextToken *string + firstPage bool +} + +// NewListSecurityConfigurationsPaginator returns a new +// ListSecurityConfigurationsPaginator +func NewListSecurityConfigurationsPaginator(client ListSecurityConfigurationsAPIClient, params *ListSecurityConfigurationsInput, optFns ...func(*ListSecurityConfigurationsPaginatorOptions)) *ListSecurityConfigurationsPaginator { + if params == nil { + params = &ListSecurityConfigurationsInput{} + } + + options := ListSecurityConfigurationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSecurityConfigurationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSecurityConfigurationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSecurityConfigurations page. +func (p *ListSecurityConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSecurityConfigurationsOutput, 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.ListSecurityConfigurations(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_opListSecurityConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSecurityConfigurations", + } +} diff --git a/service/emrcontainers/deserializers.go b/service/emrcontainers/deserializers.go index 250bcc9fb7d..e2a6e41b3e5 100644 --- a/service/emrcontainers/deserializers.go +++ b/service/emrcontainers/deserializers.go @@ -554,6 +554,178 @@ func awsRestjson1_deserializeOpDocumentCreateManagedEndpointOutput(v **CreateMan return nil } +type awsRestjson1_deserializeOpCreateSecurityConfiguration struct { +} + +func (*awsRestjson1_deserializeOpCreateSecurityConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateSecurityConfiguration) 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_deserializeOpErrorCreateSecurityConfiguration(response, &metadata) + } + output := &CreateSecurityConfigurationOutput{} + 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_deserializeOpDocumentCreateSecurityConfigurationOutput(&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_deserializeOpErrorCreateSecurityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateSecurityConfigurationOutput(v **CreateSecurityConfigurationOutput, 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 *CreateSecurityConfigurationOutput + if *v == nil { + sv = &CreateSecurityConfigurationOutput{} + } 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 SecurityConfigurationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceNameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateVirtualCluster struct { } @@ -1662,14 +1834,14 @@ func awsRestjson1_deserializeOpDocumentDescribeManagedEndpointOutput(v **Describ return nil } -type awsRestjson1_deserializeOpDescribeVirtualCluster struct { +type awsRestjson1_deserializeOpDescribeSecurityConfiguration struct { } -func (*awsRestjson1_deserializeOpDescribeVirtualCluster) ID() string { +func (*awsRestjson1_deserializeOpDescribeSecurityConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeVirtualCluster) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeSecurityConfiguration) 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) @@ -1683,9 +1855,9 @@ func (m *awsRestjson1_deserializeOpDescribeVirtualCluster) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeVirtualCluster(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeSecurityConfiguration(response, &metadata) } - output := &DescribeVirtualClusterOutput{} + output := &DescribeSecurityConfigurationOutput{} out.Result = output var buff [1024]byte @@ -1706,7 +1878,7 @@ func (m *awsRestjson1_deserializeOpDescribeVirtualCluster) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeVirtualClusterOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeSecurityConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1719,7 +1891,7 @@ func (m *awsRestjson1_deserializeOpDescribeVirtualCluster) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeVirtualCluster(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeSecurityConfiguration(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)} @@ -1779,7 +1951,7 @@ func awsRestjson1_deserializeOpErrorDescribeVirtualCluster(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDescribeVirtualClusterOutput(v **DescribeVirtualClusterOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeSecurityConfigurationOutput(v **DescribeSecurityConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1792,17 +1964,17 @@ func awsRestjson1_deserializeOpDocumentDescribeVirtualClusterOutput(v **Describe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeVirtualClusterOutput + var sv *DescribeSecurityConfigurationOutput if *v == nil { - sv = &DescribeVirtualClusterOutput{} + sv = &DescribeSecurityConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "virtualCluster": - if err := awsRestjson1_deserializeDocumentVirtualCluster(&sv.VirtualCluster, value); err != nil { + case "securityConfiguration": + if err := awsRestjson1_deserializeDocumentSecurityConfiguration(&sv.SecurityConfiguration, value); err != nil { return err } @@ -1815,14 +1987,14 @@ func awsRestjson1_deserializeOpDocumentDescribeVirtualClusterOutput(v **Describe return nil } -type awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials struct { +type awsRestjson1_deserializeOpDescribeVirtualCluster struct { } -func (*awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials) ID() string { +func (*awsRestjson1_deserializeOpDescribeVirtualCluster) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeVirtualCluster) 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) @@ -1836,9 +2008,9 @@ func (m *awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetManagedEndpointSessionCredentials(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeVirtualCluster(response, &metadata) } - output := &GetManagedEndpointSessionCredentialsOutput{} + output := &DescribeVirtualClusterOutput{} out.Result = output var buff [1024]byte @@ -1859,7 +2031,7 @@ func (m *awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials) HandleD return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetManagedEndpointSessionCredentialsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeVirtualClusterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1872,7 +2044,7 @@ func (m *awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials) HandleD return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetManagedEndpointSessionCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeVirtualCluster(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)} @@ -1916,9 +2088,6 @@ func awsRestjson1_deserializeOpErrorGetManagedEndpointSessionCredentials(respons case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("RequestThrottledException", errorCode): - return awsRestjson1_deserializeErrorRequestThrottledException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -1935,7 +2104,7 @@ func awsRestjson1_deserializeOpErrorGetManagedEndpointSessionCredentials(respons } } -func awsRestjson1_deserializeOpDocumentGetManagedEndpointSessionCredentialsOutput(v **GetManagedEndpointSessionCredentialsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeVirtualClusterOutput(v **DescribeVirtualClusterOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1948,42 +2117,20 @@ func awsRestjson1_deserializeOpDocumentGetManagedEndpointSessionCredentialsOutpu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetManagedEndpointSessionCredentialsOutput + var sv *DescribeVirtualClusterOutput if *v == nil { - sv = &GetManagedEndpointSessionCredentialsOutput{} + sv = &DescribeVirtualClusterOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "credentials": - if err := awsRestjson1_deserializeDocumentCredentials(&sv.Credentials, value); err != nil { + case "virtualCluster": + if err := awsRestjson1_deserializeDocumentVirtualCluster(&sv.VirtualCluster, value); err != nil { return err } - case "expiresAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Date to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.ExpiresAt = ptr.Time(t) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceIdString to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - default: _, _ = key, value @@ -1993,14 +2140,14 @@ func awsRestjson1_deserializeOpDocumentGetManagedEndpointSessionCredentialsOutpu return nil } -type awsRestjson1_deserializeOpListJobRuns struct { +type awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials struct { } -func (*awsRestjson1_deserializeOpListJobRuns) ID() string { +func (*awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListJobRuns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetManagedEndpointSessionCredentials) 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) @@ -2014,9 +2161,9 @@ func (m *awsRestjson1_deserializeOpListJobRuns) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListJobRuns(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetManagedEndpointSessionCredentials(response, &metadata) } - output := &ListJobRunsOutput{} + output := &GetManagedEndpointSessionCredentialsOutput{} out.Result = output var buff [1024]byte @@ -2037,7 +2184,7 @@ func (m *awsRestjson1_deserializeOpListJobRuns) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListJobRunsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetManagedEndpointSessionCredentialsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2050,7 +2197,7 @@ func (m *awsRestjson1_deserializeOpListJobRuns) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListJobRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetManagedEndpointSessionCredentials(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)} @@ -2094,6 +2241,12 @@ func awsRestjson1_deserializeOpErrorListJobRuns(response *smithyhttp.Response, m case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("RequestThrottledException", errorCode): + return awsRestjson1_deserializeErrorRequestThrottledException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -2107,7 +2260,7 @@ func awsRestjson1_deserializeOpErrorListJobRuns(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListJobRunsOutput(v **ListJobRunsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetManagedEndpointSessionCredentialsOutput(v **GetManagedEndpointSessionCredentialsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2120,25 +2273,197 @@ func awsRestjson1_deserializeOpDocumentListJobRunsOutput(v **ListJobRunsOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListJobRunsOutput + var sv *GetManagedEndpointSessionCredentialsOutput if *v == nil { - sv = &ListJobRunsOutput{} + sv = &GetManagedEndpointSessionCredentialsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobRuns": - if err := awsRestjson1_deserializeDocumentJobRuns(&sv.JobRuns, value); err != nil { + case "credentials": + if err := awsRestjson1_deserializeDocumentCredentials(&sv.Credentials, value); err != nil { return err } - case "nextToken": + case "expiresAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ExpiresAt = ptr.Time(t) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListJobRuns struct { +} + +func (*awsRestjson1_deserializeOpListJobRuns) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListJobRuns) 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_deserializeOpErrorListJobRuns(response, &metadata) + } + output := &ListJobRunsOutput{} + 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_deserializeOpDocumentListJobRunsOutput(&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_deserializeOpErrorListJobRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListJobRunsOutput(v **ListJobRunsOutput, 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 *ListJobRunsOutput + if *v == nil { + sv = &ListJobRunsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobRuns": + if err := awsRestjson1_deserializeDocumentJobRuns(&sv.JobRuns, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } @@ -2470,6 +2795,165 @@ func awsRestjson1_deserializeOpDocumentListManagedEndpointsOutput(v **ListManage return nil } +type awsRestjson1_deserializeOpListSecurityConfigurations struct { +} + +func (*awsRestjson1_deserializeOpListSecurityConfigurations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListSecurityConfigurations) 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_deserializeOpErrorListSecurityConfigurations(response, &metadata) + } + output := &ListSecurityConfigurationsOutput{} + 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_deserializeOpDocumentListSecurityConfigurationsOutput(&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_deserializeOpErrorListSecurityConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListSecurityConfigurationsOutput(v **ListSecurityConfigurationsOutput, 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 *ListSecurityConfigurationsOutput + if *v == nil { + sv = &ListSecurityConfigurationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "securityConfigurations": + if err := awsRestjson1_deserializeDocumentSecurityConfigurations(&sv.SecurityConfigurations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListTagsForResource struct { } @@ -3324,6 +3808,47 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo return output } +func awsRestjson1_deserializeDocumentAuthorizationConfiguration(v **types.AuthorizationConfiguration, 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.AuthorizationConfiguration + if *v == nil { + sv = &types.AuthorizationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "encryptionConfiguration": + if err := awsRestjson1_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { + return err + } + + case "lakeFormationConfiguration": + if err := awsRestjson1_deserializeDocumentLakeFormationConfiguration(&sv.LakeFormationConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCertificate(v **types.Certificate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3816,6 +4341,42 @@ func awsRestjson1_deserializeDocumentEKSRequestThrottledException(v **types.EKSR return nil } +func awsRestjson1_deserializeDocumentEncryptionConfiguration(v **types.EncryptionConfiguration, 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.EncryptionConfiguration + if *v == nil { + sv = &types.EncryptionConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inTransitEncryptionConfiguration": + if err := awsRestjson1_deserializeDocumentInTransitEncryptionConfiguration(&sv.InTransitEncryptionConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentEndpoint(v **types.Endpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4107,6 +4668,42 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentInTransitEncryptionConfiguration(v **types.InTransitEncryptionConfiguration, 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.InTransitEncryptionConfiguration + if *v == nil { + sv = &types.InTransitEncryptionConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tlsCertificateConfiguration": + if err := awsRestjson1_deserializeDocumentTLSCertificateConfiguration(&sv.TlsCertificateConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentJobDriver(v **types.JobDriver, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4560,17 +5157,71 @@ func awsRestjson1_deserializeDocumentJobTemplates(v *[]types.JobTemplate, value cv = *v } - for _, value := range shape { - var col types.JobTemplate - destAddr := &col - if err := awsRestjson1_deserializeDocumentJobTemplate(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for _, value := range shape { + var col types.JobTemplate + destAddr := &col + if err := awsRestjson1_deserializeDocumentJobTemplate(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLakeFormationConfiguration(v **types.LakeFormationConfiguration, 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.LakeFormationConfiguration + if *v == nil { + sv = &types.LakeFormationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "authorizedSessionTagValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionTagValue to be of type string, got %T instead", value) + } + sv.AuthorizedSessionTagValue = ptr.String(jtv) + } + + case "queryEngineRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) + } + sv.QueryEngineRoleArn = ptr.String(jtv) + } + + case "secureNamespaceInfo": + if err := awsRestjson1_deserializeDocumentSecureNamespaceInfo(&sv.SecureNamespaceInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } @@ -5017,6 +5668,215 @@ func awsRestjson1_deserializeDocumentS3MonitoringConfiguration(v **types.S3Monit return nil } +func awsRestjson1_deserializeDocumentSecureNamespaceInfo(v **types.SecureNamespaceInfo, 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.SecureNamespaceInfo + if *v == nil { + sv = &types.SecureNamespaceInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clusterId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClusterId to be of type string, got %T instead", value) + } + sv.ClusterId = ptr.String(jtv) + } + + case "namespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KubernetesNamespace to be of type string, got %T instead", value) + } + sv.Namespace = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSecurityConfiguration(v **types.SecurityConfiguration, 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.SecurityConfiguration + if *v == nil { + sv = &types.SecurityConfiguration{} + } 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 SecurityConfigurationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Date to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "createdBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RequestIdentityUserArn to be of type string, got %T instead", value) + } + sv.CreatedBy = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceNameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "securityConfigurationData": + if err := awsRestjson1_deserializeDocumentSecurityConfigurationData(&sv.SecurityConfigurationData, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSecurityConfigurationData(v **types.SecurityConfigurationData, 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.SecurityConfigurationData + if *v == nil { + sv = &types.SecurityConfigurationData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "authorizationConfiguration": + if err := awsRestjson1_deserializeDocumentAuthorizationConfiguration(&sv.AuthorizationConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSecurityConfigurations(v *[]types.SecurityConfiguration, 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.SecurityConfiguration + if *v == nil { + cv = []types.SecurityConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SecurityConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentSecurityConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSensitivePropertiesMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5312,6 +6172,64 @@ func awsRestjson1_deserializeDocumentTemplateParameterConfigurationMap(v *map[st return nil } +func awsRestjson1_deserializeDocumentTLSCertificateConfiguration(v **types.TLSCertificateConfiguration, 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.TLSCertificateConfiguration + if *v == nil { + sv = &types.TLSCertificateConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "certificateProviderType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CertificateProviderType to be of type string, got %T instead", value) + } + sv.CertificateProviderType = types.CertificateProviderType(jtv) + } + + case "privateCertificateSecretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SecretsManagerArn to be of type string, got %T instead", value) + } + sv.PrivateCertificateSecretArn = ptr.String(jtv) + } + + case "publicCertificateSecretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SecretsManagerArn to be of type string, got %T instead", value) + } + sv.PublicCertificateSecretArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5419,6 +6337,15 @@ func awsRestjson1_deserializeDocumentVirtualCluster(v **types.VirtualCluster, va sv.Name = ptr.String(jtv) } + case "securityConfigurationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdString to be of type string, got %T instead", value) + } + sv.SecurityConfigurationId = ptr.String(jtv) + } + case "state": if value != nil { jtv, ok := value.(string) diff --git a/service/emrcontainers/generated.json b/service/emrcontainers/generated.json index 39f9914fa2c..c9ba2322b6b 100644 --- a/service/emrcontainers/generated.json +++ b/service/emrcontainers/generated.json @@ -11,6 +11,7 @@ "api_op_CancelJobRun.go", "api_op_CreateJobTemplate.go", "api_op_CreateManagedEndpoint.go", + "api_op_CreateSecurityConfiguration.go", "api_op_CreateVirtualCluster.go", "api_op_DeleteJobTemplate.go", "api_op_DeleteManagedEndpoint.go", @@ -18,11 +19,13 @@ "api_op_DescribeJobRun.go", "api_op_DescribeJobTemplate.go", "api_op_DescribeManagedEndpoint.go", + "api_op_DescribeSecurityConfiguration.go", "api_op_DescribeVirtualCluster.go", "api_op_GetManagedEndpointSessionCredentials.go", "api_op_ListJobRuns.go", "api_op_ListJobTemplates.go", "api_op_ListManagedEndpoints.go", + "api_op_ListSecurityConfigurations.go", "api_op_ListTagsForResource.go", "api_op_ListVirtualClusters.go", "api_op_StartJobRun.go", diff --git a/service/emrcontainers/serializers.go b/service/emrcontainers/serializers.go index be799461fec..46baf8a04b1 100644 --- a/service/emrcontainers/serializers.go +++ b/service/emrcontainers/serializers.go @@ -315,6 +315,100 @@ func awsRestjson1_serializeOpDocumentCreateManagedEndpointInput(v *CreateManaged return nil } +type awsRestjson1_serializeOpCreateSecurityConfiguration struct { +} + +func (*awsRestjson1_serializeOpCreateSecurityConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateSecurityConfiguration) 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.(*CreateSecurityConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/securityconfigurations") + 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_serializeOpDocumentCreateSecurityConfigurationInput(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_serializeOpHttpBindingsCreateSecurityConfigurationInput(v *CreateSecurityConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateSecurityConfigurationInput(v *CreateSecurityConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.SecurityConfigurationData != nil { + ok := object.Key("securityConfigurationData") + if err := awsRestjson1_serializeDocumentSecurityConfigurationData(v.SecurityConfigurationData, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateVirtualCluster struct { } @@ -399,6 +493,11 @@ func awsRestjson1_serializeOpDocumentCreateVirtualClusterInput(v *CreateVirtualC ok.String(*v.Name) } + if v.SecurityConfigurationId != nil { + ok := object.Key("securityConfigurationId") + ok.String(*v.SecurityConfigurationId) + } + if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { @@ -826,6 +925,71 @@ func awsRestjson1_serializeOpHttpBindingsDescribeManagedEndpointInput(v *Describ return nil } +type awsRestjson1_serializeOpDescribeSecurityConfiguration struct { +} + +func (*awsRestjson1_serializeOpDescribeSecurityConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeSecurityConfiguration) 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.(*DescribeSecurityConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/securityconfigurations/{id}") + 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_serializeOpHttpBindingsDescribeSecurityConfigurationInput(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_serializeOpHttpBindingsDescribeSecurityConfigurationInput(v *DescribeSecurityConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeVirtualCluster struct { } @@ -1264,6 +1428,78 @@ func awsRestjson1_serializeOpHttpBindingsListManagedEndpointsInput(v *ListManage return nil } +type awsRestjson1_serializeOpListSecurityConfigurations struct { +} + +func (*awsRestjson1_serializeOpListSecurityConfigurations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListSecurityConfigurations) 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.(*ListSecurityConfigurationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/securityconfigurations") + 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_serializeOpHttpBindingsListSecurityConfigurationsInput(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_serializeOpHttpBindingsListSecurityConfigurationsInput(v *ListSecurityConfigurationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CreatedAfter != nil { + encoder.SetQuery("createdAfter").String(smithytime.FormatDateTime(*v.CreatedAfter)) + } + + if v.CreatedBefore != nil { + encoder.SetQuery("createdBefore").String(smithytime.FormatDateTime(*v.CreatedBefore)) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListTagsForResource struct { } @@ -1723,6 +1959,27 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +func awsRestjson1_serializeDocumentAuthorizationConfiguration(v *types.AuthorizationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EncryptionConfiguration != nil { + ok := object.Key("encryptionConfiguration") + if err := awsRestjson1_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { + return err + } + } + + if v.LakeFormationConfiguration != nil { + ok := object.Key("lakeFormationConfiguration") + if err := awsRestjson1_serializeDocumentLakeFormationConfiguration(v.LakeFormationConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentCloudWatchMonitoringConfiguration(v *types.CloudWatchMonitoringConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1871,6 +2128,20 @@ func awsRestjson1_serializeDocumentEksInfo(v *types.EksInfo, value smithyjson.Va return nil } +func awsRestjson1_serializeDocumentEncryptionConfiguration(v *types.EncryptionConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InTransitEncryptionConfiguration != nil { + ok := object.Key("inTransitEncryptionConfiguration") + if err := awsRestjson1_serializeDocumentInTransitEncryptionConfiguration(v.InTransitEncryptionConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentEntryPointArguments(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1882,6 +2153,20 @@ func awsRestjson1_serializeDocumentEntryPointArguments(v []string, value smithyj return nil } +func awsRestjson1_serializeDocumentInTransitEncryptionConfiguration(v *types.InTransitEncryptionConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TlsCertificateConfiguration != nil { + ok := object.Key("tlsCertificateConfiguration") + if err := awsRestjson1_serializeDocumentTLSCertificateConfiguration(v.TlsCertificateConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentJobDriver(v *types.JobDriver, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1948,6 +2233,30 @@ func awsRestjson1_serializeDocumentJobTemplateData(v *types.JobTemplateData, val return nil } +func awsRestjson1_serializeDocumentLakeFormationConfiguration(v *types.LakeFormationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AuthorizedSessionTagValue != nil { + ok := object.Key("authorizedSessionTagValue") + ok.String(*v.AuthorizedSessionTagValue) + } + + if v.QueryEngineRoleArn != nil { + ok := object.Key("queryEngineRoleArn") + ok.String(*v.QueryEngineRoleArn) + } + + if v.SecureNamespaceInfo != nil { + ok := object.Key("secureNamespaceInfo") + if err := awsRestjson1_serializeDocumentSecureNamespaceInfo(v.SecureNamespaceInfo, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentMonitoringConfiguration(v *types.MonitoringConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2081,6 +2390,37 @@ func awsRestjson1_serializeDocumentS3MonitoringConfiguration(v *types.S3Monitori return nil } +func awsRestjson1_serializeDocumentSecureNamespaceInfo(v *types.SecureNamespaceInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClusterId != nil { + ok := object.Key("clusterId") + ok.String(*v.ClusterId) + } + + if v.Namespace != nil { + ok := object.Key("namespace") + ok.String(*v.Namespace) + } + + return nil +} + +func awsRestjson1_serializeDocumentSecurityConfigurationData(v *types.SecurityConfigurationData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AuthorizationConfiguration != nil { + ok := object.Key("authorizationConfiguration") + if err := awsRestjson1_serializeDocumentAuthorizationConfiguration(v.AuthorizationConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentSensitivePropertiesMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2185,3 +2525,25 @@ func awsRestjson1_serializeDocumentTemplateParameterInputMap(v map[string]string } return nil } + +func awsRestjson1_serializeDocumentTLSCertificateConfiguration(v *types.TLSCertificateConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.CertificateProviderType) > 0 { + ok := object.Key("certificateProviderType") + ok.String(string(v.CertificateProviderType)) + } + + if v.PrivateCertificateSecretArn != nil { + ok := object.Key("privateCertificateSecretArn") + ok.String(*v.PrivateCertificateSecretArn) + } + + if v.PublicCertificateSecretArn != nil { + ok := object.Key("publicCertificateSecretArn") + ok.String(*v.PublicCertificateSecretArn) + } + + return nil +} diff --git a/service/emrcontainers/snapshot_test.go b/service/emrcontainers/snapshot_test.go index fdfa423fde1..3d736a90575 100644 --- a/service/emrcontainers/snapshot_test.go +++ b/service/emrcontainers/snapshot_test.go @@ -98,6 +98,18 @@ func TestCheckSnapshot_CreateManagedEndpoint(t *testing.T) { } } +func TestCheckSnapshot_CreateSecurityConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateSecurityConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateSecurityConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateVirtualCluster(t *testing.T) { svc := New(Options{}) _, err := svc.CreateVirtualCluster(context.Background(), nil, func(o *Options) { @@ -182,6 +194,18 @@ func TestCheckSnapshot_DescribeManagedEndpoint(t *testing.T) { } } +func TestCheckSnapshot_DescribeSecurityConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeSecurityConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeSecurityConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeVirtualCluster(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeVirtualCluster(context.Background(), nil, func(o *Options) { @@ -242,6 +266,18 @@ func TestCheckSnapshot_ListManagedEndpoints(t *testing.T) { } } +func TestCheckSnapshot_ListSecurityConfigurations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSecurityConfigurations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListSecurityConfigurations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { @@ -337,6 +373,18 @@ func TestUpdateSnapshot_CreateManagedEndpoint(t *testing.T) { } } +func TestUpdateSnapshot_CreateSecurityConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateSecurityConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateSecurityConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateVirtualCluster(t *testing.T) { svc := New(Options{}) _, err := svc.CreateVirtualCluster(context.Background(), nil, func(o *Options) { @@ -421,6 +469,18 @@ func TestUpdateSnapshot_DescribeManagedEndpoint(t *testing.T) { } } +func TestUpdateSnapshot_DescribeSecurityConfiguration(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeSecurityConfiguration(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeSecurityConfiguration") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeVirtualCluster(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeVirtualCluster(context.Background(), nil, func(o *Options) { @@ -481,6 +541,18 @@ func TestUpdateSnapshot_ListManagedEndpoints(t *testing.T) { } } +func TestUpdateSnapshot_ListSecurityConfigurations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSecurityConfigurations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListSecurityConfigurations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { diff --git a/service/emrcontainers/types/enums.go b/service/emrcontainers/types/enums.go index 4ac38dd9ab7..69e296ff5a0 100644 --- a/service/emrcontainers/types/enums.go +++ b/service/emrcontainers/types/enums.go @@ -2,6 +2,22 @@ package types +type CertificateProviderType string + +// Enum values for CertificateProviderType +const ( + CertificateProviderTypePem CertificateProviderType = "PEM" +) + +// Values returns all known values for CertificateProviderType. 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 (CertificateProviderType) Values() []CertificateProviderType { + return []CertificateProviderType{ + "PEM", + } +} + type ContainerProviderType string // Enum values for ContainerProviderType diff --git a/service/emrcontainers/types/types.go b/service/emrcontainers/types/types.go index 93eeb14adaf..5b6d5b8b305 100644 --- a/service/emrcontainers/types/types.go +++ b/service/emrcontainers/types/types.go @@ -7,6 +7,18 @@ import ( "time" ) +// Authorization-related configuration inputs for the security configuration. +type AuthorizationConfiguration struct { + + // Encryption-related configuration input for the security configuration. + EncryptionConfiguration *EncryptionConfiguration + + // Lake Formation related configuration inputs for the security configuration. + LakeFormationConfiguration *LakeFormationConfiguration + + noSmithyDocumentSerde +} + // The entity representing certificate data generated for managed endpoint. type Certificate struct { @@ -149,6 +161,15 @@ type EksInfo struct { noSmithyDocumentSerde } +// Configurations related to encryption for the security configuration. +type EncryptionConfiguration struct { + + // In-transit encryption-related input for the security configuration. + InTransitEncryptionConfiguration *InTransitEncryptionConfiguration + + noSmithyDocumentSerde +} + // This entity represents the endpoint that is managed by Amazon EMR on EKS. type Endpoint struct { @@ -215,6 +236,15 @@ type Endpoint struct { noSmithyDocumentSerde } +// Configurations related to in-transit encryption for the security configuration. +type InTransitEncryptionConfiguration struct { + + // TLS certificate-related configuration input for the security configuration. + TlsCertificateConfiguration *TLSCertificateConfiguration + + noSmithyDocumentSerde +} + // Specify the driver that the job runs on. Exactly one of the two available job // drivers is required, either sparkSqlJobDriver or sparkSubmitJobDriver. type JobDriver struct { @@ -359,6 +389,23 @@ type JobTemplateData struct { noSmithyDocumentSerde } +// Lake Formation related configuration inputs for the security configuration. +type LakeFormationConfiguration struct { + + // The session tag to authorize Amazon EMR on EKS for API calls to Lake Formation. + AuthorizedSessionTagValue *string + + // The query engine IAM role ARN that is tied to the secure Spark job. The + // QueryEngine role assumes the JobExecutionRole to execute all the Lake Formation + // calls. + QueryEngineRoleArn *string + + // The namespace input of the system job. + SecureNamespaceInfo *SecureNamespaceInfo + + noSmithyDocumentSerde +} + // Configuration setting for monitoring. type MonitoringConfiguration struct { @@ -465,6 +512,58 @@ type S3MonitoringConfiguration struct { noSmithyDocumentSerde } +// Namespace inputs for the system job. +type SecureNamespaceInfo struct { + + // The ID of the Amazon EKS cluster where Amazon EMR on EKS jobs run. + ClusterId *string + + // The namespace of the Amazon EKS cluster where the system jobs run. + Namespace *string + + noSmithyDocumentSerde +} + +// Inputs related to the security configuration. Security configurations in Amazon +// EMR on EKS are templates for different security setups. You can use security +// configurations to configure the Lake Formation integration setup. You can also +// create a security configuration to re-use a security setup each time you create +// a virtual cluster. +type SecurityConfiguration struct { + + // The ARN (Amazon Resource Name) of the security configuration. + Arn *string + + // The date and time that the job run was created. + CreatedAt *time.Time + + // The user who created the job run. + CreatedBy *string + + // The ID of the security configuration. + Id *string + + // The name of the security configuration. + Name *string + + // Security configuration inputs for the request. + SecurityConfigurationData *SecurityConfigurationData + + // The tags to assign to the security configuration. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Configurations related to the security configuration for the request. +type SecurityConfigurationData struct { + + // Authorization-related configuration input for the security configuration. + AuthorizationConfiguration *AuthorizationConfiguration + + noSmithyDocumentSerde +} + // The job driver for job type. type SparkSqlJobDriver struct { @@ -506,6 +605,23 @@ type TemplateParameterConfiguration struct { noSmithyDocumentSerde } +// Configurations related to the TLS certificate for the security configuration. +type TLSCertificateConfiguration struct { + + // The TLS certificate type. Acceptable values: PEM or Custom . + CertificateProviderType CertificateProviderType + + // Secrets Manager ARN that contains the private TLS certificate contents, used + // for communication between the user job and the system job. + PrivateCertificateSecretArn *string + + // Secrets Manager ARN that contains the public TLS certificate contents, used for + // communication between the user job and the system job. + PublicCertificateSecretArn *string + + noSmithyDocumentSerde +} + // This entity describes a virtual cluster. A virtual cluster is a Kubernetes // namespace that Amazon EMR is registered with. Amazon EMR uses virtual clusters // to run jobs and host endpoints. Multiple virtual clusters can be backed by the @@ -530,6 +646,9 @@ type VirtualCluster struct { // The name of the virtual cluster. Name *string + // The ID of the security configuration. + SecurityConfigurationId *string + // The state of the virtual cluster. State VirtualClusterState diff --git a/service/emrcontainers/validators.go b/service/emrcontainers/validators.go index fa1fa39ded5..2d6953b6ecf 100644 --- a/service/emrcontainers/validators.go +++ b/service/emrcontainers/validators.go @@ -70,6 +70,26 @@ func (m *validateOpCreateManagedEndpoint) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateSecurityConfiguration struct { +} + +func (*validateOpCreateSecurityConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateSecurityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateSecurityConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateSecurityConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateVirtualCluster struct { } @@ -210,6 +230,26 @@ func (m *validateOpDescribeManagedEndpoint) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDescribeSecurityConfiguration struct { +} + +func (*validateOpDescribeSecurityConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeSecurityConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeSecurityConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeSecurityConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeVirtualCluster struct { } @@ -382,6 +422,10 @@ func addOpCreateManagedEndpointValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpCreateManagedEndpoint{}, middleware.After) } +func addOpCreateSecurityConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateSecurityConfiguration{}, middleware.After) +} + func addOpCreateVirtualClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateVirtualCluster{}, middleware.After) } @@ -410,6 +454,10 @@ func addOpDescribeManagedEndpointValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDescribeManagedEndpoint{}, middleware.After) } +func addOpDescribeSecurityConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeSecurityConfiguration{}, middleware.After) +} + func addOpDescribeVirtualClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeVirtualCluster{}, middleware.After) } @@ -766,6 +814,27 @@ func validateOpCreateManagedEndpointInput(v *CreateManagedEndpointInput) error { } } +func validateOpCreateSecurityConfigurationInput(v *CreateSecurityConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateSecurityConfigurationInput"} + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.SecurityConfigurationData == nil { + invalidParams.Add(smithy.NewErrParamRequired("SecurityConfigurationData")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateVirtualClusterInput(v *CreateVirtualClusterInput) error { if v == nil { return nil @@ -890,6 +959,21 @@ func validateOpDescribeManagedEndpointInput(v *DescribeManagedEndpointInput) err } } +func validateOpDescribeSecurityConfigurationInput(v *DescribeSecurityConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeSecurityConfigurationInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeVirtualClusterInput(v *DescribeVirtualClusterInput) error { if v == nil { return nil diff --git a/service/entityresolution/api_op_BatchDeleteUniqueId.go b/service/entityresolution/api_op_BatchDeleteUniqueId.go new file mode 100644 index 00000000000..b79b96e5241 --- /dev/null +++ b/service/entityresolution/api_op_BatchDeleteUniqueId.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package entityresolution + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/entityresolution/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes multiple unique IDs in a matching workflow. +func (c *Client) BatchDeleteUniqueId(ctx context.Context, params *BatchDeleteUniqueIdInput, optFns ...func(*Options)) (*BatchDeleteUniqueIdOutput, error) { + if params == nil { + params = &BatchDeleteUniqueIdInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchDeleteUniqueId", params, optFns, c.addOperationBatchDeleteUniqueIdMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchDeleteUniqueIdOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchDeleteUniqueIdInput struct { + + // The unique IDs to delete. + // + // This member is required. + UniqueIds []string + + // The name of the workflow. + // + // This member is required. + WorkflowName *string + + // The input source for the batch delete unique ID operation. + InputSource *string + + noSmithyDocumentSerde +} + +type BatchDeleteUniqueIdOutput struct { + + // The unique IDs that were deleted. + // + // This member is required. + Deleted []types.DeletedUniqueId + + // The unique IDs that were disconnected. + // + // This member is required. + DisconnectedUniqueIds []string + + // The errors from deleting multiple unique IDs. + // + // This member is required. + Errors []types.DeleteUniqueIdError + + // The status of the batch delete unique ID operation. + // + // This member is required. + Status types.DeleteUniqueIdStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchDeleteUniqueIdMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchDeleteUniqueId{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchDeleteUniqueId{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchDeleteUniqueId"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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 = addOpBatchDeleteUniqueIdValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteUniqueId(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchDeleteUniqueId(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchDeleteUniqueId", + } +} diff --git a/service/entityresolution/deserializers.go b/service/entityresolution/deserializers.go index 8ed7406a2e5..84c0f7b4f57 100644 --- a/service/entityresolution/deserializers.go +++ b/service/entityresolution/deserializers.go @@ -205,6 +205,178 @@ func awsRestjson1_deserializeOpDocumentAddPolicyStatementOutput(v **AddPolicySta return nil } +type awsRestjson1_deserializeOpBatchDeleteUniqueId struct { +} + +func (*awsRestjson1_deserializeOpBatchDeleteUniqueId) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpBatchDeleteUniqueId) 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_deserializeOpErrorBatchDeleteUniqueId(response, &metadata) + } + output := &BatchDeleteUniqueIdOutput{} + 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_deserializeOpDocumentBatchDeleteUniqueIdOutput(&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_deserializeOpErrorBatchDeleteUniqueId(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentBatchDeleteUniqueIdOutput(v **BatchDeleteUniqueIdOutput, 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 *BatchDeleteUniqueIdOutput + if *v == nil { + sv = &BatchDeleteUniqueIdOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deleted": + if err := awsRestjson1_deserializeDocumentDeletedUniqueIdList(&sv.Deleted, value); err != nil { + return err + } + + case "disconnectedUniqueIds": + if err := awsRestjson1_deserializeDocumentDisconnectedUniqueIdsList(&sv.DisconnectedUniqueIds, value); err != nil { + return err + } + + case "errors": + if err := awsRestjson1_deserializeDocumentDeleteUniqueIdErrorsList(&sv.Errors, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeleteUniqueIdStatus to be of type string, got %T instead", value) + } + sv.Status = types.DeleteUniqueIdStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateIdMappingWorkflow struct { } @@ -7118,6 +7290,199 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentDeletedUniqueId(v **types.DeletedUniqueId, 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.DeletedUniqueId + if *v == nil { + sv = &types.DeletedUniqueId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "uniqueId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UniqueId to be of type string, got %T instead", value) + } + sv.UniqueId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeletedUniqueIdList(v *[]types.DeletedUniqueId, 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.DeletedUniqueId + if *v == nil { + cv = []types.DeletedUniqueId{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeletedUniqueId + destAddr := &col + if err := awsRestjson1_deserializeDocumentDeletedUniqueId(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDeleteUniqueIdError(v **types.DeleteUniqueIdError, 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.DeleteUniqueIdError + if *v == nil { + sv = &types.DeleteUniqueIdError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeleteUniqueIdErrorType to be of type string, got %T instead", value) + } + sv.ErrorType = types.DeleteUniqueIdErrorType(jtv) + } + + case "uniqueId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UniqueId to be of type string, got %T instead", value) + } + sv.UniqueId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeleteUniqueIdErrorsList(v *[]types.DeleteUniqueIdError, 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.DeleteUniqueIdError + if *v == nil { + cv = []types.DeleteUniqueIdError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeleteUniqueIdError + destAddr := &col + if err := awsRestjson1_deserializeDocumentDeleteUniqueIdError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDisconnectedUniqueIdsList(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 UniqueId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/entityresolution/generated.json b/service/entityresolution/generated.json index 735cbc0c712..c5a3e0bbf77 100644 --- a/service/entityresolution/generated.json +++ b/service/entityresolution/generated.json @@ -9,6 +9,7 @@ "api_client.go", "api_client_test.go", "api_op_AddPolicyStatement.go", + "api_op_BatchDeleteUniqueId.go", "api_op_CreateIdMappingWorkflow.go", "api_op_CreateIdNamespace.go", "api_op_CreateMatchingWorkflow.go", diff --git a/service/entityresolution/serializers.go b/service/entityresolution/serializers.go index de6d7aae5b2..cbd761390fc 100644 --- a/service/entityresolution/serializers.go +++ b/service/entityresolution/serializers.go @@ -14,6 +14,8 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "strconv" + "strings" ) type awsRestjson1_serializeOpAddPolicyStatement struct { @@ -132,6 +134,90 @@ func awsRestjson1_serializeOpDocumentAddPolicyStatementInput(v *AddPolicyStateme return nil } +type awsRestjson1_serializeOpBatchDeleteUniqueId struct { +} + +func (*awsRestjson1_serializeOpBatchDeleteUniqueId) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpBatchDeleteUniqueId) 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.(*BatchDeleteUniqueIdInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/matchingworkflows/{workflowName}/uniqueids") + 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_serializeOpHttpBindingsBatchDeleteUniqueIdInput(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_serializeOpHttpBindingsBatchDeleteUniqueIdInput(v *BatchDeleteUniqueIdInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InputSource != nil && len(*v.InputSource) > 0 { + locationName := "Inputsource" + encoder.SetHeader(locationName).String(*v.InputSource) + } + + if v.UniqueIds != nil { + locationName := "Uniqueids" + for i := range v.UniqueIds { + if len(v.UniqueIds[i]) > 0 { + escaped := v.UniqueIds[i] + if strings.Index(v.UniqueIds[i], `,`) != -1 || strings.Index(v.UniqueIds[i], `"`) != -1 { + escaped = strconv.Quote(v.UniqueIds[i]) + } + + encoder.AddHeader(locationName).String(escaped) + } + } + } + + if v.WorkflowName == nil || len(*v.WorkflowName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member workflowName must not be empty")} + } + if v.WorkflowName != nil { + if err := encoder.SetURI("workflowName").String(*v.WorkflowName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateIdMappingWorkflow struct { } diff --git a/service/entityresolution/snapshot_test.go b/service/entityresolution/snapshot_test.go index c20e19e5b7e..708420e6c20 100644 --- a/service/entityresolution/snapshot_test.go +++ b/service/entityresolution/snapshot_test.go @@ -74,6 +74,18 @@ func TestCheckSnapshot_AddPolicyStatement(t *testing.T) { } } +func TestCheckSnapshot_BatchDeleteUniqueId(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteUniqueId(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "BatchDeleteUniqueId") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateIdMappingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIdMappingWorkflow(context.Background(), nil, func(o *Options) { @@ -505,6 +517,18 @@ func TestUpdateSnapshot_AddPolicyStatement(t *testing.T) { } } +func TestUpdateSnapshot_BatchDeleteUniqueId(t *testing.T) { + svc := New(Options{}) + _, err := svc.BatchDeleteUniqueId(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "BatchDeleteUniqueId") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateIdMappingWorkflow(t *testing.T) { svc := New(Options{}) _, err := svc.CreateIdMappingWorkflow(context.Background(), nil, func(o *Options) { diff --git a/service/entityresolution/types/enums.go b/service/entityresolution/types/enums.go index 121e6336d5b..5c9ff5e2ae5 100644 --- a/service/entityresolution/types/enums.go +++ b/service/entityresolution/types/enums.go @@ -20,6 +20,42 @@ func (AttributeMatchingModel) Values() []AttributeMatchingModel { } } +type DeleteUniqueIdErrorType string + +// Enum values for DeleteUniqueIdErrorType +const ( + DeleteUniqueIdErrorTypeServiceError DeleteUniqueIdErrorType = "SERVICE_ERROR" + DeleteUniqueIdErrorTypeValidationError DeleteUniqueIdErrorType = "VALIDATION_ERROR" +) + +// Values returns all known values for DeleteUniqueIdErrorType. 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 (DeleteUniqueIdErrorType) Values() []DeleteUniqueIdErrorType { + return []DeleteUniqueIdErrorType{ + "SERVICE_ERROR", + "VALIDATION_ERROR", + } +} + +type DeleteUniqueIdStatus string + +// Enum values for DeleteUniqueIdStatus +const ( + DeleteUniqueIdStatusCompleted DeleteUniqueIdStatus = "COMPLETED" + DeleteUniqueIdStatusAccepted DeleteUniqueIdStatus = "ACCEPTED" +) + +// Values returns all known values for DeleteUniqueIdStatus. 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 (DeleteUniqueIdStatus) Values() []DeleteUniqueIdStatus { + return []DeleteUniqueIdStatus{ + "COMPLETED", + "ACCEPTED", + } +} + type IdMappingType string // Enum values for IdMappingType diff --git a/service/entityresolution/types/types.go b/service/entityresolution/types/types.go index 805362ddec2..63f9c9a4002 100644 --- a/service/entityresolution/types/types.go +++ b/service/entityresolution/types/types.go @@ -8,6 +8,33 @@ import ( "time" ) +// The deleted unique ID. +type DeletedUniqueId struct { + + // The unique ID of the deleted item. + // + // This member is required. + UniqueId *string + + noSmithyDocumentSerde +} + +// The Delete Unique Id error. +type DeleteUniqueIdError struct { + + // The error type for the batch delete unique ID operation. + // + // This member is required. + ErrorType DeleteUniqueIdErrorType + + // The unique ID that could not be deleted. + // + // This member is required. + UniqueId *string + + noSmithyDocumentSerde +} + // An object containing an error message, if there was an error. type ErrorDetails struct { diff --git a/service/entityresolution/validators.go b/service/entityresolution/validators.go index 8481ffb3590..4eb17889f4d 100644 --- a/service/entityresolution/validators.go +++ b/service/entityresolution/validators.go @@ -30,6 +30,26 @@ func (m *validateOpAddPolicyStatement) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpBatchDeleteUniqueId struct { +} + +func (*validateOpBatchDeleteUniqueId) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchDeleteUniqueId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchDeleteUniqueIdInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchDeleteUniqueIdInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateIdMappingWorkflow struct { } @@ -634,6 +654,10 @@ func addOpAddPolicyStatementValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpAddPolicyStatement{}, middleware.After) } +func addOpBatchDeleteUniqueIdValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchDeleteUniqueId{}, middleware.After) +} + func addOpCreateIdMappingWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIdMappingWorkflow{}, middleware.After) } @@ -1242,6 +1266,24 @@ func validateOpAddPolicyStatementInput(v *AddPolicyStatementInput) error { } } +func validateOpBatchDeleteUniqueIdInput(v *BatchDeleteUniqueIdInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteUniqueIdInput"} + if v.WorkflowName == nil { + invalidParams.Add(smithy.NewErrParamRequired("WorkflowName")) + } + if v.UniqueIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("UniqueIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateIdMappingWorkflowInput(v *CreateIdMappingWorkflowInput) error { if v == nil { return nil diff --git a/service/gamelift/api_op_CreateContainerGroupDefinition.go b/service/gamelift/api_op_CreateContainerGroupDefinition.go new file mode 100644 index 00000000000..074bc9707cf --- /dev/null +++ b/service/gamelift/api_op_CreateContainerGroupDefinition.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package gamelift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/gamelift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation is used with the Amazon GameLift containers feature, which is +// currently in public preview. Creates a ContainerGroupDefinition resource that +// describes a set of containers for hosting your game server with Amazon GameLift +// managed EC2 hosting. An Amazon GameLift container group is similar to a +// container "task" and "pod". Each container group can have one or more +// containers. Use container group definitions when you create a container fleet. +// Container group definitions determine how Amazon GameLift deploys your +// containers to each instance in a container fleet. You can create two types of +// container groups, based on scheduling strategy: +// - A replica container group manages the containers that run your game server +// application and supporting software. Replica container groups might be +// replicated multiple times on each fleet instance, depending on instance +// resources. +// - A daemon container group manages containers that run other software, such +// as background services, logging, or test processes. You might use a daemon +// container group for processes that need to run only once per fleet instance, or +// processes that need to persist independently of the replica container group. +// +// To create a container group definition, specify a group name, a list of +// container definitions, and maximum total CPU and memory requirements for the +// container group. Specify an operating system and scheduling strategy or use the +// default values. When using the Amazon Web Services CLI tool, you can pass in +// your container definitions as a JSON file. This operation requires Identity and +// Access Management (IAM) permissions to access container images in Amazon ECR +// repositories. See IAM permissions for Amazon GameLift (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-iam-policy-examples.html) +// for help setting the appropriate permissions. If successful, this operation +// creates a new ContainerGroupDefinition resource with an ARN value assigned. You +// can't change the properties of a container group definition. Instead, create a +// new one. Learn more +// - Create a container group definition (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-create-groups.html) +// - Container fleet design guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-design-fleet.html) +// - Create a container definition as a JSON file (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-definitions.html#containers-definitions-create) +func (c *Client) CreateContainerGroupDefinition(ctx context.Context, params *CreateContainerGroupDefinitionInput, optFns ...func(*Options)) (*CreateContainerGroupDefinitionOutput, error) { + if params == nil { + params = &CreateContainerGroupDefinitionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateContainerGroupDefinition", params, optFns, c.addOperationCreateContainerGroupDefinitionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateContainerGroupDefinitionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateContainerGroupDefinitionInput struct { + + // Definitions for all containers in this group. Each container definition + // identifies the container image and specifies configuration settings for the + // container. See the Container fleet design guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-design-fleet.html) + // for container guidelines. + // + // This member is required. + ContainerDefinitions []types.ContainerDefinitionInput + + // A descriptive identifier for the container group definition. The name value + // must be unique in an Amazon Web Services Region. + // + // This member is required. + Name *string + + // The platform that is used by containers in the container group definition. All + // containers in a group must run on the same operating system. + // + // This member is required. + OperatingSystem types.ContainerOperatingSystem + + // The maximum amount of CPU units to allocate to the container group. Set this + // parameter to an integer value in CPU units (1 vCPU is equal to 1024 CPU units). + // All containers in the group share this memory. If you specify CPU limits for + // individual containers, set this parameter based on the following guidelines. The + // value must be equal to or greater than the sum of the CPU limits for all + // containers in the group. + // + // This member is required. + TotalCpuLimit *int32 + + // The maximum amount of memory (in MiB) to allocate to the container group. All + // containers in the group share this memory. If you specify memory limits for + // individual containers, set this parameter based on the following guidelines. The + // value must be (1) greater than the sum of the soft memory limits for all + // containers in the group, and (2) greater than any individual container's hard + // memory limit. + // + // This member is required. + TotalMemoryLimit *int32 + + // The method for deploying the container group across fleet instances. A replica + // container group might have multiple copies on each fleet instance. A daemon + // container group has one copy per fleet instance. Default value is REPLICA . + SchedulingStrategy types.ContainerSchedulingStrategy + + // A list of labels to assign to the container group definition resource. Tags are + // developer-defined key-value pairs. Tagging Amazon Web Services resources are + // useful for resource management, access management and cost allocation. For more + // information, see Tagging Amazon Web Services Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) + // in the Amazon Web Services General Reference. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateContainerGroupDefinitionOutput struct { + + // The properties of the newly created container group definition resource. You + // use this resource to create a container fleet. + ContainerGroupDefinition *types.ContainerGroupDefinition + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateContainerGroupDefinitionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateContainerGroupDefinition{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateContainerGroupDefinition{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateContainerGroupDefinition"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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 = addOpCreateContainerGroupDefinitionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContainerGroupDefinition(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateContainerGroupDefinition(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateContainerGroupDefinition", + } +} diff --git a/service/gamelift/api_op_CreateFleet.go b/service/gamelift/api_op_CreateFleet.go index 3f226979edc..c6851da016d 100644 --- a/service/gamelift/api_op_CreateFleet.go +++ b/service/gamelift/api_op_CreateFleet.go @@ -11,37 +11,63 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a fleet of Amazon Elastic Compute Cloud (Amazon EC2) instances to host -// your custom game server or Realtime Servers. Use this operation to configure the -// computing resources for your fleet and provide instructions for running game -// servers on each instance. Most Amazon GameLift fleets can deploy instances to -// multiple locations, including the home Region (where the fleet is created) and -// an optional set of remote locations. Fleets that are created in the following -// Amazon Web Services Regions support multiple locations: us-east-1 (N. Virginia), -// us-west-2 (Oregon), eu-central-1 (Frankfurt), eu-west-1 (Ireland), -// ap-southeast-2 (Sydney), ap-northeast-1 (Tokyo), and ap-northeast-2 (Seoul). -// Fleets that are created in other Amazon GameLift Regions can deploy instances in -// the fleet's home Region only. All fleet instances use the same configuration -// regardless of location; however, you can adjust capacity settings and turn -// auto-scaling on/off for each location. To create a fleet, choose the hardware -// for your instances, specify a game server build or Realtime script to deploy, -// and provide a runtime configuration to direct Amazon GameLift how to start and -// run game servers on each instance in the fleet. Set permissions for inbound -// traffic to your game servers, and enable optional features as needed. When -// creating a multi-location fleet, provide a list of additional remote locations. -// If you need to debug your fleet, fetch logs, view performance metrics or other -// actions on the fleet, create the development fleet with port 22/3389 open. As a -// best practice, we recommend opening ports for remote access only when you need -// them and closing them when you're finished. If successful, this operation -// creates a new Fleet resource and places it in NEW status, which prompts Amazon -// GameLift to initiate the fleet creation workflow (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-all.html#fleets-creation-workflow) -// . You can track fleet creation by checking fleet status using -// DescribeFleetAttributes and DescribeFleetLocationAttributes /, or by monitoring -// fleet creation events using DescribeFleetEvents . When the fleet status changes -// to ACTIVE , you can enable automatic scaling with PutScalingPolicy and set -// capacity for the home Region with UpdateFleetCapacity . When the status of each -// remote location reaches ACTIVE , you can set capacity by location using -// UpdateFleetCapacity . Learn more Setting up fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Creates a fleet of compute +// resources to host your game servers. Use this operation to set up the following +// types of fleets based on compute type: Managed EC2 fleet An EC2 fleet is a set +// of Amazon Elastic Compute Cloud (Amazon EC2) instances. Your game server build +// is deployed to each fleet instance. Amazon GameLift manages the fleet's +// instances and controls the lifecycle of game server processes, which host game +// sessions for players. EC2 fleets can have instances in multiple locations. Each +// instance in the fleet is designated a Compute . To create an EC2 fleet, provide +// these required parameters: +// - Either BuildId or ScriptId +// - ComputeType set to EC2 (the default value) +// - EC2InboundPermissions +// - EC2InstanceType +// - FleetType +// - Name +// - RuntimeConfiguration with at least one ServerProcesses configuration +// +// If successful, this operation creates a new fleet resource and places it in NEW +// status while Amazon GameLift initiates the fleet creation workflow (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-all.html#fleets-creation-workflow) +// . To debug your fleet, fetch logs, view performance metrics or other actions on +// the fleet, create a development fleet with port 22/3389 open. As a best +// practice, we recommend opening ports for remote access only when you need them +// and closing them when you're finished. When the fleet status is ACTIVE, you can +// adjust capacity settings and turn autoscaling on/off for each location. Managed +// container fleet A container fleet is a set of Amazon Elastic Compute Cloud +// (Amazon EC2) instances. Your container architecture is deployed to each fleet +// instance based on the fleet configuration. Amazon GameLift manages the +// containers on each fleet instance and controls the lifecycle of game server +// processes, which host game sessions for players. Container fleets can have +// instances in multiple locations. Each container on an instance that runs game +// server processes is registered as a Compute . To create a container fleet, +// provide these required parameters: +// - ComputeType set to CONTAINER +// - ContainerGroupsConfiguration +// - EC2InboundPermissions +// - EC2InstanceType +// - FleetType set to ON_DEMAND +// - Name +// - RuntimeConfiguration with at least one ServerProcesses configuration +// +// If successful, this operation creates a new fleet resource and places it in NEW +// status while Amazon GameLift initiates the fleet creation workflow (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-all.html#fleets-creation-workflow) +// . When the fleet status is ACTIVE, you can adjust capacity settings and turn +// autoscaling on/off for each location. Anywhere fleet An Anywhere fleet +// represents compute resources that are not owned or managed by Amazon GameLift. +// You might create an Anywhere fleet with your local machine for testing, or use +// one to host game servers with on-premises hardware or other game hosting +// solutions. To create an Anywhere fleet, provide these required parameters: +// - ComputeType set to ANYWHERE +// - Locations specifying a custom location +// - Name +// +// If successful, this operation creates a new fleet resource and places it in +// ACTIVE status. You can register computes with a fleet in ACTIVE status. Learn +// more Setting up fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// Setting up a container fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-build-fleet.html) // Debug fleet creation issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html#fleets-creating-debug-creation) // Multi-location fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) CreateFleet(ctx context.Context, params *CreateFleetInput, optFns ...func(*Options)) (*CreateFleetOutput, error) { @@ -70,10 +96,10 @@ type CreateFleetInput struct { // Amazon GameLift Anywhere configuration options. AnywhereConfiguration *types.AnywhereConfiguration - // The unique identifier for a custom game server build to be deployed on fleet - // instances. You can use either the build ID or ARN. The build must be uploaded to - // Amazon GameLift and in READY status. This fleet property can't be changed after - // the fleet is created. + // The unique identifier for a custom game server build to be deployed to a fleet + // with compute type EC2 . You can use either the build ID or ARN. The build must + // be uploaded to Amazon GameLift and in READY status. This fleet property can't + // be changed after the fleet is created. BuildId *string // Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. Amazon @@ -90,24 +116,45 @@ type CreateFleetInput struct { // in the Certificate Manager User Guide. CertificateConfiguration *types.CertificateConfiguration - // The type of compute resource used to host your game servers. You can use your - // own compute resources with Amazon GameLift Anywhere or use Amazon EC2 instances - // with managed Amazon GameLift. By default, this property is set to EC2 . + // The type of compute resource used to host your game servers. + // - EC2 – The game server build is deployed to Amazon EC2 instances for cloud + // hosting. This is the default setting. + // - CONTAINER – Container images with your game server build and supporting + // software are deployed to Amazon EC2 instances for cloud hosting. With this + // compute type, you must specify the ContainerGroupsConfiguration parameter. + // - ANYWHERE – Game servers or container images with your game server and + // supporting software are deployed to compute resources that are provided and + // managed by you. With this compute type, you can also set the + // AnywhereConfiguration parameter. ComputeType types.ComputeType + // The container groups to deploy to instances in the container fleet and other + // fleet-level configuration settings. Use the CreateContainerGroupDefinition + // action to create container groups. A container fleet must have exactly one + // replica container group, and can optionally have one daemon container group. You + // can't change this property after you create the fleet. + ContainerGroupsConfiguration *types.ContainerGroupsConfiguration + // A description for the fleet. Description *string - // The allowed IP address ranges and port settings that allow inbound traffic to - // access game sessions on this fleet. If the fleet is hosting a custom game build, - // this property must be set before players can connect to game sessions. For + // The IP address ranges and port settings that allow inbound traffic to access + // game server processes and other processes on this fleet. Set this parameter for + // EC2 and container fleets. You can leave this parameter empty when creating the + // fleet, but you must call UpdateFleetPortSettings to set it before players can + // connect to game sessions. As a best practice, we recommend opening ports for + // remote access only when you need them and closing them when you're finished. For // Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges. + // To manage inbound access for a container fleet, set this parameter to the same + // port numbers that you set for the fleet's connection port range. During the life + // of the fleet, update this parameter to control which connection ports are open + // to inbound traffic. EC2InboundPermissions []types.IpPermission - // The Amazon GameLift-supported Amazon EC2 instance type to use for all fleet - // instances. Instance type determines the computing resources that will be used to - // host your game servers, including CPU, memory, storage, and networking capacity. - // See Amazon Elastic Compute Cloud Instance Types (http://aws.amazon.com/ec2/instance-types/) + // The Amazon GameLift-supported Amazon EC2 instance type to use with EC2 and + // container fleets. Instance type determines the computing resources that will be + // used to host your game servers, including CPU, memory, storage, and networking + // capacity. See Amazon Elastic Compute Cloud Instance Types (http://aws.amazon.com/ec2/instance-types/) // for detailed descriptions of Amazon EC2 instance types. EC2InstanceType types.EC2InstanceType @@ -128,12 +175,12 @@ type CreateFleetInput struct { InstanceRoleArn *string // Prompts Amazon GameLift to generate a shared credentials file for the IAM role - // defined in InstanceRoleArn . The shared credentials file is stored on each fleet - // instance and refreshed as needed. Use shared credentials for applications that - // are deployed along with the game server executable, if the game server is - // integrated with server SDK version 5.x. For more information about using shared - // credentials, see Communicate with other Amazon Web Services resources from your - // fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html) + // that's defined in InstanceRoleArn . The shared credentials file is stored on + // each fleet instance and refreshed as needed. Use shared credentials for + // applications that are deployed along with the game server executable, if the + // game server is integrated with server SDK version 5.x. For more information + // about using shared credentials, see Communicate with other Amazon Web Services + // resources from your fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html) // . InstanceRoleCredentialsProvider types.InstanceRoleCredentialsProvider @@ -141,10 +188,10 @@ type CreateFleetInput struct { // of the fleet. This parameter can only be used when creating fleets in Amazon Web // Services Regions that support multiple locations. You can add any Amazon // GameLift-supported Amazon Web Services Region as a remote location, in the form - // of an Amazon Web Services Region code such as us-west-2 . To create a fleet with - // instances in the home Region only, don't use this parameter. To use this - // parameter, Amazon GameLift requires you to use your home location in the - // request. + // of an Amazon Web Services Region code, such as us-west-2 or Local Zone code. To + // create a fleet with instances in the home Region only, don't set this parameter. + // When using this parameter, Amazon GameLift requires you to include your home + // location in the request. Locations []types.LocationConfiguration // This parameter is no longer used. To specify where Amazon GameLift should store @@ -186,19 +233,20 @@ type CreateFleetInput struct { // create on instances in this fleet within a specified span of time. ResourceCreationLimitPolicy *types.ResourceCreationLimitPolicy - // Instructions for how to launch and maintain server processes on instances in - // the fleet. The runtime configuration defines one or more server process - // configurations, each identifying a build executable or Realtime script file and - // the number of processes of that type to run concurrently. The - // RuntimeConfiguration parameter is required unless the fleet is being configured - // using the older parameters ServerLaunchPath and ServerLaunchParameters , which - // are still supported for backward compatibility. + // Instructions for how to launch and run server processes on the fleet. Set + // runtime configuration for EC2 fleets and container fleets. For an Anywhere + // fleets, set this parameter only if the fleet is running the Amazon GameLift + // Agent. The runtime configuration defines one or more server process + // configurations. Each server process identifies a game executable or Realtime + // script file and the number of processes to run concurrently. This parameter + // replaces the parameters ServerLaunchPath and ServerLaunchParameters , which are + // still supported for backward compatibility. RuntimeConfiguration *types.RuntimeConfiguration - // The unique identifier for a Realtime configuration script to be deployed on - // fleet instances. You can use either the script ID or ARN. Scripts must be - // uploaded to Amazon GameLift prior to creating the fleet. This fleet property - // can't be changed after the fleet is created. + // The unique identifier for a Realtime configuration script to be deployed to a + // fleet with compute type EC2 . You can use either the script ID or ARN. Scripts + // must be uploaded to Amazon GameLift prior to creating the fleet. This fleet + // property can't be changed after the fleet is created. ScriptId *string // This parameter is no longer used. Specify server launch parameters using the diff --git a/service/gamelift/api_op_CreateFleetLocations.go b/service/gamelift/api_op_CreateFleetLocations.go index 6f62a23ad01..4f93225f1b2 100644 --- a/service/gamelift/api_op_CreateFleetLocations.go +++ b/service/gamelift/api_op_CreateFleetLocations.go @@ -11,17 +11,18 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds remote locations to a fleet and begins populating the new locations with -// EC2 instances. The new instances conform to the fleet's instance type, -// auto-scaling, and other configuration settings. This operation cannot be used -// with fleets that don't support remote locations. Fleets can have multiple -// locations only if they reside in Amazon Web Services Regions that support this -// feature and were created after the feature was released in March 2021. To add -// fleet locations, specify the fleet to be updated and provide a list of one or -// more locations. If successful, this operation returns the list of added -// locations with their status set to NEW . Amazon GameLift initiates the process -// of starting an instance in each added location. You can track the status of each -// new location by monitoring location creation events using DescribeFleetEvents (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetEvents.html) +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Adds remote locations to an EC2 +// or container fleet and begins populating the new locations with instances. The +// new instances conform to the fleet's instance type, auto-scaling, and other +// configuration settings. You can't add remote locations to a fleet that resides +// in an Amazon Web Services Region that doesn't support multiple locations. Fleets +// created prior to March 2021 can't support multiple locations. To add fleet +// locations, specify the fleet to be updated and provide a list of one or more +// locations. If successful, this operation returns the list of added locations +// with their status set to NEW . Amazon GameLift initiates the process of starting +// an instance in each added location. You can track the status of each new +// location by monitoring location creation events using DescribeFleetEvents (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetEvents.html) // . Learn more Setting up fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // Multi-location fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) CreateFleetLocations(ctx context.Context, params *CreateFleetLocationsInput, optFns ...func(*Options)) (*CreateFleetLocationsOutput, error) { diff --git a/service/gamelift/api_op_DeleteContainerGroupDefinition.go b/service/gamelift/api_op_DeleteContainerGroupDefinition.go new file mode 100644 index 00000000000..f3a77e459e6 --- /dev/null +++ b/service/gamelift/api_op_DeleteContainerGroupDefinition.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package gamelift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation is used with the Amazon GameLift containers feature, which is +// currently in public preview. Deletes a container group definition resource. You +// can delete a container group definition if there are no fleets using the +// definition. To delete a container group definition, identify the resource to +// delete. Learn more +// - Manage a container group definition (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-create-groups.html) +func (c *Client) DeleteContainerGroupDefinition(ctx context.Context, params *DeleteContainerGroupDefinitionInput, optFns ...func(*Options)) (*DeleteContainerGroupDefinitionOutput, error) { + if params == nil { + params = &DeleteContainerGroupDefinitionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteContainerGroupDefinition", params, optFns, c.addOperationDeleteContainerGroupDefinitionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteContainerGroupDefinitionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteContainerGroupDefinitionInput struct { + + // The unique identifier for the container group definition to delete. You can use + // either the Name or ARN value. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteContainerGroupDefinitionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteContainerGroupDefinitionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteContainerGroupDefinition{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteContainerGroupDefinition{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteContainerGroupDefinition"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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 = addOpDeleteContainerGroupDefinitionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteContainerGroupDefinition(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteContainerGroupDefinition(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteContainerGroupDefinition", + } +} diff --git a/service/gamelift/api_op_DeleteFleet.go b/service/gamelift/api_op_DeleteFleet.go index 8aadfe028d0..38a697cac3f 100644 --- a/service/gamelift/api_op_DeleteFleet.go +++ b/service/gamelift/api_op_DeleteFleet.go @@ -10,15 +10,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes all resources and information related a fleet. Any current fleet -// instances, including those in remote locations, are shut down. You don't need to -// call DeleteFleetLocations separately. If the fleet being deleted has a VPC -// peering connection, you first need to get a valid authorization (good for 24 -// hours) by calling CreateVpcPeeringAuthorization (https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateVpcPeeringAuthorization.html) -// . You do not need to explicitly delete the VPC peering connection. To delete a -// fleet, specify the fleet ID to be terminated. During the deletion process the +// Deletes all resources and information related to a fleet and shuts down any +// currently running fleet instances, including those in remote locations. If the +// fleet being deleted has a VPC peering connection, you first need to get a valid +// authorization (good for 24 hours) by calling CreateVpcPeeringAuthorization (https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateVpcPeeringAuthorization.html) +// . You don't need to explicitly delete the VPC peering connection. To delete a +// fleet, specify the fleet ID to be terminated. During the deletion process, the // fleet status is changed to DELETING . When completed, the status switches to -// TERMINATED and the fleet event FLEET_DELETED is sent. Learn more Setting up +// TERMINATED and the fleet event FLEET_DELETED is emitted. Learn more Setting up // Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) DeleteFleet(ctx context.Context, params *DeleteFleetInput, optFns ...func(*Options)) (*DeleteFleetOutput, error) { if params == nil { diff --git a/service/gamelift/api_op_DeregisterCompute.go b/service/gamelift/api_op_DeregisterCompute.go index 2b2a04e37f0..243bc70e0bd 100644 --- a/service/gamelift/api_op_DeregisterCompute.go +++ b/service/gamelift/api_op_DeregisterCompute.go @@ -10,8 +10,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes a compute resource from an Amazon GameLift Anywhere fleet. Deregistered -// computes can no longer host game sessions through Amazon GameLift. +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Removes a compute resource from +// an Amazon GameLift Anywhere fleet or container fleet. Deregistered computes can +// no longer host game sessions through Amazon GameLift. For an Anywhere fleet or a +// container fleet that's running the Amazon GameLift Agent, the Agent handles all +// compute registry tasks for you. For an Anywhere fleet that doesn't use the +// Agent, call this operation to deregister fleet computes. To deregister a +// compute, call this operation from the compute that's being deregistered and +// specify the compute name and the fleet ID. func (c *Client) DeregisterCompute(ctx context.Context, params *DeregisterComputeInput, optFns ...func(*Options)) (*DeregisterComputeOutput, error) { if params == nil { params = &DeregisterComputeInput{} @@ -29,7 +36,11 @@ func (c *Client) DeregisterCompute(ctx context.Context, params *DeregisterComput type DeregisterComputeInput struct { - // The name of the compute resource to remove from the specified Anywhere fleet. + // The unique identifier of the compute resource to deregister. For an Anywhere + // fleet compute, use the registered compute name. For a container fleet, use the + // compute name (for example, + // a123b456c789012d3e4567f8a901b23c/1a234b56-7cd8-9e0f-a1b2-c34d567ef8a9 ) or the + // compute ARN. // // This member is required. ComputeName *string diff --git a/service/gamelift/api_op_DescribeCompute.go b/service/gamelift/api_op_DescribeCompute.go index 4602b001997..823d535f21f 100644 --- a/service/gamelift/api_op_DescribeCompute.go +++ b/service/gamelift/api_op_DescribeCompute.go @@ -11,13 +11,19 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves properties for a compute resource in an Amazon GameLift fleet. Call -// ListCompute to get a list of compute resources in a fleet. You can request -// information for computes in either managed EC2 fleets or Anywhere fleets. To -// request compute properties, specify the compute name and fleet ID. If -// successful, this operation returns details for the requested compute resource. -// For managed EC2 fleets, this operation returns the fleet's EC2 instances. For -// Anywhere fleets, this operation returns the fleet's registered computes. +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Retrieves properties for a +// compute resource in an Amazon GameLift fleet. To get a list of all computes in a +// fleet, call ListCompute . To request information on a specific compute, provide +// the fleet ID and compute name. If successful, this operation returns details for +// the requested compute resource. Depending on the fleet's compute type, the +// result includes the following information: +// - For EC2 fleets, this operation returns information about the EC2 instance. +// - For ANYWHERE fleets, this operation returns information about the registered +// compute. +// - For CONTAINER fleets, this operation returns information about the container +// that's registered as a compute, and the instance it's running on. The compute +// name is the container name. func (c *Client) DescribeCompute(ctx context.Context, params *DescribeComputeInput, optFns ...func(*Options)) (*DescribeComputeOutput, error) { if params == nil { params = &DescribeComputeInput{} @@ -36,14 +42,16 @@ func (c *Client) DescribeCompute(ctx context.Context, params *DescribeComputeInp type DescribeComputeInput struct { // The unique identifier of the compute resource to retrieve properties for. For - // an Anywhere fleet compute, use the registered compute name. For a managed EC2 - // fleet instance, use the instance ID. + // an Anywhere fleet compute, use the registered compute name. For an EC2 fleet + // instance, use the instance ID. For a container fleet, use the compute name (for + // example, a123b456c789012d3e4567f8a901b23c/1a234b56-7cd8-9e0f-a1b2-c34d567ef8a9 ) + // or the compute ARN. // // This member is required. ComputeName *string - // A unique identifier for the fleet that the compute is registered to. You can - // use either the fleet ID or ARN value. + // A unique identifier for the fleet that the compute belongs to. You can use + // either the fleet ID or ARN value. // // This member is required. FleetId *string diff --git a/service/gamelift/api_op_DescribeContainerGroupDefinition.go b/service/gamelift/api_op_DescribeContainerGroupDefinition.go new file mode 100644 index 00000000000..59a85b9b564 --- /dev/null +++ b/service/gamelift/api_op_DescribeContainerGroupDefinition.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package gamelift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/gamelift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation is used with the Amazon GameLift containers feature, which is +// currently in public preview. Retrieves the properties of a container group +// definition, including all container definitions in the group. To retrieve a +// container group definition, provide a resource identifier. If successful, this +// operation returns the complete properties of the container group definition. +// Learn more +// - Manage a container group definition (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-create-groups.html) +func (c *Client) DescribeContainerGroupDefinition(ctx context.Context, params *DescribeContainerGroupDefinitionInput, optFns ...func(*Options)) (*DescribeContainerGroupDefinitionOutput, error) { + if params == nil { + params = &DescribeContainerGroupDefinitionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeContainerGroupDefinition", params, optFns, c.addOperationDescribeContainerGroupDefinitionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeContainerGroupDefinitionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeContainerGroupDefinitionInput struct { + + // The unique identifier for the container group definition to retrieve properties + // for. You can use either the Name or ARN value. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DescribeContainerGroupDefinitionOutput struct { + + // The properties of the requested container group definition resource. + ContainerGroupDefinition *types.ContainerGroupDefinition + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeContainerGroupDefinitionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeContainerGroupDefinition{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeContainerGroupDefinition{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeContainerGroupDefinition"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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 = addOpDescribeContainerGroupDefinitionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeContainerGroupDefinition(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeContainerGroupDefinition(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeContainerGroupDefinition", + } +} diff --git a/service/gamelift/api_op_DescribeFleetAttributes.go b/service/gamelift/api_op_DescribeFleetAttributes.go index 8d6411840a1..23115dcc3c0 100644 --- a/service/gamelift/api_op_DescribeFleetAttributes.go +++ b/service/gamelift/api_op_DescribeFleetAttributes.go @@ -11,11 +11,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves core fleet-wide properties, including the computing hardware and -// deployment configuration for all instances in the fleet. This operation can be -// used in the following ways: -// - To get attributes for one or more specific fleets, provide a list of fleet -// IDs or fleet ARNs. +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Retrieves core fleet-wide +// properties for fleets in an Amazon Web Services Region. Properties include the +// computing hardware and deployment configuration for instances in the fleet. You +// can use this operation in the following ways: +// - To get attributes for specific fleets, provide a list of fleet IDs or fleet +// ARNs. // - To get attributes for all fleets, do not provide a fleet identifier. // // When requesting attributes for multiple fleets, use the pagination parameters diff --git a/service/gamelift/api_op_DescribeFleetCapacity.go b/service/gamelift/api_op_DescribeFleetCapacity.go index cbfd5357130..d6cba129343 100644 --- a/service/gamelift/api_op_DescribeFleetCapacity.go +++ b/service/gamelift/api_op_DescribeFleetCapacity.go @@ -11,11 +11,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the resource capacity settings for one or more fleets. The data -// returned includes the current fleet capacity (number of EC2 instances), and -// settings that can control how capacity scaling. For fleets with remote -// locations, this operation retrieves data for the fleet's home Region only. This -// operation can be used in the following ways: +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Retrieves the resource capacity +// settings for one or more fleets. For a container fleet, this operation also +// returns counts for replica container groups. With multi-location fleets, this +// operation retrieves data for the fleet's home Region only. To retrieve capacity +// for remote locations, see DescribeFleetLocationCapacity . This operation can be +// used in the following ways: // - To get capacity data for one or more specific fleets, provide a list of // fleet IDs or fleet ARNs. // - To get capacity data for all fleets, do not provide a fleet identifier. @@ -23,12 +25,11 @@ import ( // When requesting multiple fleets, use the pagination parameters to retrieve // results as a set of sequential pages. If successful, a FleetCapacity object is // returned for each requested fleet ID. Each FleetCapacity object includes a -// Location property, which is set to the fleet's home Region. When a list of fleet -// IDs is provided, attribute objects are returned only for fleets that currently -// exist. Some API operations may limit the number of fleet IDs that are allowed in -// one request. If a request exceeds this limit, the request fails and the error -// message includes the maximum allowed. Learn more Setting up Amazon GameLift -// fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// Location property, which is set to the fleet's home Region. Capacity values are +// returned only for fleets that currently exist. Some API operations may limit the +// number of fleet IDs that are allowed in one request. If a request exceeds this +// limit, the request fails and the error message includes the maximum allowed. +// Learn more Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // GameLift metrics for fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html#gamelift-metrics-fleet) func (c *Client) DescribeFleetCapacity(ctx context.Context, params *DescribeFleetCapacityInput, optFns ...func(*Options)) (*DescribeFleetCapacityOutput, error) { if params == nil { diff --git a/service/gamelift/api_op_DescribeFleetLocationCapacity.go b/service/gamelift/api_op_DescribeFleetLocationCapacity.go index 297a5a4782d..964ab7575ac 100644 --- a/service/gamelift/api_op_DescribeFleetLocationCapacity.go +++ b/service/gamelift/api_op_DescribeFleetLocationCapacity.go @@ -13,10 +13,11 @@ import ( // Retrieves the resource capacity settings for a fleet location. The data // returned includes the current capacity (number of EC2 instances) and some -// scaling settings for the requested fleet location. Use this operation to -// retrieve capacity information for a fleet's remote location or home Region (you -// can also retrieve home Region capacity by calling DescribeFleetCapacity ). To -// retrieve capacity data, identify a fleet and location. If successful, a +// scaling settings for the requested fleet location. For a container fleet, this +// operation also returns counts for replica container groups. Use this operation +// to retrieve capacity information for a fleet's remote location or home Region +// (you can also retrieve home Region capacity by calling DescribeFleetCapacity ). +// To retrieve capacity data, identify a fleet and location. If successful, a // FleetCapacity object is returned for the requested fleet location. Learn more // Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) // GameLift metrics for fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html#gamelift-metrics-fleet) diff --git a/service/gamelift/api_op_DescribeFleetPortSettings.go b/service/gamelift/api_op_DescribeFleetPortSettings.go index a5e0d74e2eb..9102987d8fb 100644 --- a/service/gamelift/api_op_DescribeFleetPortSettings.go +++ b/service/gamelift/api_op_DescribeFleetPortSettings.go @@ -12,20 +12,21 @@ import ( ) // Retrieves a fleet's inbound connection permissions. Connection permissions -// specify the range of IP addresses and port settings that incoming traffic can -// use to access server processes in the fleet. Game sessions that are running on -// instances in the fleet must use connections that fall in this range. This -// operation can be used in the following ways: -// - To retrieve the inbound connection permissions for a fleet, identify the -// fleet's unique identifier. +// specify IP addresses and port settings that incoming traffic can use to access +// server processes in the fleet. Game server processes that are running in the +// fleet must use a port that falls within this range. To connect to game server +// processes on a container fleet, the port settings should include one or more of +// the fleet's connection ports. Use this operation in the following ways: +// - To retrieve the port settings for a fleet, identify the fleet's unique +// identifier. // - To check the status of recent updates to a fleet remote location, specify // the fleet ID and a location. Port setting updates can take time to propagate // across all locations. // // If successful, a set of IpPermission objects is returned for the requested -// fleet ID. When a location is specified, a pending status is included. If the -// requested fleet has been deleted, the result set is empty. Learn more Setting -// up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// fleet ID. When specifying a location, this operation returns a pending status. +// If the requested fleet has been deleted, the result set is empty. Learn more +// Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) DescribeFleetPortSettings(ctx context.Context, params *DescribeFleetPortSettingsInput, optFns ...func(*Options)) (*DescribeFleetPortSettingsOutput, error) { if params == nil { params = &DescribeFleetPortSettingsInput{} diff --git a/service/gamelift/api_op_DescribeRuntimeConfiguration.go b/service/gamelift/api_op_DescribeRuntimeConfiguration.go index e6098dd94bb..4d2a6b8f39b 100644 --- a/service/gamelift/api_op_DescribeRuntimeConfiguration.go +++ b/service/gamelift/api_op_DescribeRuntimeConfiguration.go @@ -12,8 +12,12 @@ import ( ) // Retrieves a fleet's runtime configuration settings. The runtime configuration -// tells Amazon GameLift which server processes to run (and how) on each instance -// in the fleet. To get the runtime configuration that is currently in forces for a +// determines which server processes run, and how, on computes in the fleet. For +// managed EC2 fleets, the runtime configuration describes server processes that +// run on each fleet instance. For container fleets, the runtime configuration +// describes server processes that run in each replica container group. You can +// update a fleet's runtime configuration at any time using +// UpdateRuntimeConfiguration . To get the current runtime configuration for a // fleet, provide the fleet ID. If successful, a RuntimeConfiguration object is // returned for the requested fleet. If the requested fleet has been deleted, the // result set is empty. Learn more Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) @@ -46,8 +50,8 @@ type DescribeRuntimeConfigurationInput struct { type DescribeRuntimeConfigurationOutput struct { - // Instructions that describe how server processes should be launched and - // maintained on each instance in the fleet. + // Instructions that describe how server processes are launched and maintained on + // computes in the fleet. RuntimeConfiguration *types.RuntimeConfiguration // Metadata pertaining to the operation's result. diff --git a/service/gamelift/api_op_GetComputeAccess.go b/service/gamelift/api_op_GetComputeAccess.go index a31152a49c7..44410adb584 100644 --- a/service/gamelift/api_op_GetComputeAccess.go +++ b/service/gamelift/api_op_GetComputeAccess.go @@ -11,20 +11,23 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Requests authorization to remotely connect to a compute resource in an Amazon -// GameLift fleet. Call this action to connect to an instance in a managed EC2 -// fleet if the fleet's game build uses Amazon GameLift server SDK 5.x or later. To -// connect to instances with game builds that use server SDK 4.x or earlier, call -// GetInstanceAccess . To request access to a compute, identify the specific EC2 -// instance and the fleet it belongs to. You can retrieve instances for a managed -// EC2 fleet by calling ListCompute . If successful, this operation returns a set -// of temporary Amazon Web Services credentials, including a two-part access key -// and a session token. Use these credentials with Amazon EC2 Systems Manager (SSM) -// to start a session with the compute. For more details, see Starting a session -// (CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html#sessions-start-cli) -// in the Amazon EC2 Systems Manager User Guide. Learn more Remotely connect to -// fleet instances (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html) -// Debug fleet issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html) +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Requests authorization to +// remotely connect to a hosting resource in a Amazon GameLift managed fleet. This +// operation is not used with Amazon GameLift Anywhere fleets To request access, +// specify the compute name and the fleet ID. If successful, this operation returns +// a set of temporary Amazon Web Services credentials, including a two-part access +// key and a session token. EC2 fleets With an EC2 fleet (where compute type is EC2 +// ), use these credentials with Amazon EC2 Systems Manager (SSM) to start a +// session with the compute. For more details, see Starting a session (CLI) (https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html#sessions-start-cli) +// in the Amazon EC2 Systems Manager User Guide. Container fleets With a container +// fleet (where compute type is CONTAINER ), use these credentials and the target +// value with SSM to connect to the fleet instance where the container is running. +// After you're connected to the instance, use Docker commands to interact with the +// container. Learn more +// - Remotely connect to fleet instances (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html) +// - Debug fleet issues (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html) +// - Remotely connect to a container fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-remote-access.html) func (c *Client) GetComputeAccess(ctx context.Context, params *GetComputeAccessInput, optFns ...func(*Options)) (*GetComputeAccessOutput, error) { if params == nil { params = &GetComputeAccessInput{} @@ -42,13 +45,16 @@ func (c *Client) GetComputeAccess(ctx context.Context, params *GetComputeAccessI type GetComputeAccessInput struct { - // A unique identifier for the compute resource that you want to connect to. You - // can use either a registered compute name or an instance ID. + // A unique identifier for the compute resource that you want to connect to. For + // an EC2 fleet compute, use the instance ID. For a container fleet, use the + // compute name (for example, + // a123b456c789012d3e4567f8a901b23c/1a234b56-7cd8-9e0f-a1b2-c34d567ef8a9 ) or the + // compute ARN. // // This member is required. ComputeName *string - // A unique identifier for the fleet that contains the compute resource you want + // A unique identifier for the fleet that holds the compute resource that you want // to connect to. You can use either the fleet ID or ARN value. // // This member is required. @@ -79,9 +85,13 @@ type GetComputeAccessOutput struct { // arn:aws:gamelift:::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912 . FleetArn *string - // The ID of the fleet that contains the compute resource to be accessed. + // The ID of the fleet that holds the compute resource to be accessed. FleetId *string + // (For container fleets only) The instance ID where the compute resource is + // running. + Target *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/gamelift/api_op_GetComputeAuthToken.go b/service/gamelift/api_op_GetComputeAuthToken.go index 8c8fa5412e3..6da8eba2dc5 100644 --- a/service/gamelift/api_op_GetComputeAuthToken.go +++ b/service/gamelift/api_op_GetComputeAuthToken.go @@ -11,13 +11,23 @@ import ( "time" ) -// Requests an authentication token from Amazon GameLift for a registered compute -// in an Anywhere fleet. The game servers that are running on the compute use this -// token to authenticate with the Amazon GameLift service. Each server process must -// provide a valid authentication token in its call to the Amazon GameLift server -// SDK action InitSDK() . Authentication tokens are valid for a limited time span. -// Use a mechanism to regularly request a fresh authentication token before the -// current token expires. Learn more +// Requests an authentication token from Amazon GameLift for a compute resource in +// an Amazon GameLift Anywhere fleet or container fleet. Game servers that are +// running on the compute use this token to communicate with the Amazon GameLift +// service, such as when calling the Amazon GameLift server SDK action InitSDK() . +// Authentication tokens are valid for a limited time span, so you need to request +// a fresh token before the current token expires. Use this operation based on the +// fleet compute type: +// - For EC2 fleets, auth token retrieval and refresh is handled automatically. +// All game servers that are running on all fleet instances have access to a valid +// auth token. +// - For ANYWHERE and CONTAINER fleets, if you're using the Amazon GameLift +// Agent, auth token retrieval and refresh is handled automatically for any +// container or Anywhere compute where the Agent is running. If you're not using +// the Agent, create a mechanism to retrieve and refresh auth tokens for computes +// that are running game server processes. +// +// Learn more // - Create an Anywhere fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-anywhere.html) // - Test your integration (https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing.html) // - Server SDK reference guides (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) @@ -40,7 +50,11 @@ func (c *Client) GetComputeAuthToken(ctx context.Context, params *GetComputeAuth type GetComputeAuthTokenInput struct { // The name of the compute resource you are requesting the authentication token - // for. + // for. For an Anywhere fleet compute, use the registered compute name. For an EC2 + // fleet instance, use the instance ID. For a container fleet, use the compute name + // (for example, + // a123b456c789012d3e4567f8a901b23c/1a234b56-7cd8-9e0f-a1b2-c34d567ef8a9 ) or the + // compute ARN. // // This member is required. ComputeName *string diff --git a/service/gamelift/api_op_ListCompute.go b/service/gamelift/api_op_ListCompute.go index 2011792dcc8..7a12d68f5ba 100644 --- a/service/gamelift/api_op_ListCompute.go +++ b/service/gamelift/api_op_ListCompute.go @@ -11,13 +11,22 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the compute resources in an Amazon GameLift fleet. You can request -// information for either managed EC2 fleets or Anywhere fleets. To request a list -// of computes, specify the fleet ID. You can filter the result set by location. -// Use the pagination parameters to retrieve results in a set of sequential pages. -// If successful, this operation returns the compute resource for the requested -// fleet. For managed EC2 fleets, it returns a list of EC2 instances. For Anywhere -// fleets, it returns a list of registered compute names. +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Retrieves information on the +// compute resources in an Amazon GameLift fleet. To request a list of computes, +// specify the fleet ID. Use the pagination parameters to retrieve results in a set +// of sequential pages. You can filter the result set by location. If successful, +// this operation returns information on all computes in the requested fleet. +// Depending on the fleet's compute type, the result includes the following +// information: +// - For EC2 fleets, this operation returns information about the EC2 instance. +// Compute names are instance IDs. +// - For ANYWHERE fleets, this operation returns the compute names and details +// provided when the compute was registered with RegisterCompute . The +// GameLiftServiceSdkEndpoint or GameLiftAgentEndpoint is included. +// - For CONTAINER fleets, this operation returns information about containers +// that are registered as computes, and the instances they're running on. Compute +// names are container names. func (c *Client) ListCompute(ctx context.Context, params *ListComputeInput, optFns ...func(*Options)) (*ListComputeOutput, error) { if params == nil { params = &ListComputeInput{} @@ -44,7 +53,10 @@ type ListComputeInput struct { // get results as a set of sequential pages. Limit *int32 - // The name of a location to retrieve compute resources for. + // The name of a location to retrieve compute resources for. For an Amazon + // GameLift Anywhere fleet, use a custom location. For a multi-location EC2 or + // container fleet, provide a Amazon Web Services Region or Local Zone code (for + // example: us-west-2 or us-west-2-lax-1 ). Location *string // A token that indicates the start of the next sequential page of results. Use diff --git a/service/gamelift/api_op_ListContainerGroupDefinitions.go b/service/gamelift/api_op_ListContainerGroupDefinitions.go new file mode 100644 index 00000000000..90e2803e391 --- /dev/null +++ b/service/gamelift/api_op_ListContainerGroupDefinitions.go @@ -0,0 +1,251 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package gamelift + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/gamelift/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation is used with the Amazon GameLift containers feature, which is +// currently in public preview. Retrieves all container group definitions for the +// Amazon Web Services account and Amazon Web Services Region that are currently in +// use. You can filter the result set by the container groups' scheduling strategy. +// Use the pagination parameters to retrieve results in a set of sequential pages. +// This operation returns the list of container group definitions in no particular +// order. Learn more +// - Manage a container group definition (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-create-groups.html) +func (c *Client) ListContainerGroupDefinitions(ctx context.Context, params *ListContainerGroupDefinitionsInput, optFns ...func(*Options)) (*ListContainerGroupDefinitionsOutput, error) { + if params == nil { + params = &ListContainerGroupDefinitionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListContainerGroupDefinitions", params, optFns, c.addOperationListContainerGroupDefinitionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListContainerGroupDefinitionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListContainerGroupDefinitionsInput struct { + + // The maximum number of results to return. Use this parameter with NextToken to + // get results as a set of sequential pages. + Limit *int32 + + // A token that indicates the start of the next sequential page of results. Use + // the token that is returned with a previous call to this operation. To start at + // the beginning of the result set, do not specify a value. + NextToken *string + + // The type of container group definitions to retrieve. + // - DAEMON -- Daemon container groups run background processes and are deployed + // once per fleet instance. + // - REPLICA -- Replica container groups run your game server application and + // supporting software. Replica groups might be deployed multiple times per fleet + // instance. + SchedulingStrategy types.ContainerSchedulingStrategy + + noSmithyDocumentSerde +} + +type ListContainerGroupDefinitionsOutput struct { + + // A result set of container group definitions that match the request. + ContainerGroupDefinitions []types.ContainerGroupDefinition + + // A token that indicates where to resume retrieving results on the next call to + // this operation. If no token is returned, these results represent the end of the + // list. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListContainerGroupDefinitionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListContainerGroupDefinitions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListContainerGroupDefinitions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListContainerGroupDefinitions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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_opListContainerGroupDefinitions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListContainerGroupDefinitionsAPIClient is a client that implements the +// ListContainerGroupDefinitions operation. +type ListContainerGroupDefinitionsAPIClient interface { + ListContainerGroupDefinitions(context.Context, *ListContainerGroupDefinitionsInput, ...func(*Options)) (*ListContainerGroupDefinitionsOutput, error) +} + +var _ ListContainerGroupDefinitionsAPIClient = (*Client)(nil) + +// ListContainerGroupDefinitionsPaginatorOptions is the paginator options for +// ListContainerGroupDefinitions +type ListContainerGroupDefinitionsPaginatorOptions struct { + // The maximum number of results to return. Use this parameter with NextToken to + // get results as a set of sequential pages. + 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 +} + +// ListContainerGroupDefinitionsPaginator is a paginator for +// ListContainerGroupDefinitions +type ListContainerGroupDefinitionsPaginator struct { + options ListContainerGroupDefinitionsPaginatorOptions + client ListContainerGroupDefinitionsAPIClient + params *ListContainerGroupDefinitionsInput + nextToken *string + firstPage bool +} + +// NewListContainerGroupDefinitionsPaginator returns a new +// ListContainerGroupDefinitionsPaginator +func NewListContainerGroupDefinitionsPaginator(client ListContainerGroupDefinitionsAPIClient, params *ListContainerGroupDefinitionsInput, optFns ...func(*ListContainerGroupDefinitionsPaginatorOptions)) *ListContainerGroupDefinitionsPaginator { + if params == nil { + params = &ListContainerGroupDefinitionsInput{} + } + + options := ListContainerGroupDefinitionsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListContainerGroupDefinitionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListContainerGroupDefinitionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListContainerGroupDefinitions page. +func (p *ListContainerGroupDefinitionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListContainerGroupDefinitionsOutput, 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.Limit = limit + + result, err := p.client.ListContainerGroupDefinitions(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_opListContainerGroupDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListContainerGroupDefinitions", + } +} diff --git a/service/gamelift/api_op_ListFleets.go b/service/gamelift/api_op_ListFleets.go index dfa31f6642c..c789385a2f1 100644 --- a/service/gamelift/api_op_ListFleets.go +++ b/service/gamelift/api_op_ListFleets.go @@ -10,26 +10,25 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves a collection of fleet resources in an Amazon Web Services Region. You -// can call this operation to get fleets in a previously selected default Region -// (see -// https://docs.aws.amazon.com/credref/latest/refdocs/setting-global-region.html (https://docs.aws.amazon.com/credref/latest/refdocs/setting-global-region.html) -// or specify a Region in your request. You can filter the result set to find only -// those fleets that are deployed with a specific build or script. For fleets that -// have multiple locations, this operation retrieves fleets based on their home -// Region only. This operation can be used in the following ways: +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Retrieves a collection of fleet +// resources in an Amazon Web Services Region. You can filter the result set to +// find only those fleets that are deployed with a specific build or script. For +// fleets that have multiple locations, this operation retrieves fleets based on +// their home Region only. You can use operation in the following ways: // - To get a list of all fleets in a Region, don't provide a build or script // identifier. -// - To get a list of all fleets where a specific custom game build is deployed, +// - To get a list of all fleets where a specific game build is deployed, // provide the build ID. // - To get a list of all Realtime Servers fleets with a specific configuration // script, provide the script ID. +// - To get a list of all fleets with a specific container group definition, +// provide the ContainerGroupDefinition ID. // // Use the pagination parameters to retrieve results as a set of sequential pages. -// If successful, a list of fleet IDs that match the request parameters is -// returned. A NextToken value is also returned if there are more result pages to -// retrieve. Fleet resources are not listed in a particular order. Learn more -// Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// If successful, this operation returns a list of fleet IDs that match the request +// parameters. A NextToken value is also returned if there are more result pages to +// retrieve. Fleet IDs are returned in no particular order. func (c *Client) ListFleets(ctx context.Context, params *ListFleetsInput, optFns ...func(*Options)) (*ListFleetsOutput, error) { if params == nil { params = &ListFleetsInput{} @@ -52,6 +51,11 @@ type ListFleetsInput struct { // value. BuildId *string + // The container group definition name to request fleets for. Use this parameter + // to return only fleets that are deployed with the specified container group + // definition. + ContainerGroupDefinitionName *string + // The maximum number of results to return. Use this parameter with NextToken to // get results as a set of sequential pages. Limit *int32 diff --git a/service/gamelift/api_op_RegisterCompute.go b/service/gamelift/api_op_RegisterCompute.go index 5c00e96bee9..039156d905a 100644 --- a/service/gamelift/api_op_RegisterCompute.go +++ b/service/gamelift/api_op_RegisterCompute.go @@ -11,18 +11,23 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Registers a compute resource to an Amazon GameLift Anywhere fleet. With -// Anywhere fleets you can incorporate your own computing hardware into an Amazon -// GameLift game hosting solution. To register a compute to a fleet, give the -// compute a name (must be unique within the fleet) and specify the compute -// resource's DNS name or IP address. Provide the Anywhere fleet ID and a fleet -// location to associate with the compute being registered. You can optionally -// include the path to a TLS certificate on the compute resource. If successful, -// this operation returns the compute details, including an Amazon GameLift SDK -// endpoint. Game server processes that run on the compute use this endpoint to -// communicate with the Amazon GameLift service. Each server process includes the -// SDK endpoint in its call to the Amazon GameLift server SDK action InitSDK() . -// Learn more +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Registers a compute resource in +// an Amazon GameLift fleet. Register computes with an Amazon GameLift Anywhere +// fleet or a container fleet. For an Anywhere fleet or a container fleet that's +// running the Amazon GameLift Agent, the Agent handles all compute registry tasks +// for you. For an Anywhere fleet that doesn't use the Agent, call this operation +// to register fleet computes. To register a compute, give the compute a name (must +// be unique within the fleet) and specify the compute resource's DNS name or IP +// address. Provide a fleet ID and a fleet location to associate with the compute +// being registered. You can optionally include the path to a TLS certificate on +// the compute resource. If successful, this operation returns compute details, +// including an Amazon GameLift SDK endpoint or Agent endpoint. Game server +// processes running on the compute can use this endpoint to communicate with the +// Amazon GameLift service. Each server process includes the SDK endpoint in its +// call to the Amazon GameLift server SDK action InitSDK() . To view compute +// details, call DescribeCompute (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeCompute.html) +// with the compute name. Learn more // - Create an Anywhere fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-anywhere.html) // - Test your integration (https://docs.aws.amazon.com/gamelift/latest/developerguide/integration-testing.html) // - Server SDK reference guides (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) diff --git a/service/gamelift/api_op_RequestUploadCredentials.go b/service/gamelift/api_op_RequestUploadCredentials.go index 3f05060fc8b..8696e310d11 100644 --- a/service/gamelift/api_op_RequestUploadCredentials.go +++ b/service/gamelift/api_op_RequestUploadCredentials.go @@ -13,7 +13,7 @@ import ( // Retrieves a fresh set of credentials for use when uploading a new set of game // build files to Amazon GameLift's Amazon S3. This is done as part of the build -// creation process; see GameSession (https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateBuild.html) +// creation process; see CreateBuild (https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateBuild.html) // . To request new credentials, specify the build ID as returned with an initial // CreateBuild request. If successful, a new set of credentials are returned, along // with the S3 storage location associated with the build ID. Learn more Create a diff --git a/service/gamelift/api_op_ResolveAlias.go b/service/gamelift/api_op_ResolveAlias.go index 92fd57c1368..c6aaf1bedf6 100644 --- a/service/gamelift/api_op_ResolveAlias.go +++ b/service/gamelift/api_op_ResolveAlias.go @@ -10,8 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the fleet ID that an alias is currently pointing to. Related actions -// All APIs by task (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets) +// Attempts to retrieve a fleet ID that is associated with an alias. Specify a +// unique alias identifier. If the alias has a SIMPLE routing strategy, Amazon +// GameLift returns a fleet ID. If the alias has a TERMINAL routing strategy, the +// result is a TerminalRoutingStrategyException . Related actions All APIs by task (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets) func (c *Client) ResolveAlias(ctx context.Context, params *ResolveAliasInput, optFns ...func(*Options)) (*ResolveAliasOutput, error) { if params == nil { params = &ResolveAliasInput{} diff --git a/service/gamelift/api_op_SearchGameSessions.go b/service/gamelift/api_op_SearchGameSessions.go index 8409bfe4472..bcccbc5ca93 100644 --- a/service/gamelift/api_op_SearchGameSessions.go +++ b/service/gamelift/api_op_SearchGameSessions.go @@ -15,7 +15,7 @@ import ( // sorts them into a specified order. This operation is not designed to continually // track game session status because that practice can cause you to exceed your API // limit and generate errors. Instead, configure an Amazon Simple Notification -// Service (Amazon SNS) topic to receive notifications from a matchmaker or game +// Service (Amazon SNS) topic to receive notifications from a matchmaker or a game // session placement queue. When searching for game sessions, you specify exactly // where you want to search and provide a search filter expression, a sort // expression, or both. A search request can search only one fleet, but it can diff --git a/service/gamelift/api_op_StopFleetActions.go b/service/gamelift/api_op_StopFleetActions.go index b7040e8fca3..6106dba9008 100644 --- a/service/gamelift/api_op_StopFleetActions.go +++ b/service/gamelift/api_op_StopFleetActions.go @@ -25,6 +25,7 @@ import ( // // If successful, Amazon GameLift no longer initiates scaling events except in // response to manual changes using UpdateFleetCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html) +// . To restart fleet actions again, call StartFleetActions (https://docs.aws.amazon.com/gamelift/latest/apireference/API_StartFleetActions.html) // . Learn more Setting up Amazon GameLift Fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) StopFleetActions(ctx context.Context, params *StopFleetActionsInput, optFns ...func(*Options)) (*StopFleetActionsOutput, error) { if params == nil { diff --git a/service/gamelift/api_op_UpdateAlias.go b/service/gamelift/api_op_UpdateAlias.go index 78a6dcad7fa..9a012c7fb76 100644 --- a/service/gamelift/api_op_UpdateAlias.go +++ b/service/gamelift/api_op_UpdateAlias.go @@ -11,10 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates properties for an alias. To update properties, specify the alias ID to -// be updated and provide the information to be changed. To reassign an alias to -// another fleet, provide an updated routing strategy. If successful, the updated -// alias record is returned. Related actions All APIs by task (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets) +// Updates properties for an alias. Specify the unique identifier of the alias to +// be updated and the new property values. When reassigning an alias to a new +// fleet, provide an updated routing strategy. If successful, the updated alias +// record is returned. Related actions All APIs by task (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets) func (c *Client) UpdateAlias(ctx context.Context, params *UpdateAliasInput, optFns ...func(*Options)) (*UpdateAliasOutput, error) { if params == nil { params = &UpdateAliasInput{} diff --git a/service/gamelift/api_op_UpdateFleetAttributes.go b/service/gamelift/api_op_UpdateFleetAttributes.go index 8e6de2b1325..646e7567512 100644 --- a/service/gamelift/api_op_UpdateFleetAttributes.go +++ b/service/gamelift/api_op_UpdateFleetAttributes.go @@ -11,10 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates a fleet's mutable attributes, including game session protection and +// Updates a fleet's mutable attributes, such as game session protection and // resource creation limits. To update fleet attributes, specify the fleet ID and -// the property values that you want to change. If successful, an updated -// FleetAttributes object is returned. Learn more Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// the property values that you want to change. If successful, Amazon GameLift +// returns the identifiers for the updated fleet. Learn more Setting up Amazon +// GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) UpdateFleetAttributes(ctx context.Context, params *UpdateFleetAttributesInput, optFns ...func(*Options)) (*UpdateFleetAttributesOutput, error) { if params == nil { params = &UpdateFleetAttributesInput{} diff --git a/service/gamelift/api_op_UpdateFleetCapacity.go b/service/gamelift/api_op_UpdateFleetCapacity.go index 9a306e3a3dd..f00e20e7955 100644 --- a/service/gamelift/api_op_UpdateFleetCapacity.go +++ b/service/gamelift/api_op_UpdateFleetCapacity.go @@ -10,36 +10,38 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates capacity settings for a fleet. For fleets with multiple locations, use -// this operation to manage capacity settings in each location individually. Fleet -// capacity determines the number of game sessions and players that can be hosted -// based on the fleet configuration. Use this operation to set the following fleet -// capacity properties: -// - Minimum/maximum size: Set hard limits on fleet capacity. Amazon GameLift -// cannot set the fleet's capacity to a value outside of this range, whether the -// capacity is changed manually or through automatic scaling. -// - Desired capacity: Manually set the number of Amazon EC2 instances to be -// maintained in a fleet location. Before changing a fleet's desired capacity, you -// may want to call DescribeEC2InstanceLimits (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeEC2InstanceLimits.html) -// to get the maximum capacity of the fleet's Amazon EC2 instance type. -// Alternatively, consider using automatic scaling to adjust capacity based on -// player demand. +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Updates capacity settings for a +// managed EC2 fleet or container fleet. For these fleets, you adjust capacity by +// changing the number of instances in the fleet. Fleet capacity determines the +// number of game sessions and players that the fleet can host based on its +// configuration. For fleets with multiple locations, use this operation to manage +// capacity settings in each location individually. Use this operation to set these +// fleet capacity properties: +// - Minimum/maximum size: Set hard limits on the number of Amazon EC2 instances +// allowed. If Amazon GameLift receives a request--either through manual update or +// automatic scaling--it won't change the capacity to a value outside of this +// range. +// - Desired capacity: As an alternative to automatic scaling, manually set the +// number of Amazon EC2 instances to be maintained. Before changing a fleet's +// desired capacity, check the maximum capacity of the fleet's Amazon EC2 instance +// type by calling DescribeEC2InstanceLimits (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeEC2InstanceLimits.html) +// . // -// This operation can be used in the following ways: -// - To update capacity for a fleet's home Region, or if the fleet has no remote -// locations, omit the Location parameter. The fleet must be in ACTIVE status. -// - To update capacity for a fleet's remote location, include the Location -// parameter set to the location to be updated. The location must be in ACTIVE -// status. -// -// If successful, capacity settings are updated immediately. In response a change -// in desired capacity, Amazon GameLift initiates steps to start new instances or -// terminate existing instances in the requested fleet location. This continues -// until the location's active instance count matches the new desired instance -// count. You can track a fleet's current capacity by calling DescribeFleetCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html) +// To update capacity for a fleet's home Region, or if the fleet has no remote +// locations, omit the Location parameter. The fleet must be in ACTIVE status. To +// update capacity for a fleet's remote location, set the Location parameter to +// the location to update. The location must be in ACTIVE status. If successful, +// Amazon GameLift updates the capacity settings and returns the identifiers for +// the updated fleet and/or location. If a requested change to desired capacity +// exceeds the instance type's limit, the LimitExceeded exception occurs. Updates +// often prompt an immediate change in fleet capacity, such as when current +// capacity is different than the new desired capacity or outside the new limits. +// In this scenario, Amazon GameLift automatically initiates steps to add or remove +// instances in the fleet location. You can track a fleet's current capacity by +// calling DescribeFleetCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html) // or DescribeFleetLocationCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html) -// . If the requested desired instance count is higher than the instance type's -// limit, the LimitExceeded exception occurs. Learn more Scaling fleet capacity (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-manage-capacity.html) +// . Learn more Scaling fleet capacity (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-manage-capacity.html) func (c *Client) UpdateFleetCapacity(ctx context.Context, params *UpdateFleetCapacityInput, optFns ...func(*Options)) (*UpdateFleetCapacityOutput, error) { if params == nil { params = &UpdateFleetCapacityInput{} diff --git a/service/gamelift/api_op_UpdateFleetPortSettings.go b/service/gamelift/api_op_UpdateFleetPortSettings.go index 003d5301547..c8b3c57b941 100644 --- a/service/gamelift/api_op_UpdateFleetPortSettings.go +++ b/service/gamelift/api_op_UpdateFleetPortSettings.go @@ -11,16 +11,18 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates permissions that allow inbound traffic to connect to game sessions that -// are being hosted on instances in the fleet. To update settings, specify the -// fleet ID to be updated and specify the changes to be made. List the permissions -// you want to add in InboundPermissionAuthorizations , and permissions you want to -// remove in InboundPermissionRevocations . Permissions to be removed must match -// existing fleet permissions. If successful, the fleet ID for the updated fleet is -// returned. For fleets with remote locations, port setting updates can take time -// to propagate across all locations. You can check the status of updates in each -// location by calling DescribeFleetPortSettings with a location name. Learn more -// Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// Updates permissions that allow inbound traffic to connect to game sessions in +// the fleet. To update settings, specify the fleet ID to be updated and specify +// the changes to be made. List the permissions you want to add in +// InboundPermissionAuthorizations , and permissions you want to remove in +// InboundPermissionRevocations . Permissions to be removed must match existing +// fleet permissions. For a container fleet, inbound permissions must specify port +// numbers that are defined in the fleet's connection port settings. If successful, +// the fleet ID for the updated fleet is returned. For fleets with remote +// locations, port setting updates can take time to propagate across all locations. +// You can check the status of updates in each location by calling +// DescribeFleetPortSettings with a location name. Learn more Setting up Amazon +// GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) UpdateFleetPortSettings(ctx context.Context, params *UpdateFleetPortSettingsInput, optFns ...func(*Options)) (*UpdateFleetPortSettingsOutput, error) { if params == nil { params = &UpdateFleetPortSettingsInput{} diff --git a/service/gamelift/api_op_UpdateRuntimeConfiguration.go b/service/gamelift/api_op_UpdateRuntimeConfiguration.go index dedd3e809ad..48fd900f706 100644 --- a/service/gamelift/api_op_UpdateRuntimeConfiguration.go +++ b/service/gamelift/api_op_UpdateRuntimeConfiguration.go @@ -11,18 +11,20 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the current runtime configuration for the specified fleet, which tells -// Amazon GameLift how to launch server processes on all instances in the fleet. -// You can update a fleet's runtime configuration at any time after the fleet is -// created; it does not need to be in ACTIVE status. To update runtime -// configuration, specify the fleet ID and provide a RuntimeConfiguration with an -// updated set of server process configurations. If successful, the fleet's runtime -// configuration settings are updated. Each instance in the fleet regularly checks -// for and retrieves updated runtime configurations. Instances immediately begin -// complying with the new configuration by launching new server processes or not -// replacing existing processes when they shut down. Updating a fleet's runtime -// configuration never affects existing server processes. Learn more Setting up -// Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) +// Updates the runtime configuration for the specified fleet. The runtime +// configuration tells Amazon GameLift how to launch server processes on computes +// in the fleet. For managed EC2 fleets, it determines what server processes to run +// on each fleet instance. For container fleets, it describes what server processes +// to run in each replica container group. You can update a fleet's runtime +// configuration at any time after the fleet is created; it does not need to be in +// ACTIVE status. To update runtime configuration, specify the fleet ID and provide +// a RuntimeConfiguration with an updated set of server process configurations. If +// successful, the fleet's runtime configuration settings are updated. Fleet +// computes that run game server processes regularly check for and receive updated +// runtime configurations. The computes immediately take action to comply with the +// new configuration by launching new server processes or by not replacing existing +// processes when they shut down. Updating a fleet's runtime configuration never +// affects existing server processes. Learn more Setting up Amazon GameLift fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) func (c *Client) UpdateRuntimeConfiguration(ctx context.Context, params *UpdateRuntimeConfigurationInput, optFns ...func(*Options)) (*UpdateRuntimeConfigurationOutput, error) { if params == nil { params = &UpdateRuntimeConfigurationInput{} @@ -46,11 +48,10 @@ type UpdateRuntimeConfigurationInput struct { // This member is required. FleetId *string - // Instructions for launching server processes on each instance in the fleet. - // Server processes run either a custom game build executable or a Realtime Servers - // script. The runtime configuration lists the types of server processes to run on - // an instance, how to launch them, and the number of processes to run - // concurrently. + // Instructions for launching server processes on fleet computes. Server processes + // run either a custom game build executable or a Realtime Servers script. The + // runtime configuration lists the types of server processes to run, how to launch + // them, and the number of processes to run concurrently. // // This member is required. RuntimeConfiguration *types.RuntimeConfiguration @@ -60,8 +61,8 @@ type UpdateRuntimeConfigurationInput struct { type UpdateRuntimeConfigurationOutput struct { - // The runtime configuration currently in use by all instances in the fleet. If - // the update was successful, all property changes are shown. + // The runtime configuration currently in use by computes in the fleet. If the + // update is successful, all property changes are shown. RuntimeConfiguration *types.RuntimeConfiguration // Metadata pertaining to the operation's result. diff --git a/service/gamelift/deserializers.go b/service/gamelift/deserializers.go index e323723f86b..a2571bf3898 100644 --- a/service/gamelift/deserializers.go +++ b/service/gamelift/deserializers.go @@ -500,6 +500,131 @@ func awsAwsjson11_deserializeOpErrorCreateBuild(response *smithyhttp.Response, m } } +type awsAwsjson11_deserializeOpCreateContainerGroupDefinition struct { +} + +func (*awsAwsjson11_deserializeOpCreateContainerGroupDefinition) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateContainerGroupDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateContainerGroupDefinition(response, &metadata) + } + output := &CreateContainerGroupDefinitionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateContainerGroupDefinitionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateContainerGroupDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("TaggingFailedException", errorCode): + return awsAwsjson11_deserializeErrorTaggingFailedException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("UnsupportedRegionException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedRegionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateFleet struct { } @@ -609,6 +734,9 @@ func awsAwsjson11_deserializeOpErrorCreateFleet(response *smithyhttp.Response, m case strings.EqualFold("NotFoundException", errorCode): return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("NotReadyException", errorCode): + return awsAwsjson11_deserializeErrorNotReadyException(response, errorBody) + case strings.EqualFold("TaggingFailedException", errorCode): return awsAwsjson11_deserializeErrorTaggingFailedException(response, errorBody) @@ -740,6 +868,9 @@ func awsAwsjson11_deserializeOpErrorCreateFleetLocations(response *smithyhttp.Re case strings.EqualFold("NotFoundException", errorCode): return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("NotReadyException", errorCode): + return awsAwsjson11_deserializeErrorNotReadyException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) @@ -2292,6 +2423,106 @@ func awsAwsjson11_deserializeOpErrorDeleteBuild(response *smithyhttp.Response, m } } +type awsAwsjson11_deserializeOpDeleteContainerGroupDefinition struct { +} + +func (*awsAwsjson11_deserializeOpDeleteContainerGroupDefinition) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteContainerGroupDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteContainerGroupDefinition(response, &metadata) + } + output := &DeleteContainerGroupDefinitionOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteContainerGroupDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TaggingFailedException", errorCode): + return awsAwsjson11_deserializeErrorTaggingFailedException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("UnsupportedRegionException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedRegionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDeleteFleet struct { } @@ -4081,14 +4312,14 @@ func awsAwsjson11_deserializeOpErrorDescribeCompute(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpDescribeEC2InstanceLimits struct { +type awsAwsjson11_deserializeOpDescribeContainerGroupDefinition struct { } -func (*awsAwsjson11_deserializeOpDescribeEC2InstanceLimits) ID() string { +func (*awsAwsjson11_deserializeOpDescribeContainerGroupDefinition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeEC2InstanceLimits) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeContainerGroupDefinition) 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) @@ -4102,9 +4333,9 @@ func (m *awsAwsjson11_deserializeOpDescribeEC2InstanceLimits) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEC2InstanceLimits(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeContainerGroupDefinition(response, &metadata) } - output := &DescribeEC2InstanceLimitsOutput{} + output := &DescribeContainerGroupDefinitionOutput{} out.Result = output var buff [1024]byte @@ -4124,7 +4355,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEC2InstanceLimits) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeEC2InstanceLimitsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeContainerGroupDefinitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4138,7 +4369,7 @@ func (m *awsAwsjson11_deserializeOpDescribeEC2InstanceLimits) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeEC2InstanceLimits(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeContainerGroupDefinition(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)} @@ -4181,6 +4412,9 @@ func awsAwsjson11_deserializeOpErrorDescribeEC2InstanceLimits(response *smithyht case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) @@ -4197,14 +4431,14 @@ func awsAwsjson11_deserializeOpErrorDescribeEC2InstanceLimits(response *smithyht } } -type awsAwsjson11_deserializeOpDescribeFleetAttributes struct { +type awsAwsjson11_deserializeOpDescribeEC2InstanceLimits struct { } -func (*awsAwsjson11_deserializeOpDescribeFleetAttributes) ID() string { +func (*awsAwsjson11_deserializeOpDescribeEC2InstanceLimits) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeFleetAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeEC2InstanceLimits) 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) @@ -4218,9 +4452,9 @@ func (m *awsAwsjson11_deserializeOpDescribeFleetAttributes) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFleetAttributes(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEC2InstanceLimits(response, &metadata) } - output := &DescribeFleetAttributesOutput{} + output := &DescribeEC2InstanceLimitsOutput{} out.Result = output var buff [1024]byte @@ -4240,7 +4474,7 @@ func (m *awsAwsjson11_deserializeOpDescribeFleetAttributes) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeFleetAttributesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeEC2InstanceLimitsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4254,7 +4488,7 @@ func (m *awsAwsjson11_deserializeOpDescribeFleetAttributes) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeFleetAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeEC2InstanceLimits(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)} @@ -4297,12 +4531,12 @@ func awsAwsjson11_deserializeOpErrorDescribeFleetAttributes(response *smithyhttp case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("UnauthorizedException", errorCode): return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) + case strings.EqualFold("UnsupportedRegionException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedRegionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4313,14 +4547,14 @@ func awsAwsjson11_deserializeOpErrorDescribeFleetAttributes(response *smithyhttp } } -type awsAwsjson11_deserializeOpDescribeFleetCapacity struct { +type awsAwsjson11_deserializeOpDescribeFleetAttributes struct { } -func (*awsAwsjson11_deserializeOpDescribeFleetCapacity) ID() string { +func (*awsAwsjson11_deserializeOpDescribeFleetAttributes) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeFleetCapacity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeFleetAttributes) 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) @@ -4334,9 +4568,9 @@ func (m *awsAwsjson11_deserializeOpDescribeFleetCapacity) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFleetCapacity(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFleetAttributes(response, &metadata) } - output := &DescribeFleetCapacityOutput{} + output := &DescribeFleetAttributesOutput{} out.Result = output var buff [1024]byte @@ -4356,7 +4590,123 @@ func (m *awsAwsjson11_deserializeOpDescribeFleetCapacity) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeFleetCapacityOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeFleetAttributesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeFleetAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeFleetCapacity struct { +} + +func (*awsAwsjson11_deserializeOpDescribeFleetCapacity) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeFleetCapacity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFleetCapacity(response, &metadata) + } + output := &DescribeFleetCapacityOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeFleetCapacityOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7921,6 +8271,122 @@ func awsAwsjson11_deserializeOpErrorListCompute(response *smithyhttp.Response, m } } +type awsAwsjson11_deserializeOpListContainerGroupDefinitions struct { +} + +func (*awsAwsjson11_deserializeOpListContainerGroupDefinitions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListContainerGroupDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListContainerGroupDefinitions(response, &metadata) + } + output := &ListContainerGroupDefinitionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListContainerGroupDefinitionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListContainerGroupDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidRequestException", errorCode): + return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) + + case strings.EqualFold("UnsupportedRegionException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedRegionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListFleets struct { } @@ -8827,6 +9293,9 @@ func awsAwsjson11_deserializeOpErrorRegisterCompute(response *smithyhttp.Respons case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("NotReadyException", errorCode): + return awsAwsjson11_deserializeErrorNotReadyException(response, errorBody) + case strings.EqualFold("UnauthorizedException", errorCode): return awsAwsjson11_deserializeErrorUnauthorizedException(response, errorBody) @@ -11897,6 +12366,9 @@ func awsAwsjson11_deserializeOpErrorUpdateRuntimeConfiguration(response *smithyh case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody) @@ -12492,7 +12964,7 @@ func awsAwsjson11_deserializeErrorNotFoundException(response *smithyhttp.Respons return output } -func awsAwsjson11_deserializeErrorOutOfCapacityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -12510,8 +12982,8 @@ func awsAwsjson11_deserializeErrorOutOfCapacityException(response *smithyhttp.Re return err } - output := &types.OutOfCapacityException{} - err := awsAwsjson11_deserializeDocumentOutOfCapacityException(&output, shape) + output := &types.NotReadyException{} + err := awsAwsjson11_deserializeDocumentNotReadyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -12527,7 +12999,7 @@ func awsAwsjson11_deserializeErrorOutOfCapacityException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorTaggingFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorOutOfCapacityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -12545,8 +13017,8 @@ func awsAwsjson11_deserializeErrorTaggingFailedException(response *smithyhttp.Re return err } - output := &types.TaggingFailedException{} - err := awsAwsjson11_deserializeDocumentTaggingFailedException(&output, shape) + output := &types.OutOfCapacityException{} + err := awsAwsjson11_deserializeDocumentOutOfCapacityException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -12562,7 +13034,7 @@ func awsAwsjson11_deserializeErrorTaggingFailedException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorTerminalRoutingStrategyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorTaggingFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -12580,8 +13052,8 @@ func awsAwsjson11_deserializeErrorTerminalRoutingStrategyException(response *smi return err } - output := &types.TerminalRoutingStrategyException{} - err := awsAwsjson11_deserializeDocumentTerminalRoutingStrategyException(&output, shape) + output := &types.TaggingFailedException{} + err := awsAwsjson11_deserializeDocumentTaggingFailedException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -12597,7 +13069,7 @@ func awsAwsjson11_deserializeErrorTerminalRoutingStrategyException(response *smi return output } -func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorTerminalRoutingStrategyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -12615,8 +13087,8 @@ func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Res return err } - output := &types.UnauthorizedException{} - err := awsAwsjson11_deserializeDocumentUnauthorizedException(&output, shape) + output := &types.TerminalRoutingStrategyException{} + err := awsAwsjson11_deserializeDocumentTerminalRoutingStrategyException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -12632,7 +13104,7 @@ func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Res return output } -func awsAwsjson11_deserializeErrorUnsupportedRegionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -12650,8 +13122,43 @@ func awsAwsjson11_deserializeErrorUnsupportedRegionException(response *smithyhtt return err } - output := &types.UnsupportedRegionException{} - err := awsAwsjson11_deserializeDocumentUnsupportedRegionException(&output, shape) + output := &types.UnauthorizedException{} + err := awsAwsjson11_deserializeDocumentUnauthorizedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnsupportedRegionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnsupportedRegionException{} + err := awsAwsjson11_deserializeDocumentUnsupportedRegionException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -13233,6 +13740,11 @@ func awsAwsjson11_deserializeDocumentCompute(v **types.Compute, value interface{ sv.ComputeStatus = types.ComputeStatus(jtv) } + case "ContainerAttributes": + if err := awsAwsjson11_deserializeDocumentContainerAttributes(&sv.ContainerAttributes, value); err != nil { + return err + } + case "CreationTime": if value != nil { switch jtv := value.(type) { @@ -13276,6 +13788,15 @@ func awsAwsjson11_deserializeDocumentCompute(v **types.Compute, value interface{ sv.FleetId = ptr.String(jtv) } + case "GameLiftAgentEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GameLiftAgentEndpointOutput to be of type string, got %T instead", value) + } + sv.GameLiftAgentEndpoint = ptr.String(jtv) + } + case "GameLiftServiceSdkEndpoint": if value != nil { jtv, ok := value.(string) @@ -13285,6 +13806,15 @@ func awsAwsjson11_deserializeDocumentCompute(v **types.Compute, value interface{ sv.GameLiftServiceSdkEndpoint = ptr.String(jtv) } + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + case "IpAddress": if value != nil { jtv, ok := value.(string) @@ -13395,12 +13925,1234 @@ func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictExcepti sv.Message = ptr.String(jtv) } - default: - _, _ = key, value + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentConnectionPortRange(v **types.ConnectionPortRange, 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.ConnectionPortRange + if *v == nil { + sv = &types.ConnectionPortRange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FromPort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FromPort = ptr.Int32(int32(i64)) + } + + case "ToPort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ToPort = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerAttributes(v **types.ContainerAttributes, 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.ContainerAttributes + if *v == nil { + sv = &types.ContainerAttributes{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerPortMappings": + if err := awsAwsjson11_deserializeDocumentContainerPortMappingList(&sv.ContainerPortMappings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerCommandStringList(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 NonZeroAnd255MaxString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerDefinition(v **types.ContainerDefinition, 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.ContainerDefinition + if *v == nil { + sv = &types.ContainerDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Command": + if err := awsAwsjson11_deserializeDocumentContainerCommandStringList(&sv.Command, value); err != nil { + return err + } + + case "ContainerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonZeroAnd128MaxAsciiString to be of type string, got %T instead", value) + } + sv.ContainerName = ptr.String(jtv) + } + + case "Cpu": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerCpu to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Cpu = ptr.Int32(int32(i64)) + } + + case "DependsOn": + if err := awsAwsjson11_deserializeDocumentContainerDependencyList(&sv.DependsOn, value); err != nil { + return err + } + + case "EntryPoint": + if err := awsAwsjson11_deserializeDocumentContainerEntryPointList(&sv.EntryPoint, value); err != nil { + return err + } + + case "Environment": + if err := awsAwsjson11_deserializeDocumentContainerEnvironmentList(&sv.Environment, value); err != nil { + return err + } + + case "Essential": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BooleanModel to be of type *bool, got %T instead", value) + } + sv.Essential = ptr.Bool(jtv) + } + + case "HealthCheck": + if err := awsAwsjson11_deserializeDocumentContainerHealthCheck(&sv.HealthCheck, value); err != nil { + return err + } + + case "ImageUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImageUriString to be of type string, got %T instead", value) + } + sv.ImageUri = ptr.String(jtv) + } + + case "MemoryLimits": + if err := awsAwsjson11_deserializeDocumentContainerMemoryLimits(&sv.MemoryLimits, value); err != nil { + return err + } + + case "PortConfiguration": + if err := awsAwsjson11_deserializeDocumentContainerPortConfiguration(&sv.PortConfiguration, value); err != nil { + return err + } + + case "ResolvedImageDigest": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Sha256 to be of type string, got %T instead", value) + } + sv.ResolvedImageDigest = ptr.String(jtv) + } + + case "WorkingDirectory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonZeroAnd255MaxString to be of type string, got %T instead", value) + } + sv.WorkingDirectory = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerDefinitionList(v *[]types.ContainerDefinition, 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.ContainerDefinition + if *v == nil { + cv = []types.ContainerDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContainerDefinition + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerDependency(v **types.ContainerDependency, 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.ContainerDependency + if *v == nil { + sv = &types.ContainerDependency{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Condition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerDependencyCondition to be of type string, got %T instead", value) + } + sv.Condition = types.ContainerDependencyCondition(jtv) + } + + case "ContainerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonZeroAnd128MaxAsciiString to be of type string, got %T instead", value) + } + sv.ContainerName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerDependencyList(v *[]types.ContainerDependency, 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.ContainerDependency + if *v == nil { + cv = []types.ContainerDependency{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContainerDependency + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerDependency(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerEntryPointList(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 NonZeroAndMaxString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerEnvironment(v **types.ContainerEnvironment, 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.ContainerEnvironment + if *v == nil { + sv = &types.ContainerEnvironment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonZeroAnd255MaxString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonZeroAnd255MaxString to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerEnvironmentList(v *[]types.ContainerEnvironment, 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.ContainerEnvironment + if *v == nil { + cv = []types.ContainerEnvironment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContainerEnvironment + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerEnvironment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerGroupDefinition(v **types.ContainerGroupDefinition, 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.ContainerGroupDefinition + if *v == nil { + sv = &types.ContainerGroupDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerDefinitions": + if err := awsAwsjson11_deserializeDocumentContainerDefinitionList(&sv.ContainerDefinitions, value); err != nil { + return err + } + + case "ContainerGroupDefinitionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerGroupDefinitionArn to be of type string, got %T instead", value) + } + sv.ContainerGroupDefinitionArn = ptr.String(jtv) + } + + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerGroupDefinitionName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OperatingSystem": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerOperatingSystem to be of type string, got %T instead", value) + } + sv.OperatingSystem = types.ContainerOperatingSystem(jtv) + } + + case "SchedulingStrategy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerSchedulingStrategy to be of type string, got %T instead", value) + } + sv.SchedulingStrategy = types.ContainerSchedulingStrategy(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerGroupDefinitionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ContainerGroupDefinitionStatus(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonZeroAndMaxString to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + case "TotalCpuLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerTotalCpuLimit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalCpuLimit = ptr.Int32(int32(i64)) + } + + case "TotalMemoryLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerTotalMemoryLimit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalMemoryLimit = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerGroupDefinitionList(v *[]types.ContainerGroupDefinition, 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.ContainerGroupDefinition + if *v == nil { + cv = []types.ContainerGroupDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContainerGroupDefinition + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerGroupDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerGroupDefinitionPropertiesList(v *[]types.ContainerGroupDefinitionProperty, 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.ContainerGroupDefinitionProperty + if *v == nil { + cv = []types.ContainerGroupDefinitionProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContainerGroupDefinitionProperty + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerGroupDefinitionProperty(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerGroupDefinitionProperty(v **types.ContainerGroupDefinitionProperty, 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.ContainerGroupDefinitionProperty + if *v == nil { + sv = &types.ContainerGroupDefinitionProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerGroupDefinitionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerGroupDefinitionName to be of type string, got %T instead", value) + } + sv.ContainerGroupDefinitionName = ptr.String(jtv) + } + + case "SchedulingStrategy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ContainerSchedulingStrategy to be of type string, got %T instead", value) + } + sv.SchedulingStrategy = types.ContainerSchedulingStrategy(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerGroupsAttributes(v **types.ContainerGroupsAttributes, 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.ContainerGroupsAttributes + if *v == nil { + sv = &types.ContainerGroupsAttributes{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectionPortRange": + if err := awsAwsjson11_deserializeDocumentConnectionPortRange(&sv.ConnectionPortRange, value); err != nil { + return err + } + + case "ContainerGroupDefinitionProperties": + if err := awsAwsjson11_deserializeDocumentContainerGroupDefinitionPropertiesList(&sv.ContainerGroupDefinitionProperties, value); err != nil { + return err + } + + case "ContainerGroupsPerInstance": + if err := awsAwsjson11_deserializeDocumentContainerGroupsPerInstance(&sv.ContainerGroupsPerInstance, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerGroupsPerInstance(v **types.ContainerGroupsPerInstance, 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.ContainerGroupsPerInstance + if *v == nil { + sv = &types.ContainerGroupsPerInstance{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DesiredReplicaContainerGroupsPerInstance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ReplicaContainerGroupsPerInstance to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DesiredReplicaContainerGroupsPerInstance = ptr.Int32(int32(i64)) + } + + case "MaxReplicaContainerGroupsPerInstance": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ReplicaContainerGroupsPerInstance to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxReplicaContainerGroupsPerInstance = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerHealthCheck(v **types.ContainerHealthCheck, 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.ContainerHealthCheck + if *v == nil { + sv = &types.ContainerHealthCheck{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Command": + if err := awsAwsjson11_deserializeDocumentContainerCommandStringList(&sv.Command, value); err != nil { + return err + } + + case "Interval": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerHealthCheckInterval to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Interval = ptr.Int32(int32(i64)) + } + + case "Retries": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerHealthCheckRetries to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Retries = ptr.Int32(int32(i64)) + } + + case "StartPeriod": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerHealthCheckStartPeriod to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartPeriod = ptr.Int32(int32(i64)) + } + + case "Timeout": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerHealthCheckTimeout to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Timeout = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerMemoryLimits(v **types.ContainerMemoryLimits, 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.ContainerMemoryLimits + if *v == nil { + sv = &types.ContainerMemoryLimits{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "HardLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerMemoryLimit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.HardLimit = ptr.Int32(int32(i64)) + } + + case "SoftLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ContainerMemoryLimit to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SoftLimit = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerPortConfiguration(v **types.ContainerPortConfiguration, 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.ContainerPortConfiguration + if *v == nil { + sv = &types.ContainerPortConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerPortRanges": + if err := awsAwsjson11_deserializeDocumentContainerPortRangeList(&sv.ContainerPortRanges, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerPortMapping(v **types.ContainerPortMapping, 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.ContainerPortMapping + if *v == nil { + sv = &types.ContainerPortMapping{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectionPort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ConnectionPort = ptr.Int32(int32(i64)) + } + + case "ContainerPort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ContainerPort = ptr.Int32(int32(i64)) + } + + case "Protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpProtocol to be of type string, got %T instead", value) + } + sv.Protocol = types.IpProtocol(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerPortMappingList(v *[]types.ContainerPortMapping, 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.ContainerPortMapping + if *v == nil { + cv = []types.ContainerPortMapping{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ContainerPortMapping + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerPortMapping(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerPortRange(v **types.ContainerPortRange, 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.ContainerPortRange + if *v == nil { + sv = &types.ContainerPortRange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FromPort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FromPort = ptr.Int32(int32(i64)) + } + + case "Protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpProtocol to be of type string, got %T instead", value) + } + sv.Protocol = types.IpProtocol(jtv) + } + + case "ToPort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PortNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ToPort = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentContainerPortRangeList(v *[]types.ContainerPortRange, 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.ContainerPortRange + if *v == nil { + cv = []types.ContainerPortRange{} + } else { + cv = *v + } + for _, value := range shape { + var col types.ContainerPortRange + destAddr := &col + if err := awsAwsjson11_deserializeDocumentContainerPortRange(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } @@ -13657,6 +15409,19 @@ func awsAwsjson11_deserializeDocumentEvent(v **types.Event, value interface{}) e for key, value := range shape { switch key { + case "Count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EventCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = ptr.Int64(i64) + } + case "EventCode": if value != nil { jtv, ok := value.(string) @@ -13892,6 +15657,11 @@ func awsAwsjson11_deserializeDocumentFleetAttributes(v **types.FleetAttributes, sv.ComputeType = types.ComputeType(jtv) } + case "ContainerGroupsAttributes": + if err := awsAwsjson11_deserializeDocumentContainerGroupsAttributes(&sv.ContainerGroupsAttributes, value); err != nil { + return err + } + case "CreationTime": if value != nil { switch jtv := value.(type) { @@ -14185,6 +15955,11 @@ func awsAwsjson11_deserializeDocumentFleetCapacity(v **types.FleetCapacity, valu sv.Location = ptr.String(jtv) } + case "ReplicaContainerGroupCounts": + if err := awsAwsjson11_deserializeDocumentReplicaContainerGroupCounts(&sv.ReplicaContainerGroupCounts, value); err != nil { + return err + } + default: _, _ = key, value @@ -17607,6 +19382,46 @@ func awsAwsjson11_deserializeDocumentNotFoundException(v **types.NotFoundExcepti return nil } +func awsAwsjson11_deserializeDocumentNotReadyException(v **types.NotReadyException, 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.NotReadyException + if *v == nil { + sv = &types.NotReadyException{} + } 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 NonEmptyString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentOutOfCapacityException(v **types.OutOfCapacityException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18467,6 +20282,89 @@ func awsAwsjson11_deserializeDocumentQueueArnsList(v *[]string, value interface{ return nil } +func awsAwsjson11_deserializeDocumentReplicaContainerGroupCounts(v **types.ReplicaContainerGroupCounts, 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.ReplicaContainerGroupCounts + if *v == nil { + sv = &types.ReplicaContainerGroupCounts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ACTIVE": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WholeNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ACTIVE = ptr.Int32(int32(i64)) + } + + case "IDLE": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WholeNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.IDLE = ptr.Int32(int32(i64)) + } + + case "PENDING": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WholeNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PENDING = ptr.Int32(int32(i64)) + } + + case "TERMINATING": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WholeNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TERMINATING = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentResourceCreationLimitPolicy(v **types.ResourceCreationLimitPolicy, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19952,6 +21850,42 @@ func awsAwsjson11_deserializeOpDocumentCreateBuildOutput(v **CreateBuildOutput, return nil } +func awsAwsjson11_deserializeOpDocumentCreateContainerGroupDefinitionOutput(v **CreateContainerGroupDefinitionOutput, 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 *CreateContainerGroupDefinitionOutput + if *v == nil { + sv = &CreateContainerGroupDefinitionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerGroupDefinition": + if err := awsAwsjson11_deserializeDocumentContainerGroupDefinition(&sv.ContainerGroupDefinition, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateFleetLocationsOutput(v **CreateFleetLocationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -20853,6 +22787,42 @@ func awsAwsjson11_deserializeOpDocumentDescribeComputeOutput(v **DescribeCompute return nil } +func awsAwsjson11_deserializeOpDocumentDescribeContainerGroupDefinitionOutput(v **DescribeContainerGroupDefinitionOutput, 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 *DescribeContainerGroupDefinitionOutput + if *v == nil { + sv = &DescribeContainerGroupDefinitionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerGroupDefinition": + if err := awsAwsjson11_deserializeDocumentContainerGroupDefinition(&sv.ContainerGroupDefinition, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeEC2InstanceLimitsOutput(v **DescribeEC2InstanceLimitsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -22032,6 +24002,15 @@ func awsAwsjson11_deserializeOpDocumentGetComputeAccessOutput(v **GetComputeAcce sv.FleetId = ptr.String(jtv) } + case "Target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionTarget to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + default: _, _ = key, value @@ -22344,6 +24323,51 @@ func awsAwsjson11_deserializeOpDocumentListComputeOutput(v **ListComputeOutput, return nil } +func awsAwsjson11_deserializeOpDocumentListContainerGroupDefinitionsOutput(v **ListContainerGroupDefinitionsOutput, 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 *ListContainerGroupDefinitionsOutput + if *v == nil { + sv = &ListContainerGroupDefinitionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ContainerGroupDefinitions": + if err := awsAwsjson11_deserializeDocumentContainerGroupDefinitionList(&sv.ContainerGroupDefinitions, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListFleetsOutput(v **ListFleetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/gamelift/generated.json b/service/gamelift/generated.json index e0abd4f7700..0a2bee7c9b4 100644 --- a/service/gamelift/generated.json +++ b/service/gamelift/generated.json @@ -12,6 +12,7 @@ "api_op_ClaimGameServer.go", "api_op_CreateAlias.go", "api_op_CreateBuild.go", + "api_op_CreateContainerGroupDefinition.go", "api_op_CreateFleet.go", "api_op_CreateFleetLocations.go", "api_op_CreateGameServerGroup.go", @@ -27,6 +28,7 @@ "api_op_CreateVpcPeeringConnection.go", "api_op_DeleteAlias.go", "api_op_DeleteBuild.go", + "api_op_DeleteContainerGroupDefinition.go", "api_op_DeleteFleet.go", "api_op_DeleteFleetLocations.go", "api_op_DeleteGameServerGroup.go", @@ -43,6 +45,7 @@ "api_op_DescribeAlias.go", "api_op_DescribeBuild.go", "api_op_DescribeCompute.go", + "api_op_DescribeContainerGroupDefinition.go", "api_op_DescribeEC2InstanceLimits.go", "api_op_DescribeFleetAttributes.go", "api_op_DescribeFleetCapacity.go", @@ -76,6 +79,7 @@ "api_op_ListAliases.go", "api_op_ListBuilds.go", "api_op_ListCompute.go", + "api_op_ListContainerGroupDefinitions.go", "api_op_ListFleets.go", "api_op_ListGameServerGroups.go", "api_op_ListGameServers.go", diff --git a/service/gamelift/serializers.go b/service/gamelift/serializers.go index 27fde6e518d..b7ca501c05f 100644 --- a/service/gamelift/serializers.go +++ b/service/gamelift/serializers.go @@ -237,6 +237,61 @@ func (m *awsAwsjson11_serializeOpCreateBuild) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateContainerGroupDefinition struct { +} + +func (*awsAwsjson11_serializeOpCreateContainerGroupDefinition) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateContainerGroupDefinition) 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.(*CreateContainerGroupDefinitionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("GameLift.CreateContainerGroupDefinition") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateContainerGroupDefinitionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateFleet struct { } @@ -1062,6 +1117,61 @@ func (m *awsAwsjson11_serializeOpDeleteBuild) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteContainerGroupDefinition struct { +} + +func (*awsAwsjson11_serializeOpDeleteContainerGroupDefinition) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteContainerGroupDefinition) 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.(*DeleteContainerGroupDefinitionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("GameLift.DeleteContainerGroupDefinition") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteContainerGroupDefinitionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteFleet struct { } @@ -1942,6 +2052,61 @@ func (m *awsAwsjson11_serializeOpDescribeCompute) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeContainerGroupDefinition struct { +} + +func (*awsAwsjson11_serializeOpDescribeContainerGroupDefinition) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeContainerGroupDefinition) 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.(*DescribeContainerGroupDefinitionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("GameLift.DescribeContainerGroupDefinition") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeContainerGroupDefinitionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeEC2InstanceLimits struct { } @@ -3757,6 +3922,61 @@ func (m *awsAwsjson11_serializeOpListCompute) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListContainerGroupDefinitions struct { +} + +func (*awsAwsjson11_serializeOpListContainerGroupDefinitions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListContainerGroupDefinitions) 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.(*ListContainerGroupDefinitionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("GameLift.ListContainerGroupDefinitions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListContainerGroupDefinitionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListFleets struct { } @@ -5818,6 +6038,336 @@ func awsAwsjson11_serializeDocumentClaimFilterOption(v *types.ClaimFilterOption, return nil } +func awsAwsjson11_serializeDocumentConnectionPortRange(v *types.ConnectionPortRange, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FromPort != nil { + ok := object.Key("FromPort") + ok.Integer(*v.FromPort) + } + + if v.ToPort != nil { + ok := object.Key("ToPort") + ok.Integer(*v.ToPort) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerCommandStringList(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_serializeDocumentContainerDefinitionInput(v *types.ContainerDefinitionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Command != nil { + ok := object.Key("Command") + if err := awsAwsjson11_serializeDocumentContainerCommandStringList(v.Command, ok); err != nil { + return err + } + } + + if v.ContainerName != nil { + ok := object.Key("ContainerName") + ok.String(*v.ContainerName) + } + + if v.Cpu != nil { + ok := object.Key("Cpu") + ok.Integer(*v.Cpu) + } + + if v.DependsOn != nil { + ok := object.Key("DependsOn") + if err := awsAwsjson11_serializeDocumentContainerDependencyList(v.DependsOn, ok); err != nil { + return err + } + } + + if v.EntryPoint != nil { + ok := object.Key("EntryPoint") + if err := awsAwsjson11_serializeDocumentContainerEntryPointList(v.EntryPoint, ok); err != nil { + return err + } + } + + if v.Environment != nil { + ok := object.Key("Environment") + if err := awsAwsjson11_serializeDocumentContainerEnvironmentList(v.Environment, ok); err != nil { + return err + } + } + + if v.Essential != nil { + ok := object.Key("Essential") + ok.Boolean(*v.Essential) + } + + if v.HealthCheck != nil { + ok := object.Key("HealthCheck") + if err := awsAwsjson11_serializeDocumentContainerHealthCheck(v.HealthCheck, ok); err != nil { + return err + } + } + + if v.ImageUri != nil { + ok := object.Key("ImageUri") + ok.String(*v.ImageUri) + } + + if v.MemoryLimits != nil { + ok := object.Key("MemoryLimits") + if err := awsAwsjson11_serializeDocumentContainerMemoryLimits(v.MemoryLimits, ok); err != nil { + return err + } + } + + if v.PortConfiguration != nil { + ok := object.Key("PortConfiguration") + if err := awsAwsjson11_serializeDocumentContainerPortConfiguration(v.PortConfiguration, ok); err != nil { + return err + } + } + + if v.WorkingDirectory != nil { + ok := object.Key("WorkingDirectory") + ok.String(*v.WorkingDirectory) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerDefinitionInputList(v []types.ContainerDefinitionInput, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentContainerDefinitionInput(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentContainerDependency(v *types.ContainerDependency, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Condition) > 0 { + ok := object.Key("Condition") + ok.String(string(v.Condition)) + } + + if v.ContainerName != nil { + ok := object.Key("ContainerName") + ok.String(*v.ContainerName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerDependencyList(v []types.ContainerDependency, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentContainerDependency(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentContainerEntryPointList(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_serializeDocumentContainerEnvironment(v *types.ContainerEnvironment, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerEnvironmentList(v []types.ContainerEnvironment, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentContainerEnvironment(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentContainerGroupDefinitionNameOrArnLimitedList(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_serializeDocumentContainerGroupsConfiguration(v *types.ContainerGroupsConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConnectionPortRange != nil { + ok := object.Key("ConnectionPortRange") + if err := awsAwsjson11_serializeDocumentConnectionPortRange(v.ConnectionPortRange, ok); err != nil { + return err + } + } + + if v.ContainerGroupDefinitionNames != nil { + ok := object.Key("ContainerGroupDefinitionNames") + if err := awsAwsjson11_serializeDocumentContainerGroupDefinitionNameOrArnLimitedList(v.ContainerGroupDefinitionNames, ok); err != nil { + return err + } + } + + if v.DesiredReplicaContainerGroupsPerInstance != nil { + ok := object.Key("DesiredReplicaContainerGroupsPerInstance") + ok.Integer(*v.DesiredReplicaContainerGroupsPerInstance) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerHealthCheck(v *types.ContainerHealthCheck, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Command != nil { + ok := object.Key("Command") + if err := awsAwsjson11_serializeDocumentContainerCommandStringList(v.Command, ok); err != nil { + return err + } + } + + if v.Interval != nil { + ok := object.Key("Interval") + ok.Integer(*v.Interval) + } + + if v.Retries != nil { + ok := object.Key("Retries") + ok.Integer(*v.Retries) + } + + if v.StartPeriod != nil { + ok := object.Key("StartPeriod") + ok.Integer(*v.StartPeriod) + } + + if v.Timeout != nil { + ok := object.Key("Timeout") + ok.Integer(*v.Timeout) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerMemoryLimits(v *types.ContainerMemoryLimits, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.HardLimit != nil { + ok := object.Key("HardLimit") + ok.Integer(*v.HardLimit) + } + + if v.SoftLimit != nil { + ok := object.Key("SoftLimit") + ok.Integer(*v.SoftLimit) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerPortConfiguration(v *types.ContainerPortConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContainerPortRanges != nil { + ok := object.Key("ContainerPortRanges") + if err := awsAwsjson11_serializeDocumentContainerPortRangeList(v.ContainerPortRanges, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerPortRange(v *types.ContainerPortRange, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FromPort != nil { + ok := object.Key("FromPort") + ok.Integer(*v.FromPort) + } + + if len(v.Protocol) > 0 { + ok := object.Key("Protocol") + ok.String(string(v.Protocol)) + } + + if v.ToPort != nil { + ok := object.Key("ToPort") + ok.Integer(*v.ToPort) + } + + return nil +} + +func awsAwsjson11_serializeDocumentContainerPortRangeList(v []types.ContainerPortRange, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentContainerPortRange(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentDesiredPlayerSession(v *types.DesiredPlayerSession, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6806,6 +7356,52 @@ func awsAwsjson11_serializeOpDocumentCreateBuildInput(v *CreateBuildInput, value return nil } +func awsAwsjson11_serializeOpDocumentCreateContainerGroupDefinitionInput(v *CreateContainerGroupDefinitionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ContainerDefinitions != nil { + ok := object.Key("ContainerDefinitions") + if err := awsAwsjson11_serializeDocumentContainerDefinitionInputList(v.ContainerDefinitions, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if len(v.OperatingSystem) > 0 { + ok := object.Key("OperatingSystem") + ok.String(string(v.OperatingSystem)) + } + + if len(v.SchedulingStrategy) > 0 { + ok := object.Key("SchedulingStrategy") + ok.String(string(v.SchedulingStrategy)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.TotalCpuLimit != nil { + ok := object.Key("TotalCpuLimit") + ok.Integer(*v.TotalCpuLimit) + } + + if v.TotalMemoryLimit != nil { + ok := object.Key("TotalMemoryLimit") + ok.Integer(*v.TotalMemoryLimit) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6834,6 +7430,13 @@ func awsAwsjson11_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value ok.String(string(v.ComputeType)) } + if v.ContainerGroupsConfiguration != nil { + ok := object.Key("ContainerGroupsConfiguration") + if err := awsAwsjson11_serializeDocumentContainerGroupsConfiguration(v.ContainerGroupsConfiguration, ok); err != nil { + return err + } + } + if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) @@ -7436,6 +8039,18 @@ func awsAwsjson11_serializeOpDocumentDeleteBuildInput(v *DeleteBuildInput, value return nil } +func awsAwsjson11_serializeOpDocumentDeleteContainerGroupDefinitionInput(v *DeleteContainerGroupDefinitionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteFleetInput(v *DeleteFleetInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7670,6 +8285,18 @@ func awsAwsjson11_serializeOpDocumentDescribeComputeInput(v *DescribeComputeInpu return nil } +func awsAwsjson11_serializeOpDocumentDescribeContainerGroupDefinitionInput(v *DescribeContainerGroupDefinitionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeEC2InstanceLimitsInput(v *DescribeEC2InstanceLimitsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8399,6 +9026,28 @@ func awsAwsjson11_serializeOpDocumentListComputeInput(v *ListComputeInput, value return nil } +func awsAwsjson11_serializeOpDocumentListContainerGroupDefinitionsInput(v *ListContainerGroupDefinitionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("Limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.SchedulingStrategy) > 0 { + ok := object.Key("SchedulingStrategy") + ok.String(string(v.SchedulingStrategy)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListFleetsInput(v *ListFleetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8408,6 +9057,11 @@ func awsAwsjson11_serializeOpDocumentListFleetsInput(v *ListFleetsInput, value s ok.String(*v.BuildId) } + if v.ContainerGroupDefinitionName != nil { + ok := object.Key("ContainerGroupDefinitionName") + ok.String(*v.ContainerGroupDefinitionName) + } + if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) diff --git a/service/gamelift/snapshot_test.go b/service/gamelift/snapshot_test.go index e4600fcd53c..a8cbc30f1d5 100644 --- a/service/gamelift/snapshot_test.go +++ b/service/gamelift/snapshot_test.go @@ -110,6 +110,18 @@ func TestCheckSnapshot_CreateBuild(t *testing.T) { } } +func TestCheckSnapshot_CreateContainerGroupDefinition(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateContainerGroupDefinition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateContainerGroupDefinition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateFleet(t *testing.T) { svc := New(Options{}) _, err := svc.CreateFleet(context.Background(), nil, func(o *Options) { @@ -290,6 +302,18 @@ func TestCheckSnapshot_DeleteBuild(t *testing.T) { } } +func TestCheckSnapshot_DeleteContainerGroupDefinition(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteContainerGroupDefinition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteContainerGroupDefinition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteFleet(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteFleet(context.Background(), nil, func(o *Options) { @@ -482,6 +506,18 @@ func TestCheckSnapshot_DescribeCompute(t *testing.T) { } } +func TestCheckSnapshot_DescribeContainerGroupDefinition(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeContainerGroupDefinition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeContainerGroupDefinition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeEC2InstanceLimits(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeEC2InstanceLimits(context.Background(), nil, func(o *Options) { @@ -878,6 +914,18 @@ func TestCheckSnapshot_ListCompute(t *testing.T) { } } +func TestCheckSnapshot_ListContainerGroupDefinitions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListContainerGroupDefinitions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListContainerGroupDefinitions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListFleets(t *testing.T) { svc := New(Options{}) _, err := svc.ListFleets(context.Background(), nil, func(o *Options) { @@ -1357,6 +1405,18 @@ func TestUpdateSnapshot_CreateBuild(t *testing.T) { } } +func TestUpdateSnapshot_CreateContainerGroupDefinition(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateContainerGroupDefinition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateContainerGroupDefinition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateFleet(t *testing.T) { svc := New(Options{}) _, err := svc.CreateFleet(context.Background(), nil, func(o *Options) { @@ -1537,6 +1597,18 @@ func TestUpdateSnapshot_DeleteBuild(t *testing.T) { } } +func TestUpdateSnapshot_DeleteContainerGroupDefinition(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteContainerGroupDefinition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteContainerGroupDefinition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteFleet(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteFleet(context.Background(), nil, func(o *Options) { @@ -1729,6 +1801,18 @@ func TestUpdateSnapshot_DescribeCompute(t *testing.T) { } } +func TestUpdateSnapshot_DescribeContainerGroupDefinition(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeContainerGroupDefinition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeContainerGroupDefinition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeEC2InstanceLimits(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeEC2InstanceLimits(context.Background(), nil, func(o *Options) { @@ -2125,6 +2209,18 @@ func TestUpdateSnapshot_ListCompute(t *testing.T) { } } +func TestUpdateSnapshot_ListContainerGroupDefinitions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListContainerGroupDefinitions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListContainerGroupDefinitions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListFleets(t *testing.T) { svc := New(Options{}) _, err := svc.ListFleets(context.Background(), nil, func(o *Options) { diff --git a/service/gamelift/types/enums.go b/service/gamelift/types/enums.go index 5031de6ac5c..0454a016592 100644 --- a/service/gamelift/types/enums.go +++ b/service/gamelift/types/enums.go @@ -142,8 +142,9 @@ type ComputeType string // Enum values for ComputeType const ( - ComputeTypeEc2 ComputeType = "EC2" - ComputeTypeAnywhere ComputeType = "ANYWHERE" + ComputeTypeEc2 ComputeType = "EC2" + ComputeTypeAnywhere ComputeType = "ANYWHERE" + ComputeTypeContainer ComputeType = "CONTAINER" ) // Values returns all known values for ComputeType. Note that this can be expanded @@ -153,6 +154,85 @@ func (ComputeType) Values() []ComputeType { return []ComputeType{ "EC2", "ANYWHERE", + "CONTAINER", + } +} + +type ContainerDependencyCondition string + +// Enum values for ContainerDependencyCondition +const ( + ContainerDependencyConditionStart ContainerDependencyCondition = "START" + ContainerDependencyConditionComplete ContainerDependencyCondition = "COMPLETE" + ContainerDependencyConditionSuccess ContainerDependencyCondition = "SUCCESS" + ContainerDependencyConditionHealthy ContainerDependencyCondition = "HEALTHY" +) + +// Values returns all known values for ContainerDependencyCondition. 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 (ContainerDependencyCondition) Values() []ContainerDependencyCondition { + return []ContainerDependencyCondition{ + "START", + "COMPLETE", + "SUCCESS", + "HEALTHY", + } +} + +type ContainerGroupDefinitionStatus string + +// Enum values for ContainerGroupDefinitionStatus +const ( + ContainerGroupDefinitionStatusReady ContainerGroupDefinitionStatus = "READY" + ContainerGroupDefinitionStatusCopying ContainerGroupDefinitionStatus = "COPYING" + ContainerGroupDefinitionStatusFailed ContainerGroupDefinitionStatus = "FAILED" +) + +// Values returns all known values for ContainerGroupDefinitionStatus. 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 (ContainerGroupDefinitionStatus) Values() []ContainerGroupDefinitionStatus { + return []ContainerGroupDefinitionStatus{ + "READY", + "COPYING", + "FAILED", + } +} + +type ContainerOperatingSystem string + +// Enum values for ContainerOperatingSystem +const ( + ContainerOperatingSystemAmazonLinux2023 ContainerOperatingSystem = "AMAZON_LINUX_2023" +) + +// Values returns all known values for ContainerOperatingSystem. 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 (ContainerOperatingSystem) Values() []ContainerOperatingSystem { + return []ContainerOperatingSystem{ + "AMAZON_LINUX_2023", + } +} + +type ContainerSchedulingStrategy string + +// Enum values for ContainerSchedulingStrategy +const ( + ContainerSchedulingStrategyReplica ContainerSchedulingStrategy = "REPLICA" + ContainerSchedulingStrategyDaemon ContainerSchedulingStrategy = "DAEMON" +) + +// Values returns all known values for ContainerSchedulingStrategy. 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 (ContainerSchedulingStrategy) Values() []ContainerSchedulingStrategy { + return []ContainerSchedulingStrategy{ + "REPLICA", + "DAEMON", } } diff --git a/service/gamelift/types/errors.go b/service/gamelift/types/errors.go index 1c72f356898..9949c8eaac0 100644 --- a/service/gamelift/types/errors.go +++ b/service/gamelift/types/errors.go @@ -282,6 +282,35 @@ func (e *NotFoundException) ErrorCode() string { } func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The operation failed because Amazon GameLift has not yet finished validating +// this compute. We recommend attempting 8 to 10 retries over 3 to 5 minutes with +// exponential backoffs and jitter (http://aws.amazon.com/blogs/https:/aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/) +// . +type NotReadyException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *NotReadyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NotReadyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NotReadyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NotReadyException" + } + return *e.ErrorCodeOverride +} +func (e *NotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The specified game server group has no available game servers to fulfill a // ClaimGameServer request. Clients can retry such requests immediately or after a // waiting period. diff --git a/service/gamelift/types/types.go b/service/gamelift/types/types.go index 66bfb6ddb53..c7026165b10 100644 --- a/service/gamelift/types/types.go +++ b/service/gamelift/types/types.go @@ -42,7 +42,7 @@ type Alias struct { noSmithyDocumentSerde } -// Amazon GameLift Anywhere configuration options for your Anywhere fleets. +// Amazon GameLift configuration options for your Anywhere fleets. type AnywhereConfiguration struct { // The cost to run your fleet per hour. Amazon GameLift uses the provided cost of @@ -158,10 +158,11 @@ type Build struct { noSmithyDocumentSerde } -// Determines whether a TLS/SSL certificate is generated for a fleet. This feature -// must be enabled when creating the fleet. All instances in a fleet share the same -// certificate. The certificate can be retrieved by calling the Amazon GameLift -// Server SDK (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) +// This data type has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Determines whether a TLS/SSL +// certificate is generated for a fleet. This feature must be enabled when creating +// the fleet. All instances in a fleet share the same certificate. The certificate +// can be retrieved by calling the Amazon GameLift Server SDK (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) // operation GetInstanceCertificate . type CertificateConfiguration struct { @@ -187,24 +188,33 @@ type ClaimFilterOption struct { noSmithyDocumentSerde } -// An Amazon GameLift compute resource for hosting your game servers. A compute -// can be an EC2instance in a managed EC2 fleet or a registered compute in an -// Anywhere fleet. +// This data type has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. An Amazon GameLift compute +// resource for hosting your game servers. Computes in an Amazon GameLift fleet +// differs depending on the fleet's compute type property as follows: +// - For EC2 fleets, a compute is an EC2 instance. +// - For ANYWHERE fleets, a compute is a computing resource that you provide and +// is registered to the fleet. +// - For CONTAINER fleets, a compute is a container that's registered to the +// fleet. type Compute struct { // The ARN that is assigned to a compute resource and uniquely identifies it. ARNs // are unique across locations. Instances in managed EC2 fleets are not assigned a - // ComputeARN. + // Compute ARN. ComputeArn *string // A descriptive label for the compute resource. For instances in a managed EC2 - // fleet, the compute name is an instance ID. + // fleet, the compute name is the same value as the InstanceId ID. ComputeName *string // Current status of the compute. A compute must have an ACTIVE status to host // game sessions. ComputeStatus ComputeStatus + // Some attributes of a container. + ContainerAttributes *ContainerAttributes + // A time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057" ). CreationTime *time.Time @@ -219,11 +229,18 @@ type Compute struct { // A unique identifier for the fleet that the compute belongs to. FleetId *string + // The endpoint of the Amazon GameLift Agent. + GameLiftAgentEndpoint *string + // The Amazon GameLift SDK endpoint connection for a registered compute resource // in an Anywhere fleet. The game servers on the compute use this endpoint to // connect to the Amazon GameLift service. GameLiftServiceSdkEndpoint *string + // The InstanceID of the Instance hosting the compute for Container and Managed + // EC2 fleets. + InstanceId *string + // The IP address of a compute resource. Amazon GameLift requires a DNS name or IP // address for a compute. IpAddress *string @@ -242,6 +259,610 @@ type Compute struct { noSmithyDocumentSerde } +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. The set of port numbers to open +// on each instance in a container fleet. Connection ports are used by inbound +// traffic to connect with processes that are running in containers on the fleet. +// Part of: ContainerGroupsConfiguration , ContainerGroupsAttributes +type ConnectionPortRange struct { + + // Starting value for the port range. + // + // This member is required. + FromPort *int32 + + // Ending value for the port. Port numbers are end-inclusive. This value must be + // equal to or greater than FromPort . + // + // This member is required. + ToPort *int32 + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. Describes attributes of containers that are +// deployed to a fleet with compute type CONTAINER . +type ContainerAttributes struct { + + // Describes how container ports map to connection ports on the fleet instance. + // Incoming traffic connects to a game via a connection port. A + // ContainerPortMapping directs the traffic from a connection port to a port on the + // container that hosts the game session. + ContainerPortMappings []ContainerPortMapping + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. Describes a container in a container fleet, the +// resources available to the container, and the commands that are run when the +// container starts. Container properties can't be updated. To change a property, +// create a new container group definition. See also ContainerDefinitionInput . +// Part of: ContainerGroupDefinition Returned by: DescribeContainerGroupDefinition +// , ListContainerGroupDefinitions +type ContainerDefinition struct { + + // The container definition identifier. Container names are unique within a + // container group definition. + // + // This member is required. + ContainerName *string + + // The URI to the image that $short; copied and deployed to a container fleet. + // For a more specific identifier, see ResolvedImageDigest . + // + // This member is required. + ImageUri *string + + // A command that's passed to the container on startup. Each argument for the + // command is an additional string in the array. See the + // ContainerDefinition::command (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-command) + // parameter in the Amazon Elastic Container Service API reference. + Command []string + + // The number of CPU units that are reserved for the container. Note: 1 vCPU unit + // equals 1024 CPU units. If no resources are reserved, the container shares the + // total CPU limit for the container group. Related data type: + // ContainerGroupDefinition$TotalCpuLimit + Cpu *int32 + + // Indicates that the container relies on the status of other containers in the + // same container group during its startup and shutdown sequences. A container + // might have dependencies on multiple containers. + DependsOn []ContainerDependency + + // The entry point that's passed to the container on startup. If there are + // multiple arguments, each argument is an additional string in the array. See the + // ContainerDefinition::entryPoint (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-entryPoint) + // parameter in the Amazon Elastic Container Service API Reference. + EntryPoint []string + + // A set of environment variables that's passed to the container on startup. See + // the ContainerDefinition::environment (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-environment) + // parameter in the Amazon Elastic Container Service API Reference. + Environment []ContainerEnvironment + + // Indicates whether the container is vital to the container group. If an + // essential container fails, the entire container group is restarted. + Essential *bool + + // A configuration for a non-terminal health check. A container, which + // automatically restarts if it stops functioning, also restarts if it fails this + // health check. If an essential container in the daemon group fails a health + // check, the entire container group is restarted. The essential container in the + // replica group doesn't use this health check mechanism, because the Amazon + // GameLift Agent automatically handles the task. + HealthCheck *ContainerHealthCheck + + // The amount of memory that Amazon GameLift makes available to the container. If + // memory limits aren't set for an individual container, the container shares the + // container group's total memory allocation. Related data type: + // ContainerGroupDefinition$TotalMemoryLimit + MemoryLimits *ContainerMemoryLimits + + // Defines the ports that are available to assign to processes in the container. + // For example, a game server process requires a container port to allow game + // clients to connect to it. Container ports aren't directly accessed by inbound + // traffic. Amazon GameLift maps these container ports to externally accessible + // connection ports, which are assigned as needed from the container fleet's + // ConnectionPortRange . + PortConfiguration *ContainerPortConfiguration + + // A unique and immutable identifier for the container image that is deployed to a + // container fleet. The digest is a SHA 256 hash of the container image manifest. + ResolvedImageDigest *string + + // The directory in the container where commands are run. See the + // ContainerDefinition::workingDirectory (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-workingDirectory) + // parameter in the Amazon Elastic Container Service API Reference. + WorkingDirectory *string + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. Describes a container's configuration, resources, +// and start instructions. Use this data type to create a container group +// definition. For the properties of a container that's been deployed to a fleet, +// see ContainerDefinition . You can't change these properties after you've created +// the container group definition. If you need a container group with different +// properties, then you must create a new one. Used with: +// CreateContainerGroupDefinition +type ContainerDefinitionInput struct { + + // A string that uniquely identifies the container definition within a container + // group. + // + // This member is required. + ContainerName *string + + // The location of a container image that $short; will copy and deploy to a + // container fleet. Images in Amazon Elastic Container Registry private + // repositories are supported. The repository must be in the same Amazon Web + // Services account and Amazon Web Services Region where you're creating the + // container group definition. For limits on image size, see Amazon GameLift + // endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/gamelift.html) + // . You can use any of the following image URI formats: + // - Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository + // ID] + // - Image ID and digest: [AWS account].dkr.ecr.[AWS + // region].amazonaws.com/[repository ID]@[digest] + // - Image ID and tag: [AWS account].dkr.ecr.[AWS + // region].amazonaws.com/[repository ID]:[tag] + // + // This member is required. + ImageUri *string + + // A command to pass to the container on startup. Add multiple arguments as + // additional strings in the array. See the ContainerDefinition command (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-command) + // parameter in the Amazon Elastic Container Service API reference. + Command []string + + // The number of CPU units to reserve for this container. The container can use + // more resources when needed, if available. Note: 1 vCPU unit equals 1024 CPU + // units. If you don't reserve CPU units for this container, then it shares the + // total CPU limit for the container group. This property is similar to the Amazon + // ECS container definition parameter environment (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_environment) + // (Amazon Elastic Container Service Developer Guide). Related data type: + // ContainerGroupDefinition$TotalCpuLimit + Cpu *int32 + + // Sets up dependencies between this container and the status of other containers + // in the same container group. A container can have dependencies on multiple + // different containers. You can use dependencies to establish a startup/shutdown + // sequence across the container group. A container startup dependency is reversed + // on shutdown. For example, you might specify that SideCarContainerB has a START + // dependency on SideCarContainerA. This dependency means that SideCarContainerB + // can't start until after SideCarContainerA has started. This dependency is + // reversed on shutdown, which means that SideCarContainerB must shut down before + // SideCarContainerA can shut down. + DependsOn []ContainerDependency + + // An entry point to pass to the container on startup. Add multiple arguments as + // additional strings in the array. See the ContainerDefinition::entryPoint (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-entryPoint) + // parameter in the Amazon Elastic Container Service API Reference. + EntryPoint []string + + // A set of environment variables to pass to the container on startup. See the + // ContainerDefinition::environment (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-environment) + // parameter in the Amazon Elastic Container Service API Reference. + Environment []ContainerEnvironment + + // Specifies whether the container is vital for the container group to function + // properly. If an essential container fails, it causes the entire container group + // to restart. Each container group must have an essential container. Replica + // container groups - A replica group must have exactly one essential container. + // Use the following to configure an essential replica container: + // - Choose a container is running your game server and the Amazon GameLift + // Agent. + // - Include a port configuration. This container runs your game server + // processes, and each process requires a container port to allow access to game + // clients. + // - Don't configure a health check. The Agent handles this task for the + // essential replica container. + // Daemon container groups - A daemon group must have at least one essential + // container. + Essential *bool + + // Configuration for a non-terminal health check. A container automatically + // restarts if it stops functioning. This parameter lets you define additional + // reasons to consider a container unhealthy and restart it. You can set a health + // check for any container except for the essential container in the replica + // container group. If an essential container in the daemon group fails a health + // check, the entire container group is restarted. + HealthCheck *ContainerHealthCheck + + // The amount of memory to make available to the container. If you don't specify + // memory limits for this container, then it shares the container group's total + // memory allocation. Related data type: ContainerGroupDefinition$TotalMemoryLimit + MemoryLimits *ContainerMemoryLimits + + // A set of ports that Amazon GameLift can assign to processes in the container. + // All processes that accept inbound traffic connections, including game server + // processes, must be assigned a port from this set. The set of ports must be large + // enough to assign one to each process in the container that needs one. If the + // container includes your game server, include enough ports to assign one port to + // each concurrent server process (as defined in a container fleet's + // RuntimeConfiguration ). For more details, see Networking for container fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-network) + // . Container ports aren't directly accessed by inbound traffic. Amazon GameLift + // maps these container ports to externally accessible connection ports, which are + // assigned as needed from the container fleet's ConnectionPortRange . + PortConfiguration *ContainerPortConfiguration + + // The directory in the container where commands are run. See the + // ContainerDefinition::workingDirectory parameter (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html#ECS-Type-ContainerDefinition-workingDirectory) + // in the Amazon Elastic Container Service API Reference. + WorkingDirectory *string + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. A container's dependency on another container in +// the same container group. The dependency impacts how the dependent container is +// able to start or shut down based the status of the other container. For example, +// ContainerA is configured with the following dependency: a START dependency on +// ContainerB. This means that ContainerA can't start until ContainerB has started. +// It also means that ContainerA must shut down before ContainerB. Part of: +// ContainerDefinition +type ContainerDependency struct { + + // The condition that the dependency container must reach before the dependent + // container can start. Valid conditions include: + // - START - The dependency container must have started. + // - COMPLETE - The dependency container has run to completion (exits). Use this + // condition with nonessential containers, such as those that run a script and then + // exit. The dependency container can't be an essential container. + // - SUCCESS - The dependency container has run to completion and exited with a + // zero status. The dependency container can't be an essential container. + // - HEALTHY - The dependency container has passed its Docker health check. Use + // this condition with dependency containers that have health checks configured. + // This condition is confirmed at container group startup only. + // + // This member is required. + Condition ContainerDependencyCondition + + // A descriptive label for the container definition that this container depends on. + // + // This member is required. + ContainerName *string + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. An environment variable to set inside a container, +// in the form of a key-value pair. Related data type: +// ContainerDefinition$Environment +type ContainerEnvironment struct { + + // The environment variable name. + // + // This member is required. + Name *string + + // The environment variable value. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. The properties that describe a container group +// resource. Container group definition properties can't be updated. To change a +// property, create a new container group definition. Used with: +// CreateContainerGroupDefinition Returned by: DescribeContainerGroupDefinition , +// ListContainerGroupDefinitions +type ContainerGroupDefinition struct { + + // The set of container definitions that are included in the container group. + ContainerDefinitions []ContainerDefinition + + // The Amazon Resource Name ( ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) + // ) that is assigned to an Amazon GameLift ContainerGroupDefinition resource. It + // uniquely identifies the resource across all Amazon Web Services Regions. Format + // is arn:aws:gamelift:::containergroupdefinition/[container group definition name] + // . + ContainerGroupDefinitionArn *string + + // A time stamp indicating when this data object was created. Format is a number + // expressed in Unix time as milliseconds (for example "1469498468.057" ). + CreationTime *time.Time + + // A descriptive identifier for the container group definition. The name value is + // unique in an Amazon Web Services Region. + Name *string + + // The platform required for all containers in the container group definition. + OperatingSystem ContainerOperatingSystem + + // The method for deploying the container group across fleet instances. A replica + // container group might have multiple copies on each fleet instance. A daemon + // container group maintains only one copy per fleet instance. + SchedulingStrategy ContainerSchedulingStrategy + + // Current status of the container group definition resource. Values include: + // - COPYING -- Amazon GameLift is in the process of making copies of all + // container images that are defined in the group. While in this state, the + // resource can't be used to create a container fleet. + // - READY -- Amazon GameLift has copied the registry images for all containers + // that are defined in the group. You can use a container group definition in this + // status to create a container fleet. + // - FAILED -- Amazon GameLift failed to create a valid container group + // definition resource. For more details on the cause of the failure, see + // StatusReason . A container group definition resource in failed status will be + // deleted within a few minutes. + Status ContainerGroupDefinitionStatus + + // Additional information about a container group definition that's in FAILED + // status. Possible reasons include: + // - An internal issue prevented Amazon GameLift from creating the container + // group definition resource. Delete the failed resource and call + // CreateContainerGroupDefinition again. + // - An access-denied message means that you don't have permissions to access + // the container image on ECR. See IAM permission examples (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-iam-policy-examples.html) + // for help setting up required IAM permissions for Amazon GameLift. + // - The ImageUri value for at least one of the containers in the container group + // definition was invalid or not found in the current Amazon Web Services account. + // - At least one of the container images referenced in the container group + // definition exceeds the allowed size. For size limits, see Amazon GameLift + // endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/gamelift.html) + // . + // - At least one of the container images referenced in the container group + // definition uses a different operating system than the one defined for the + // container group. + StatusReason *string + + // The amount of CPU units on a fleet instance to allocate for the container + // group. All containers in the group share these resources. This property is an + // integer value in CPU units (1 vCPU is equal to 1024 CPU units). You can set + // additional limits for each ContainerDefinition in the group. If individual + // containers have limits, this value must be equal to or greater than the sum of + // all container-specific CPU limits in the group. For more details on memory + // allocation, see the Container fleet design guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-design-fleet) + // . + TotalCpuLimit *int32 + + // The amount of memory (in MiB) on a fleet instance to allocate for the container + // group. All containers in the group share these resources. You can set additional + // limits for each ContainerDefinition in the group. If individual containers have + // limits, this value must meet the following requirements: + // - Equal to or greater than the sum of all container-specific soft memory + // limits in the group. + // - Equal to or greater than any container-specific hard limits in the group. + // For more details on memory allocation, see the Container fleet design guide (https://docs.aws.amazon.com/gamelift/latest/developerguide/containers-design-fleet) + // . + TotalMemoryLimit *int32 + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. The properties of a container group that is +// deployed to a container fleet. Part of: ContainerGroupsAttributes Returned by: +// DescribeFleetAttributes +type ContainerGroupDefinitionProperty struct { + + // The unique identifier for the container group definition. + ContainerGroupDefinitionName *string + + // The method for scheduling and maintaining copies of the container group across + // a container fleet. + SchedulingStrategy ContainerSchedulingStrategy + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. The properties of container groups that are running +// on a container fleet. Container group properties for a fleet can't be changed. +// Returned by: DescribeFleetAttributes , CreateFleet +type ContainerGroupsAttributes struct { + + // A set of ports that allow inbound traffic to connect to processes running in + // the fleet's container groups. Amazon GameLift maps each connection port to a + // container port, which is assigned to a specific container process. A fleet's + // connection port range can't be changed, but you can control access to connection + // ports by updating a fleet's EC2InboundPermissions with UpdateFleetPortSettings . + ConnectionPortRange *ConnectionPortRange + + // A collection of properties that describe each container group in the fleet. A + // container fleet is deployed with one or more ContainerGroupDefinition + // resources, which is where these properties are set. + ContainerGroupDefinitionProperties []ContainerGroupDefinitionProperty + + // Details about the number of replica container groups that Amazon GameLift + // deploys to each instance in the container fleet. + ContainerGroupsPerInstance *ContainerGroupsPerInstance + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. Configuration details for a set of container +// groups, for use when creating a fleet with compute type CONTAINER . Used with: +// CreateFleet +type ContainerGroupsConfiguration struct { + + // A set of ports to allow inbound traffic, including game clients, to connect to + // processes running in the container fleet. Connection ports are dynamically + // mapped to container ports, which are assigned to individual processes running in + // a container. The connection port range must have enough ports to map to all + // container ports across a fleet instance. To calculate the minimum connection + // ports needed, use the following formula: [Total number of container ports as + // defined for containers in the replica container group] * [Desired or calculated + // number of replica container groups per instance] + [Total number of container + // ports as defined for containers in the daemon container group] As a best + // practice, double the minimum number of connection ports. Use the fleet's + // EC2InboundPermissions property to control external access to connection ports. + // Set this property to the connection port numbers that you want to open access + // to. See IpPermission for more details. + // + // This member is required. + ConnectionPortRange *ConnectionPortRange + + // The list of container group definition names to deploy to a new container fleet. + // + // This member is required. + ContainerGroupDefinitionNames []string + + // The number of times to replicate the replica container group on each instance + // in a container fleet. By default, Amazon GameLift calculates the maximum number + // of replica container groups that can fit on a fleet instance (based on CPU and + // memory resources). Leave this parameter empty if you want to use the maximum + // number, or specify a desired number to override the maximum. The desired number + // is used if it's less than the maximum number. + DesiredReplicaContainerGroupsPerInstance *int32 + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. Determines how many replica container groups that +// Amazon GameLift deploys to each instance in a container fleet. Amazon GameLift +// calculates the maximum possible replica groups per instance based on the +// instance 's CPU and memory resources. When deploying a fleet, Amazon GameLift +// places replica container groups on each fleet instance based on the following: +// - If no desired value is set, Amazon GameLift places the calculated maximum. +// - If a desired number is set to a value higher than the calculated maximum, +// Amazon GameLift places the calculated maximum. +// - If a desired number is set to a value lower than the calculated maximum, +// Amazon GameLift places the desired number. +// +// Part of: ContainerGroupsConfiguration , ContainerGroupsAttributes Returned by: +// DescribeFleetAttributes , CreateFleet +type ContainerGroupsPerInstance struct { + + // The desired number of replica container groups to place on each fleet instance. + DesiredReplicaContainerGroupsPerInstance *int32 + + // The maximum possible number of replica container groups that each fleet + // instance can have. + MaxReplicaContainerGroupsPerInstance *int32 + + noSmithyDocumentSerde +} + +// Instructions on when and how to check the health of a container in a container +// fleet. When health check properties are set in a container definition, they +// override any Docker health checks in the container image. For more information +// on container health checks, see HealthCheck command (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HealthCheck.html#ECS-Type-HealthCheck-command) +// in the Amazon Elastic Container Service API. The following example instructions +// tell the container to wait 100 seconds after launch before counting failed +// health checks, then initiate the health check command every 60 seconds. After +// issuing the health check command, wait 10 seconds for it to succeed. If it +// fails, retry the command 3 times before considering the container to be +// unhealthy. {"Command": [ "CMD-SHELL", "ps cax | grep "processmanager" || exit +// 1" ], "Interval": 300, "Timeout": 30, "Retries": 5, "StartPeriod": 100 } Part +// of: ContainerDefinition$HealthCheck +type ContainerHealthCheck struct { + + // A string array that specifies the command that the container runs to determine + // if it's healthy. + // + // This member is required. + Command []string + + // The time period (in seconds) between each health check. + Interval *int32 + + // The number of times to retry a failed health check before the container is + // considered unhealthy. The first run of the command does not count as a retry. + Retries *int32 + + // The optional grace period (in seconds) to give a container time to bootstrap + // before the first failed health check counts toward the number of retries. + StartPeriod *int32 + + // The time period (in seconds) to wait for a health check to succeed before a + // failed health check is counted. + Timeout *int32 + + noSmithyDocumentSerde +} + +// Specifies how much memory is available to a container. You can't change this +// value after you create this object. Part of: ContainerDefinition$MemoryLimits +type ContainerMemoryLimits struct { + + // The maximum amount of memory that the container can use. If a container + // attempts to exceed this limit, the container is stopped. This property is + // similar to the Amazon ECS container definition parameter memory (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_memory) + // in the Amazon Elastic Container Service Developer Guide. + HardLimit *int32 + + // The amount of memory that is reserved for a container. When the container + // group's shared memory is under contention, the system attempts to maintain the + // container memory usage at this soft limit. However, the container can use more + // memory when needed, if available. This property is similar to the Amazon ECS + // container definition parameter memoryreservation (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#ContainerDefinition-memoryReservation) + // (Amazon Elastic Container Service Developer Guide). + SoftLimit *int32 + + noSmithyDocumentSerde +} + +// Defines ranges of ports that server processes can connect to. Part of: +// ContainerDefinition$PortConfiguration +type ContainerPortConfiguration struct { + + // Specifies one or more ranges of ports on a container. These ranges must not + // overlap. + // + // This member is required. + ContainerPortRanges []ContainerPortRange + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. Defines how an internal-facing container port is +// mapped to an external-facing connection port on a fleet instance of compute type +// CONTAINER . Incoming traffic, such as a game client, uses a connection port to +// connect to a process in the container fleet. Amazon GameLift directs the inbound +// traffic to the container port that is assigned to the process, such as a game +// session, running on a container. Part of: ContainerAttributes +type ContainerPortMapping struct { + + // The port opened on the fleet instance. This is also called the "host port". + ConnectionPort *int32 + + // The port opened on the container. + ContainerPort *int32 + + // The network protocol that this mapping supports. + Protocol IpProtocol + + noSmithyDocumentSerde +} + +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. A set of one or more port numbers that can be +// opened on the container. Part of: ContainerPortConfiguration +type ContainerPortRange struct { + + // A starting value for the range of allowed port numbers. + // + // This member is required. + FromPort *int32 + + // The network protocol that these ports support. + // + // This member is required. + Protocol IpProtocol + + // An ending value for the range of allowed port numbers. Port numbers are + // end-inclusive. This value must be equal to or greater than FromPort . + // + // This member is required. + ToPort *int32 + + noSmithyDocumentSerde +} + // Player information for use when creating player sessions using a game session // placement request. type DesiredPlayerSession struct { @@ -319,6 +940,9 @@ type EC2InstanceLimit struct { // additional information for troubleshooting and debugging problems. type Event struct { + // The number of times that this event occurred. + Count *int64 + // The type of event being logged. Fleet state transition events: // - FLEET_CREATED -- A fleet resource was successfully created with a status of // NEW . Event messaging includes the fleet ID. @@ -471,27 +1095,42 @@ type FilterConfiguration struct { noSmithyDocumentSerde } -// Describes a Amazon GameLift fleet of game hosting resources. Related actions +// This operation has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. Describes an Amazon GameLift +// fleet of game hosting resources. Attributes differ based on the fleet's compute +// type, as follows: +// - EC2 fleet attributes identify a Build resource (for fleets with customer +// game server builds) or a Script resource (for Realtime Servers fleets). +// - Container fleets have ContainerGroupsAttributes , which identify the fleet's +// ContainerGroupDefinition resources. +// - Amazon GameLift Anywhere fleets have an abbreviated set of attributes, +// because most fleet configurations are set directly on the fleet's computes. +// Attributes include fleet identifiers and descriptive properties, +// creation/termination time, and fleet status. +// +// Returned by: DescribeFleetAttributes type FleetAttributes struct { - // Amazon GameLift Anywhere configuration options for your Anywhere fleets. + // This property is used with the Amazon GameLift containers feature, which is + // currently in public preview. A set of attributes that describe the container + // groups that are deployed on the fleet. These attributes are included for fleets + // with compute type CONTAINER only. This attribute is used with fleets where + // ComputeType is "Container". AnywhereConfiguration *AnywhereConfiguration // The Amazon Resource Name ( ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) // ) associated with the Amazon GameLift build resource that is deployed on // instances in this fleet. In a GameLift build ARN, the resource ID matches the - // BuildId value. + // BuildId value. This attribute is used with fleets where ComputeType is "EC2". BuildArn *string // A unique identifier for the build resource that is deployed on instances in - // this fleet. + // this fleet. This attribute is used with fleets where ComputeType is "EC2". BuildId *string // Determines whether a TLS/SSL certificate is generated for a fleet. This feature // must be enabled when creating the fleet. All instances in a fleet share the same - // certificate. The certificate can be retrieved by calling the Amazon GameLift - // Server SDK (https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) - // operation GetInstanceCertificate . + // certificate. CertificateConfiguration *CertificateConfiguration // The type of compute resource used to host your game servers. You can use your @@ -499,6 +1138,10 @@ type FleetAttributes struct { // with managed Amazon GameLift. ComputeType ComputeType + // A set of properties that describe the container groups that are deployed to the + // fleet. These attributes are included for fleets with compute type CONTAINER . + ContainerGroupsAttributes *ContainerGroupsAttributes + // A time stamp indicating when this data object was created. Format is a number // expressed in Unix time as milliseconds (for example "1469498468.057" ). CreationTime *time.Time @@ -516,9 +1159,8 @@ type FleetAttributes struct { // A unique identifier for the fleet. FleetId *string - // Indicates whether to use On-Demand or Spot instances for this fleet. By - // default, this property is set to ON_DEMAND . Learn more about when to use - // On-Demand versus Spot Instances (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot) + // Indicates whether the fleet uses On-Demand or Spot instances. For more + // information, see On-Demand versus Spot Instances (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot) // . This fleet property can't be changed after the fleet is created. FleetType FleetType @@ -529,7 +1171,7 @@ type FleetAttributes struct { // have access to. For more information about using the role with your game server // builds, see Communicate with other Amazon Web Services resources from your // fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html) - // . + // . This attribute is used with fleets where ComputeType is "EC2" or "Container". InstanceRoleArn *string // Indicates that fleet instances maintain a shared credentials file for the IAM @@ -539,13 +1181,14 @@ type FleetAttributes struct { // integrated with the server SDK version 5.x. For more information about using // shared credentials, see Communicate with other Amazon Web Services resources // from your fleets (https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html) - // . + // . This attribute is used with fleets where ComputeType is "EC2" or "Container". InstanceRoleCredentialsProvider InstanceRoleCredentialsProvider - // The Amazon EC2 instance type that determines the computing resources of each - // instance in the fleet. Instance type defines the CPU, memory, storage, and - // networking capacity. See Amazon Elastic Compute Cloud Instance Types (http://aws.amazon.com/ec2/instance-types/) - // for detailed descriptions. + // The Amazon EC2 instance type that the fleet uses. Instance type determines the + // computing resources of each instance in the fleet, including CPU, memory, + // storage, and networking capacity. See Amazon Elastic Compute Cloud Instance + // Types (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. + // This attribute is used with fleets where ComputeType is "EC2" or "Container". InstanceType EC2InstanceType // This parameter is no longer used. Game session log paths are now defined using @@ -556,7 +1199,8 @@ type FleetAttributes struct { // Name of a metric group that metrics for this fleet are added to. In Amazon // CloudWatch, you can view aggregated metrics for fleets that are in a metric - // group. A fleet can be included in only one metric group at a time. + // group. A fleet can be included in only one metric group at a time. This + // attribute is used with fleets where ComputeType is "EC2" or "Container". MetricGroups []string // A descriptive label that is associated with a fleet. Fleet names do not need to @@ -564,7 +1208,8 @@ type FleetAttributes struct { Name *string // The type of game session protection to set on all new instances that are - // started in the fleet. + // started in the fleet. This attribute is used with fleets where ComputeType is + // "EC2" or "Container". // - NoProtection -- The game session can be terminated during a scale-down // event. // - FullProtection -- If the game session is in an ACTIVE status, it cannot be @@ -573,7 +1218,8 @@ type FleetAttributes struct { // The operating system of the fleet's computing resources. A fleet's operating // system is determined by the OS of the build or script that is deployed on this - // fleet. + // fleet. This attribute is used with fleets where ComputeType is "EC2" or + // "Container". OperatingSystem OperatingSystem // A policy that puts limits on the number of game sessions that a player can @@ -591,17 +1237,18 @@ type FleetAttributes struct { ScriptArn *string // A unique identifier for the Realtime script resource that is deployed on - // instances in this fleet. + // instances in this fleet. This attribute is used with fleets where ComputeType + // is "EC2". ScriptId *string // This parameter is no longer used. Server launch parameters are now defined // using the fleet's runtime configuration . Requests that use this parameter - // instead continue to be valid. + // continue to be valid. ServerLaunchParameters *string // This parameter is no longer used. Server launch paths are now defined using the // fleet's RuntimeConfiguration (https://docs.aws.amazon.com/gamelift/latest/apireference/RuntimeConfiguration.html) - // . Requests that use this parameter instead continue to be valid. + // . Requests that use this parameter continue to be valid. ServerLaunchPath *string // Current status of the fleet. Possible fleet statuses include the following: @@ -617,7 +1264,8 @@ type FleetAttributes struct { Status FleetStatus // A list of fleet activity that has been suspended using StopFleetActions (https://docs.aws.amazon.com/gamelift/latest/apireference/API_StopFleetActions.html) - // . This includes fleet auto-scaling. + // . This includes fleet auto-scaling. This attribute is used with fleets where + // ComputeType is "EC2" or "Container". StoppedActions []FleetAction // A time stamp indicating when this data object was terminated. Format is a @@ -627,11 +1275,11 @@ type FleetAttributes struct { noSmithyDocumentSerde } -// Current resource capacity settings in a specified fleet or location. The -// location value might refer to a fleet's remote location or its home Region. -// Related actions DescribeFleetCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html) -// | DescribeFleetLocationCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html) -// | UpdateFleetCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html) +// Current resource capacity settings for managed EC2 fleets and container fleets. +// For multi-location fleets, location values might refer to a fleet's remote +// location or its home Region. Returned by: DescribeFleetCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html) +// , DescribeFleetLocationCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html) +// , UpdateFleetCapacity (https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html) type FleetCapacity struct { // The Amazon Resource Name ( ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) @@ -643,27 +1291,31 @@ type FleetCapacity struct { // A unique identifier for the fleet associated with the location. FleetId *string - // Resource capacity settings. Fleet capacity is measured in Amazon EC2 instances. - // Pending and terminating counts are non-zero when the fleet capacity is adjusting - // to a scaling event or if access to resources is temporarily affected. + // The current number of instances in the fleet, listed by instance status. Counts + // for pending and terminating instances might be non-zero if the fleet is + // adjusting to a scaling event or if access to resources is temporarily affected. InstanceCounts *EC2InstanceCounts - // The Amazon EC2 instance type that is used for all instances in a fleet. The - // instance type determines the computing resources in use, including CPU, memory, - // storage, and networking capacity. See Amazon Elastic Compute Cloud Instance - // Types (http://aws.amazon.com/ec2/instance-types/) for detailed descriptions. + // The Amazon EC2 instance type that is used for instances in a fleet. Instance + // type determines the computing resources in use, including CPU, memory, storage, + // and networking capacity. See Amazon Elastic Compute Cloud Instance Types (http://aws.amazon.com/ec2/instance-types/) + // for detailed descriptions. InstanceType EC2InstanceType // The fleet location for the instance count information, expressed as an Amazon // Web Services Region code, such as us-west-2 . Location *string + // This property is used with the Amazon GameLift containers feature, which is + // currently in public preview. The number and status of replica container groups + // in a container fleet. + ReplicaContainerGroupCounts *ReplicaContainerGroupCounts + noSmithyDocumentSerde } // Current resource utilization statistics in a specified fleet or location. The -// location value might refer to a fleet's remote location or its home Region. -// Related actions +// location value might refer to a fleet's remote location or its home region. type FleetUtilization struct { // The number of active game sessions that are currently being hosted across all @@ -1390,11 +2042,11 @@ type InstanceDefinition struct { } // A range of IP addresses and port settings that allow inbound traffic to connect -// to server processes on an instance in a fleet. New game sessions are assigned an -// IP address/port number combination, which must fall into the fleet's allowed -// ranges. Fleets with custom game builds must have permissions explicitly set. For -// Realtime Servers fleets, Amazon GameLift automatically opens two port ranges, -// one for TCP messaging and one for UDP. +// to processes on an instance in a fleet. Processes are assigned an IP +// address/port number combination, which must fall into the fleet's allowed +// ranges. For container fleets, the port settings must use the same port numbers +// as the fleet's connection ports. For Realtime Servers fleets, Amazon GameLift +// automatically opens two port ranges, one for TCP messaging and one for UDP. type IpPermission struct { // A starting value for a range of allowed port numbers. For fleets using Linux @@ -1465,8 +2117,9 @@ type LocationAttributes struct { noSmithyDocumentSerde } -// A remote location where a multi-location fleet can deploy game servers for game -// hosting. +// This data type has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. A remote location where a +// multi-location fleet can deploy game servers for game hosting. type LocationConfiguration struct { // An Amazon Web Services Region code, such as us-west-2 . @@ -1477,7 +2130,10 @@ type LocationConfiguration struct { noSmithyDocumentSerde } -// Properties of a location +// Properties of a custom location for use in an Amazon GameLift Anywhere fleet. +// This data type is returned in response to a call to +// https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateLocation.html (https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateLocation.html) +// . type LocationModel struct { // The Amazon Resource Name ( ARN (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html) @@ -1966,6 +2622,30 @@ type PriorityConfiguration struct { noSmithyDocumentSerde } +// This data type is used with the Amazon GameLift containers feature, which is +// currently in public preview. The number and status of replica container groups +// that are deployed across a fleet with compute type CONTAINER . This information, +// combined with the number of server processes being hosted per container group +// (see RuntimeConfiguration ), tells you how many game sessions the fleet is +// currently capable of hosting concurrently. Returned by: DescribeFleetCapacity , +// DescribeFleetLocationCapacity +type ReplicaContainerGroupCounts struct { + + // The number of container groups that have active game sessions. + ACTIVE *int32 + + // The number of container groups that have no active game sessions. + IDLE *int32 + + // The number of container groups that are starting up but have not yet registered. + PENDING *int32 + + // The number of container groups that are in the process of shutting down. + TERMINATING *int32 + + noSmithyDocumentSerde +} + // A policy that puts limits on the number of game sessions that a player can // create within a specified span of time. With this policy, you can control // players' ability to consume available resources. The policy is evaluated when a @@ -2010,15 +2690,18 @@ type RoutingStrategy struct { noSmithyDocumentSerde } -// A collection of server process configurations that describe the set of -// processes to run on each instance in a fleet. Server processes run either an -// executable in a custom game build or a Realtime Servers script. Amazon GameLift -// launches the configured processes, manages their life cycle, and replaces them -// as needed. Each instance checks regularly for an updated runtime configuration. -// A Amazon GameLift instance is limited to 50 processes running concurrently. To -// calculate the total number of processes in a runtime configuration, add the -// values of the ConcurrentExecutions parameter for each server process. Learn -// more about Running Multiple Processes on a Fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html) +// This data type has been expanded to use with the Amazon GameLift containers +// feature, which is currently in public preview. A set of instructions that define +// the set of server processes to run on computes in a fleet. Server processes run +// either an executable in a custom game build or a Realtime Servers script. Amazon +// GameLift launches the processes, manages their life cycle, and replaces them as +// needed. Computes check regularly for an updated runtime configuration. On a +// container fleet, the Amazon GameLift Agent uses the runtime configuration to +// manage the lifecycle of server processes in a replica container group. An Amazon +// GameLift instance is limited to 50 processes running concurrently. To calculate +// the total number of processes defined in a runtime configuration, add the values +// of the ConcurrentExecutions parameter for each server process. Learn more about +// Running Multiple Processes on a Fleet (https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html) // . type RuntimeConfiguration struct { @@ -2028,13 +2711,13 @@ type RuntimeConfiguration struct { // timeout, it is ended and the game session status is changed to TERMINATED . GameSessionActivationTimeoutSeconds *int32 - // The number of game sessions in status ACTIVATING to allow on an instance. This - // setting limits the instance resources that can be used for new game activations - // at any one time. + // The number of game sessions in status ACTIVATING to allow on an instance or + // container. This setting limits the instance resources that can be used for new + // game activations at any one time. MaxConcurrentGameSessionActivations *int32 // A collection of server process configurations that identify what server - // processes to run on each instance in a fleet. + // processes to run on fleet computes. ServerProcesses []ServerProcess noSmithyDocumentSerde @@ -2211,14 +2894,14 @@ type Script struct { noSmithyDocumentSerde } -// A set of instructions for launching server processes on each instance in a -// fleet. Server processes run either an executable in a custom game build or a -// Realtime Servers script. Server process configurations are part of a fleet's -// runtime configuration. +// A set of instructions for launching server processes on fleet computes. Server +// processes run either an executable in a custom game build or a Realtime Servers +// script. Server process configurations are part of a fleet's runtime +// configuration. type ServerProcess struct { // The number of server processes using this configuration that run concurrently - // on each instance. + // on each instance or container.. // // This member is required. ConcurrentExecutions *int32 diff --git a/service/gamelift/validators.go b/service/gamelift/validators.go index 6b28de6404e..330e3965ff4 100644 --- a/service/gamelift/validators.go +++ b/service/gamelift/validators.go @@ -90,6 +90,26 @@ func (m *validateOpCreateBuild) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpCreateContainerGroupDefinition struct { +} + +func (*validateOpCreateContainerGroupDefinition) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateContainerGroupDefinition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateContainerGroupDefinitionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateContainerGroupDefinitionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateFleet struct { } @@ -390,6 +410,26 @@ func (m *validateOpDeleteBuild) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpDeleteContainerGroupDefinition struct { +} + +func (*validateOpDeleteContainerGroupDefinition) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteContainerGroupDefinition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteContainerGroupDefinitionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteContainerGroupDefinitionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteFleet struct { } @@ -710,6 +750,26 @@ func (m *validateOpDescribeCompute) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpDescribeContainerGroupDefinition struct { +} + +func (*validateOpDescribeContainerGroupDefinition) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeContainerGroupDefinition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeContainerGroupDefinitionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeContainerGroupDefinitionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeFleetEvents struct { } @@ -1726,6 +1786,10 @@ func addOpCreateBuildValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateBuild{}, middleware.After) } +func addOpCreateContainerGroupDefinitionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateContainerGroupDefinition{}, middleware.After) +} + func addOpCreateFleetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFleet{}, middleware.After) } @@ -1786,6 +1850,10 @@ func addOpDeleteBuildValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteBuild{}, middleware.After) } +func addOpDeleteContainerGroupDefinitionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteContainerGroupDefinition{}, middleware.After) +} + func addOpDeleteFleetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteFleet{}, middleware.After) } @@ -1850,6 +1918,10 @@ func addOpDescribeComputeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeCompute{}, middleware.After) } +func addOpDescribeContainerGroupDefinitionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeContainerGroupDefinition{}, middleware.After) +} + func addOpDescribeFleetEventsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeFleetEvents{}, middleware.After) } @@ -2080,6 +2152,243 @@ func validateCertificateConfiguration(v *types.CertificateConfiguration) error { } } +func validateConnectionPortRange(v *types.ConnectionPortRange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConnectionPortRange"} + if v.FromPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("FromPort")) + } + if v.ToPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("ToPort")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerDefinitionInput(v *types.ContainerDefinitionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerDefinitionInput"} + if v.ContainerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContainerName")) + } + if v.ImageUri == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImageUri")) + } + if v.PortConfiguration != nil { + if err := validateContainerPortConfiguration(v.PortConfiguration); err != nil { + invalidParams.AddNested("PortConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.HealthCheck != nil { + if err := validateContainerHealthCheck(v.HealthCheck); err != nil { + invalidParams.AddNested("HealthCheck", err.(smithy.InvalidParamsError)) + } + } + if v.Environment != nil { + if err := validateContainerEnvironmentList(v.Environment); err != nil { + invalidParams.AddNested("Environment", err.(smithy.InvalidParamsError)) + } + } + if v.DependsOn != nil { + if err := validateContainerDependencyList(v.DependsOn); err != nil { + invalidParams.AddNested("DependsOn", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerDefinitionInputList(v []types.ContainerDefinitionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerDefinitionInputList"} + for i := range v { + if err := validateContainerDefinitionInput(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerDependency(v *types.ContainerDependency) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerDependency"} + if v.ContainerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContainerName")) + } + if len(v.Condition) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Condition")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerDependencyList(v []types.ContainerDependency) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerDependencyList"} + for i := range v { + if err := validateContainerDependency(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerEnvironment(v *types.ContainerEnvironment) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerEnvironment"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerEnvironmentList(v []types.ContainerEnvironment) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerEnvironmentList"} + for i := range v { + if err := validateContainerEnvironment(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerGroupsConfiguration(v *types.ContainerGroupsConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerGroupsConfiguration"} + if v.ContainerGroupDefinitionNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContainerGroupDefinitionNames")) + } + if v.ConnectionPortRange == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionPortRange")) + } else if v.ConnectionPortRange != nil { + if err := validateConnectionPortRange(v.ConnectionPortRange); err != nil { + invalidParams.AddNested("ConnectionPortRange", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerHealthCheck(v *types.ContainerHealthCheck) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerHealthCheck"} + if v.Command == nil { + invalidParams.Add(smithy.NewErrParamRequired("Command")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerPortConfiguration(v *types.ContainerPortConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerPortConfiguration"} + if v.ContainerPortRanges == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContainerPortRanges")) + } else if v.ContainerPortRanges != nil { + if err := validateContainerPortRangeList(v.ContainerPortRanges); err != nil { + invalidParams.AddNested("ContainerPortRanges", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerPortRange(v *types.ContainerPortRange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerPortRange"} + if v.FromPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("FromPort")) + } + if v.ToPort == nil { + invalidParams.Add(smithy.NewErrParamRequired("ToPort")) + } + if len(v.Protocol) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Protocol")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateContainerPortRangeList(v []types.ContainerPortRange) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ContainerPortRangeList"} + for i := range v { + if err := validateContainerPortRange(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateGameProperty(v *types.GameProperty) error { if v == nil { return nil @@ -2432,6 +2741,42 @@ func validateOpCreateBuildInput(v *CreateBuildInput) error { } } +func validateOpCreateContainerGroupDefinitionInput(v *CreateContainerGroupDefinitionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateContainerGroupDefinitionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.TotalMemoryLimit == nil { + invalidParams.Add(smithy.NewErrParamRequired("TotalMemoryLimit")) + } + if v.TotalCpuLimit == nil { + invalidParams.Add(smithy.NewErrParamRequired("TotalCpuLimit")) + } + if v.ContainerDefinitions == nil { + invalidParams.Add(smithy.NewErrParamRequired("ContainerDefinitions")) + } else if v.ContainerDefinitions != nil { + if err := validateContainerDefinitionInputList(v.ContainerDefinitions); err != nil { + invalidParams.AddNested("ContainerDefinitions", err.(smithy.InvalidParamsError)) + } + } + if len(v.OperatingSystem) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("OperatingSystem")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateFleetInput(v *CreateFleetInput) error { if v == nil { return nil @@ -2470,6 +2815,11 @@ func validateOpCreateFleetInput(v *CreateFleetInput) error { invalidParams.AddNested("AnywhereConfiguration", err.(smithy.InvalidParamsError)) } } + if v.ContainerGroupsConfiguration != nil { + if err := validateContainerGroupsConfiguration(v.ContainerGroupsConfiguration); err != nil { + invalidParams.AddNested("ContainerGroupsConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2782,6 +3132,21 @@ func validateOpDeleteBuildInput(v *DeleteBuildInput) error { } } +func validateOpDeleteContainerGroupDefinitionInput(v *DeleteContainerGroupDefinitionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteContainerGroupDefinitionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteFleetInput(v *DeleteFleetInput) error { if v == nil { return nil @@ -3043,6 +3408,21 @@ func validateOpDescribeComputeInput(v *DescribeComputeInput) error { } } +func validateOpDescribeContainerGroupDefinitionInput(v *DescribeContainerGroupDefinitionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeContainerGroupDefinitionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeFleetEventsInput(v *DescribeFleetEventsInput) error { if v == nil { return nil diff --git a/service/rum/internal/endpoints/endpoints.go b/service/rum/internal/endpoints/endpoints.go index 3ae9c787c77..1803416c6e8 100644 --- a/service/rum/internal/endpoints/endpoints.go +++ b/service/rum/internal/endpoints/endpoints.go @@ -154,6 +154,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -163,18 +166,27 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, @@ -184,6 +196,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/ssm/api_op_CreateDocument.go b/service/ssm/api_op_CreateDocument.go index 5ead58abe0e..52b4fe48e86 100644 --- a/service/ssm/api_op_CreateDocument.go +++ b/service/ssm/api_op_CreateDocument.go @@ -52,6 +52,9 @@ type CreateDocumentInput struct { // - aws // - amazon // - amzn + // - AWSEC2 + // - AWSConfigRemediation + // - AWSSupport // // This member is required. Name *string diff --git a/service/ssm/api_op_CreateMaintenanceWindow.go b/service/ssm/api_op_CreateMaintenanceWindow.go index aa44a58a411..35d92c6f155 100644 --- a/service/ssm/api_op_CreateMaintenanceWindow.go +++ b/service/ssm/api_op_CreateMaintenanceWindow.go @@ -93,7 +93,9 @@ type CreateMaintenanceWindowInput struct { // The date and time, in ISO-8601 Extended format, for when you want the // maintenance window to become active. StartDate allows you to delay activation - // of the maintenance window until the specified future date. + // of the maintenance window until the specified future date. When using a rate + // schedule, if you provide a start date that occurs in the past, the current date + // and time are used as the start date. StartDate *string // Optional metadata that you assign to a resource. Tags enable you to categorize diff --git a/service/ssm/api_op_DescribeInstanceProperties.go b/service/ssm/api_op_DescribeInstanceProperties.go new file mode 100644 index 00000000000..dc1fdf30c23 --- /dev/null +++ b/service/ssm/api_op_DescribeInstanceProperties.go @@ -0,0 +1,244 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ssm + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ssm/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// An API operation used by the Systems Manager console to display information +// about Systems Manager managed nodes. +func (c *Client) DescribeInstanceProperties(ctx context.Context, params *DescribeInstancePropertiesInput, optFns ...func(*Options)) (*DescribeInstancePropertiesOutput, error) { + if params == nil { + params = &DescribeInstancePropertiesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceProperties", params, optFns, c.addOperationDescribeInstancePropertiesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstancePropertiesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeInstancePropertiesInput struct { + + // The request filters to use with the operator. + FiltersWithOperator []types.InstancePropertyStringFilter + + // An array of instance property filters. + InstancePropertyFilterList []types.InstancePropertyFilter + + // The maximum number of items to return for the call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + MaxResults *int32 + + // The token provided by a previous request to use to return the next set of + // properties. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeInstancePropertiesOutput struct { + + // Properties for the managed instances. + InstanceProperties []types.InstanceProperty + + // The token for the next set of properties to return. Use this token to get the + // next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeInstanceProperties{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeInstanceProperties{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceProperties"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = 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 = addOpDescribeInstancePropertiesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceProperties(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// DescribeInstancePropertiesAPIClient is a client that implements the +// DescribeInstanceProperties operation. +type DescribeInstancePropertiesAPIClient interface { + DescribeInstanceProperties(context.Context, *DescribeInstancePropertiesInput, ...func(*Options)) (*DescribeInstancePropertiesOutput, error) +} + +var _ DescribeInstancePropertiesAPIClient = (*Client)(nil) + +// DescribeInstancePropertiesPaginatorOptions is the paginator options for +// DescribeInstanceProperties +type DescribeInstancePropertiesPaginatorOptions struct { + // The maximum number of items to return for the call. The call also returns a + // token that you can specify in a subsequent call to get the next set of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstancePropertiesPaginator is a paginator for +// DescribeInstanceProperties +type DescribeInstancePropertiesPaginator struct { + options DescribeInstancePropertiesPaginatorOptions + client DescribeInstancePropertiesAPIClient + params *DescribeInstancePropertiesInput + nextToken *string + firstPage bool +} + +// NewDescribeInstancePropertiesPaginator returns a new +// DescribeInstancePropertiesPaginator +func NewDescribeInstancePropertiesPaginator(client DescribeInstancePropertiesAPIClient, params *DescribeInstancePropertiesInput, optFns ...func(*DescribeInstancePropertiesPaginatorOptions)) *DescribeInstancePropertiesPaginator { + if params == nil { + params = &DescribeInstancePropertiesInput{} + } + + options := DescribeInstancePropertiesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstancePropertiesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstancePropertiesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstanceProperties page. +func (p *DescribeInstancePropertiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancePropertiesOutput, 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.DescribeInstanceProperties(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_opDescribeInstanceProperties(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeInstanceProperties", + } +} diff --git a/service/ssm/api_op_GetParameters.go b/service/ssm/api_op_GetParameters.go index dbf9d3d8ab5..d8178aadbc1 100644 --- a/service/ssm/api_op_GetParameters.go +++ b/service/ssm/api_op_GetParameters.go @@ -34,8 +34,9 @@ type GetParametersInput struct { // The names or Amazon Resource Names (ARNs) of the parameters that you want to // query. For parameters shared with you from another account, you must use the // full ARNs. To query by parameter label, use "Name": "name:label" . To query by - // parameter version, use "Name": "name:version" . For more information about - // shared parameters, see Working with shared parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html) + // parameter version, use "Name": "name:version" . The results for GetParameters + // requests are listed in alphabetical order in query responses. For information + // about shared parameters, see Working with shared parameters (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html) // in the Amazon Web Services Systems Manager User Guide. // // This member is required. diff --git a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go index b69e3556865..c528f1d171e 100644 --- a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go +++ b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go @@ -105,11 +105,15 @@ type RegisterTaskWithMaintenanceWindowInput struct { // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services // Systems Manager to assume when running a maintenance window task. If you do not - // specify a service role ARN, Systems Manager uses your account's service-linked - // role. If no service-linked role for Systems Manager exists in your account, it - // is created when you run RegisterTaskWithMaintenanceWindow . For more - // information, see Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) - // in the in the Amazon Web Services Systems Manager User Guide: + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see Setting up + // maintenance windows (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html) + // in the in the Amazon Web Services Systems Manager User Guide. ServiceRoleArn *string // The targets (either managed nodes or maintenance window targets). One or more diff --git a/service/ssm/api_op_UpdateMaintenanceWindow.go b/service/ssm/api_op_UpdateMaintenanceWindow.go index bbac2db402b..98d6af463d8 100644 --- a/service/ssm/api_op_UpdateMaintenanceWindow.go +++ b/service/ssm/api_op_UpdateMaintenanceWindow.go @@ -87,7 +87,9 @@ type UpdateMaintenanceWindowInput struct { // The date and time, in ISO-8601 Extended format, for when you want the // maintenance window to become active. StartDate allows you to delay activation - // of the maintenance window until the specified future date. + // of the maintenance window until the specified future date. When using a rate + // schedule, if you provide a start date that occurs in the past, the current date + // and time are used as the start date. StartDate *string noSmithyDocumentSerde diff --git a/service/ssm/api_op_UpdateMaintenanceWindowTask.go b/service/ssm/api_op_UpdateMaintenanceWindowTask.go index e203607b164..764d88425e4 100644 --- a/service/ssm/api_op_UpdateMaintenanceWindowTask.go +++ b/service/ssm/api_op_UpdateMaintenanceWindowTask.go @@ -129,11 +129,15 @@ type UpdateMaintenanceWindowTaskInput struct { // The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services // Systems Manager to assume when running a maintenance window task. If you do not - // specify a service role ARN, Systems Manager uses your account's service-linked - // role. If no service-linked role for Systems Manager exists in your account, it - // is created when you run RegisterTaskWithMaintenanceWindow . For more - // information, see Using service-linked roles for Systems Manager (https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions) - // in the in the Amazon Web Services Systems Manager User Guide: + // specify a service role ARN, Systems Manager uses a service-linked role in your + // account. If no appropriate service-linked role for Systems Manager exists in + // your account, it is created when you run RegisterTaskWithMaintenanceWindow . + // However, for an improved security posture, we strongly recommend creating a + // custom policy and custom service role for running your maintenance window tasks. + // The policy can be crafted to provide only the permissions needed for your + // particular maintenance window tasks. For more information, see Setting up + // maintenance windows (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html) + // in the in the Amazon Web Services Systems Manager User Guide. ServiceRoleArn *string // The targets (either managed nodes or tags) to modify. Managed nodes are diff --git a/service/ssm/deserializers.go b/service/ssm/deserializers.go index db2d8ac134f..c4be252b2c6 100644 --- a/service/ssm/deserializers.go +++ b/service/ssm/deserializers.go @@ -5222,14 +5222,14 @@ func awsAwsjson11_deserializeOpErrorDescribeInstancePatchStatesForPatchGroup(res } } -type awsAwsjson11_deserializeOpDescribeInventoryDeletions struct { +type awsAwsjson11_deserializeOpDescribeInstanceProperties struct { } -func (*awsAwsjson11_deserializeOpDescribeInventoryDeletions) ID() string { +func (*awsAwsjson11_deserializeOpDescribeInstanceProperties) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeInstanceProperties) 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) @@ -5243,9 +5243,9 @@ func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInstanceProperties(response, &metadata) } - output := &DescribeInventoryDeletionsOutput{} + output := &DescribeInstancePropertiesOutput{} out.Result = output var buff [1024]byte @@ -5265,7 +5265,7 @@ func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeInventoryDeletionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeInstancePropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5279,7 +5279,7 @@ func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeInstanceProperties(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)} @@ -5319,8 +5319,20 @@ func awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(response *smithyh case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDeletionIdException", errorCode): - return awsAwsjson11_deserializeErrorInvalidDeletionIdException(response, errorBody) + case strings.EqualFold("InvalidActivationId", errorCode): + return awsAwsjson11_deserializeErrorInvalidActivationId(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidInstancePropertyFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstancePropertyFilterValue(response, errorBody) case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) @@ -5335,14 +5347,14 @@ func awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(response *smithyh } } -type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions struct { +type awsAwsjson11_deserializeOpDescribeInventoryDeletions struct { } -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) ID() string { +func (*awsAwsjson11_deserializeOpDescribeInventoryDeletions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) 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) @@ -5356,9 +5368,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(response, &metadata) } - output := &DescribeMaintenanceWindowExecutionsOutput{} + output := &DescribeInventoryDeletionsOutput{} out.Result = output var buff [1024]byte @@ -5378,7 +5390,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) HandleDe return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeInventoryDeletionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5392,7 +5404,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) HandleDe return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeInventoryDeletions(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)} @@ -5432,6 +5444,12 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(response case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidDeletionIdException", errorCode): + return awsAwsjson11_deserializeErrorInvalidDeletionIdException(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5442,14 +5460,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(response } } -type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions struct { } -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) 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) @@ -5463,9 +5481,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocat } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvocations(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(response, &metadata) } - output := &DescribeMaintenanceWindowExecutionTaskInvocationsOutput{} + output := &DescribeMaintenanceWindowExecutionsOutput{} out.Result = output var buff [1024]byte @@ -5485,7 +5503,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocat return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTaskInvocationsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5499,7 +5517,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocat return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutions(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)} @@ -5536,9 +5554,6 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvoca errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) @@ -5552,14 +5567,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvoca } } -type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations struct { } -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocations) 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) @@ -5573,9 +5588,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) Hand } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTasks(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvocations(response, &metadata) } - output := &DescribeMaintenanceWindowExecutionTasksOutput{} + output := &DescribeMaintenanceWindowExecutionTaskInvocationsOutput{} out.Result = output var buff [1024]byte @@ -5595,7 +5610,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) Hand return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTasksOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTaskInvocationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5609,7 +5624,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) Hand return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTaskInvocations(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)} @@ -5662,121 +5677,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTasks(resp } } -type awsAwsjson11_deserializeOpDescribeMaintenanceWindows struct { -} - -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindows) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindows(response, &metadata) - } - output := &DescribeMaintenanceWindowsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks struct { } -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) 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) @@ -5790,9 +5698,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowSchedule(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTasks(response, &metadata) } - output := &DescribeMaintenanceWindowScheduleOutput{} + output := &DescribeMaintenanceWindowExecutionTasksOutput{} out.Result = output var buff [1024]byte @@ -5812,7 +5720,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) HandleDese return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowScheduleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowExecutionTasksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5826,7 +5734,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) HandleDese return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowExecutionTasks(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)} @@ -5879,14 +5787,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowSchedule(response * } } -type awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindows struct { } -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindows) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindows) 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) @@ -5900,9 +5808,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowsForTarget(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindows(response, &metadata) } - output := &DescribeMaintenanceWindowsForTargetOutput{} + output := &DescribeMaintenanceWindowsOutput{} out.Result = output var buff [1024]byte @@ -5922,7 +5830,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) HandleDe return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsForTargetOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5936,7 +5844,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) HandleDe return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowsForTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindows(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)} @@ -5986,14 +5894,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowsForTarget(response } } -type awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule struct { } -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) 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) @@ -6007,9 +5915,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTargets(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowSchedule(response, &metadata) } - output := &DescribeMaintenanceWindowTargetsOutput{} + output := &DescribeMaintenanceWindowScheduleOutput{} out.Result = output var buff [1024]byte @@ -6029,7 +5937,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) HandleDeser return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTargetsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6043,7 +5951,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) HandleDeser return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowSchedule(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)} @@ -6096,14 +6004,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTargets(response *s } } -type awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget struct { } -func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) 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) @@ -6117,9 +6025,9 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowsForTarget(response, &metadata) } - output := &DescribeMaintenanceWindowTasksOutput{} + output := &DescribeMaintenanceWindowsForTargetOutput{} out.Result = output var buff [1024]byte @@ -6139,7 +6047,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) HandleDeseria return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTasksOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowsForTargetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6153,7 +6061,7 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) HandleDeseria return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowsForTarget(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)} @@ -6190,9 +6098,6 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(response *smi errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) @@ -6206,14 +6111,14 @@ func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(response *smi } } -type awsAwsjson11_deserializeOpDescribeOpsItems struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets struct { } -func (*awsAwsjson11_deserializeOpDescribeOpsItems) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeOpsItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) 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) @@ -6227,9 +6132,9 @@ func (m *awsAwsjson11_deserializeOpDescribeOpsItems) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOpsItems(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTargets(response, &metadata) } - output := &DescribeOpsItemsOutput{} + output := &DescribeMaintenanceWindowTargetsOutput{} out.Result = output var buff [1024]byte @@ -6249,7 +6154,7 @@ func (m *awsAwsjson11_deserializeOpDescribeOpsItems) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeOpsItemsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTargetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6263,7 +6168,7 @@ func (m *awsAwsjson11_deserializeOpDescribeOpsItems) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeOpsItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTargets(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)} @@ -6300,6 +6205,9 @@ func awsAwsjson11_deserializeOpErrorDescribeOpsItems(response *smithyhttp.Respon errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) @@ -6313,14 +6221,14 @@ func awsAwsjson11_deserializeOpErrorDescribeOpsItems(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDescribeParameters struct { +type awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks struct { } -func (*awsAwsjson11_deserializeOpDescribeParameters) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) 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) @@ -6334,9 +6242,9 @@ func (m *awsAwsjson11_deserializeOpDescribeParameters) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeParameters(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(response, &metadata) } - output := &DescribeParametersOutput{} + output := &DescribeMaintenanceWindowTasksOutput{} out.Result = output var buff [1024]byte @@ -6356,7 +6264,7 @@ func (m *awsAwsjson11_deserializeOpDescribeParameters) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeParametersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMaintenanceWindowTasksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6370,7 +6278,7 @@ func (m *awsAwsjson11_deserializeOpDescribeParameters) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMaintenanceWindowTasks(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)} @@ -6407,21 +6315,12 @@ func awsAwsjson11_deserializeOpErrorDescribeParameters(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidFilterKey", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - - case strings.EqualFold("InvalidFilterOption", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) - - case strings.EqualFold("InvalidFilterValue", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6432,14 +6331,14 @@ func awsAwsjson11_deserializeOpErrorDescribeParameters(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpDescribePatchBaselines struct { +type awsAwsjson11_deserializeOpDescribeOpsItems struct { } -func (*awsAwsjson11_deserializeOpDescribePatchBaselines) ID() string { +func (*awsAwsjson11_deserializeOpDescribeOpsItems) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeOpsItems) 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) @@ -6453,9 +6352,9 @@ func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchBaselines(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOpsItems(response, &metadata) } - output := &DescribePatchBaselinesOutput{} + output := &DescribeOpsItemsOutput{} out.Result = output var buff [1024]byte @@ -6475,7 +6374,7 @@ func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribePatchBaselinesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeOpsItemsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6489,7 +6388,7 @@ func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribePatchBaselines(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeOpsItems(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)} @@ -6539,14 +6438,14 @@ func awsAwsjson11_deserializeOpErrorDescribePatchBaselines(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDescribePatchGroups struct { +type awsAwsjson11_deserializeOpDescribeParameters struct { } -func (*awsAwsjson11_deserializeOpDescribePatchGroups) ID() string { +func (*awsAwsjson11_deserializeOpDescribeParameters) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribePatchGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeParameters) 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) @@ -6560,9 +6459,9 @@ func (m *awsAwsjson11_deserializeOpDescribePatchGroups) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchGroups(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeParameters(response, &metadata) } - output := &DescribePatchGroupsOutput{} + output := &DescribeParametersOutput{} out.Result = output var buff [1024]byte @@ -6582,7 +6481,7 @@ func (m *awsAwsjson11_deserializeOpDescribePatchGroups) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribePatchGroupsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeParametersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6596,7 +6495,7 @@ func (m *awsAwsjson11_deserializeOpDescribePatchGroups) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribePatchGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeParameters(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)} @@ -6636,112 +6535,14 @@ func awsAwsjson11_deserializeOpErrorDescribePatchGroups(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDescribePatchGroupState struct { -} - -func (*awsAwsjson11_deserializeOpDescribePatchGroupState) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDescribePatchGroupState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchGroupState(response, &metadata) - } - output := &DescribePatchGroupStateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDescribePatchGroupStateOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDescribePatchGroupState(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("InvalidFilterOption", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) @@ -6756,14 +6557,14 @@ func awsAwsjson11_deserializeOpErrorDescribePatchGroupState(response *smithyhttp } } -type awsAwsjson11_deserializeOpDescribePatchProperties struct { +type awsAwsjson11_deserializeOpDescribePatchBaselines struct { } -func (*awsAwsjson11_deserializeOpDescribePatchProperties) ID() string { +func (*awsAwsjson11_deserializeOpDescribePatchBaselines) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribePatchProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) 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) @@ -6777,9 +6578,9 @@ func (m *awsAwsjson11_deserializeOpDescribePatchProperties) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchProperties(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchBaselines(response, &metadata) } - output := &DescribePatchPropertiesOutput{} + output := &DescribePatchBaselinesOutput{} out.Result = output var buff [1024]byte @@ -6799,7 +6600,7 @@ func (m *awsAwsjson11_deserializeOpDescribePatchProperties) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribePatchPropertiesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePatchBaselinesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6813,7 +6614,7 @@ func (m *awsAwsjson11_deserializeOpDescribePatchProperties) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribePatchProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePatchBaselines(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)} @@ -6863,14 +6664,14 @@ func awsAwsjson11_deserializeOpErrorDescribePatchProperties(response *smithyhttp } } -type awsAwsjson11_deserializeOpDescribeSessions struct { +type awsAwsjson11_deserializeOpDescribePatchGroups struct { } -func (*awsAwsjson11_deserializeOpDescribeSessions) ID() string { +func (*awsAwsjson11_deserializeOpDescribePatchGroups) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePatchGroups) 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) @@ -6884,9 +6685,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSessions) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSessions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchGroups(response, &metadata) } - output := &DescribeSessionsOutput{} + output := &DescribePatchGroupsOutput{} out.Result = output var buff [1024]byte @@ -6906,7 +6707,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSessions) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSessionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePatchGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6920,7 +6721,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSessions) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePatchGroups(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)} @@ -6960,12 +6761,6 @@ func awsAwsjson11_deserializeOpErrorDescribeSessions(response *smithyhttp.Respon case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidFilterKey", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6976,14 +6771,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSessions(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem struct { +type awsAwsjson11_deserializeOpDescribePatchGroupState struct { } -func (*awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) ID() string { +func (*awsAwsjson11_deserializeOpDescribePatchGroupState) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePatchGroupState) 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) @@ -6997,9 +6792,9 @@ func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchGroupState(response, &metadata) } - output := &DisassociateOpsItemRelatedItemOutput{} + output := &DescribePatchGroupStateOutput{} out.Result = output var buff [1024]byte @@ -7019,7 +6814,7 @@ func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeseria return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDisassociateOpsItemRelatedItemOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePatchGroupStateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7033,7 +6828,7 @@ func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeseria return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePatchGroupState(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)} @@ -7073,17 +6868,8 @@ func awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response *smi case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsItemConflictException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemConflictException(response, errorBody) - - case strings.EqualFold("OpsItemInvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) - - case strings.EqualFold("OpsItemNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) - - case strings.EqualFold("OpsItemRelatedItemAssociationNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemRelatedItemAssociationNotFoundException(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7095,14 +6881,14 @@ func awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response *smi } } -type awsAwsjson11_deserializeOpGetAutomationExecution struct { +type awsAwsjson11_deserializeOpDescribePatchProperties struct { } -func (*awsAwsjson11_deserializeOpGetAutomationExecution) ID() string { +func (*awsAwsjson11_deserializeOpDescribePatchProperties) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribePatchProperties) 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) @@ -7116,9 +6902,9 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetAutomationExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribePatchProperties(response, &metadata) } - output := &GetAutomationExecutionOutput{} + output := &DescribePatchPropertiesOutput{} out.Result = output var buff [1024]byte @@ -7138,7 +6924,7 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetAutomationExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribePatchPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7152,7 +6938,7 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribePatchProperties(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)} @@ -7189,9 +6975,6 @@ func awsAwsjson11_deserializeOpErrorGetAutomationExecution(response *smithyhttp. errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) @@ -7205,14 +6988,14 @@ func awsAwsjson11_deserializeOpErrorGetAutomationExecution(response *smithyhttp. } } -type awsAwsjson11_deserializeOpGetCalendarState struct { +type awsAwsjson11_deserializeOpDescribeSessions struct { } -func (*awsAwsjson11_deserializeOpGetCalendarState) ID() string { +func (*awsAwsjson11_deserializeOpDescribeSessions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeSessions) 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) @@ -7226,9 +7009,9 @@ func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCalendarState(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSessions(response, &metadata) } - output := &GetCalendarStateOutput{} + output := &DescribeSessionsOutput{} out.Result = output var buff [1024]byte @@ -7248,7 +7031,7 @@ func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCalendarStateOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeSessionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7262,7 +7045,7 @@ func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCalendarState(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeSessions(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)} @@ -7302,14 +7085,11 @@ func awsAwsjson11_deserializeOpErrorGetCalendarState(response *smithyhttp.Respon case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - - case strings.EqualFold("InvalidDocumentType", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentType(response, errorBody) + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - case strings.EqualFold("UnsupportedCalendarException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedCalendarException(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7321,14 +7101,14 @@ func awsAwsjson11_deserializeOpErrorGetCalendarState(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpGetCommandInvocation struct { +type awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem struct { } -func (*awsAwsjson11_deserializeOpGetCommandInvocation) ID() string { +func (*awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) 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) @@ -7342,9 +7122,9 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCommandInvocation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(response, &metadata) } - output := &GetCommandInvocationOutput{} + output := &DisassociateOpsItemRelatedItemOutput{} out.Result = output var buff [1024]byte @@ -7364,7 +7144,7 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCommandInvocationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDisassociateOpsItemRelatedItemOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7378,7 +7158,7 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDisassociateOpsItemRelatedItem(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)} @@ -7418,17 +7198,17 @@ func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Re case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidCommandId", errorCode): - return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + case strings.EqualFold("OpsItemConflictException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemConflictException(response, errorBody) - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidPluginName", errorCode): - return awsAwsjson11_deserializeErrorInvalidPluginName(response, errorBody) + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) - case strings.EqualFold("InvocationDoesNotExist", errorCode): - return awsAwsjson11_deserializeErrorInvocationDoesNotExist(response, errorBody) + case strings.EqualFold("OpsItemRelatedItemAssociationNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemRelatedItemAssociationNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7440,14 +7220,14 @@ func awsAwsjson11_deserializeOpErrorGetCommandInvocation(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpGetConnectionStatus struct { +type awsAwsjson11_deserializeOpGetAutomationExecution struct { } -func (*awsAwsjson11_deserializeOpGetConnectionStatus) ID() string { +func (*awsAwsjson11_deserializeOpGetAutomationExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetAutomationExecution) 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) @@ -7461,9 +7241,9 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetConnectionStatus(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetAutomationExecution(response, &metadata) } - output := &GetConnectionStatusOutput{} + output := &GetAutomationExecutionOutput{} out.Result = output var buff [1024]byte @@ -7483,7 +7263,7 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetConnectionStatusOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetAutomationExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7497,7 +7277,7 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetConnectionStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetAutomationExecution(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)} @@ -7534,113 +7314,9 @@ func awsAwsjson11_deserializeOpErrorGetConnectionStatus(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpGetDefaultPatchBaseline struct { -} - -func (*awsAwsjson11_deserializeOpGetDefaultPatchBaseline) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response, &metadata) - } - output := &GetDefaultPatchBaselineOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentGetDefaultPatchBaselineOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) @@ -7654,14 +7330,14 @@ func awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response *smithyhttp } } -type awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance struct { +type awsAwsjson11_deserializeOpGetCalendarState struct { } -func (*awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) ID() string { +func (*awsAwsjson11_deserializeOpGetCalendarState) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetCalendarState) 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) @@ -7675,9 +7351,9 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetCalendarState(response, &metadata) } - output := &GetDeployablePatchSnapshotForInstanceOutput{} + output := &GetCalendarStateOutput{} out.Result = output var buff [1024]byte @@ -7697,7 +7373,7 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDeployablePatchSnapshotForInstanceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetCalendarStateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7711,7 +7387,7 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetCalendarState(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)} @@ -7751,11 +7427,14 @@ func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(respon case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("UnsupportedFeatureRequiredException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedFeatureRequiredException(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - case strings.EqualFold("UnsupportedOperatingSystem", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response, errorBody) + case strings.EqualFold("InvalidDocumentType", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentType(response, errorBody) + + case strings.EqualFold("UnsupportedCalendarException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedCalendarException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7767,14 +7446,14 @@ func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(respon } } -type awsAwsjson11_deserializeOpGetDocument struct { +type awsAwsjson11_deserializeOpGetCommandInvocation struct { } -func (*awsAwsjson11_deserializeOpGetDocument) ID() string { +func (*awsAwsjson11_deserializeOpGetCommandInvocation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetCommandInvocation) 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) @@ -7788,9 +7467,9 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetDocument(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetCommandInvocation(response, &metadata) } - output := &GetDocumentOutput{} + output := &GetCommandInvocationOutput{} out.Result = output var buff [1024]byte @@ -7810,7 +7489,7 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetDocumentOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetCommandInvocationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7824,7 +7503,7 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetCommandInvocation(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)} @@ -7864,11 +7543,17 @@ func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, m case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("InvalidPluginName", errorCode): + return awsAwsjson11_deserializeErrorInvalidPluginName(response, errorBody) + + case strings.EqualFold("InvocationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorInvocationDoesNotExist(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -7880,14 +7565,14 @@ func awsAwsjson11_deserializeOpErrorGetDocument(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpGetInventory struct { +type awsAwsjson11_deserializeOpGetConnectionStatus struct { } -func (*awsAwsjson11_deserializeOpGetInventory) ID() string { +func (*awsAwsjson11_deserializeOpGetConnectionStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetConnectionStatus) 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) @@ -7901,9 +7586,9 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetInventory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetConnectionStatus(response, &metadata) } - output := &GetInventoryOutput{} + output := &GetConnectionStatusOutput{} out.Result = output var buff [1024]byte @@ -7923,7 +7608,7 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetInventoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetConnectionStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7937,7 +7622,7 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetConnectionStatus(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)} @@ -7977,24 +7662,6 @@ func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAggregatorException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) - - case strings.EqualFold("InvalidFilter", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - - case strings.EqualFold("InvalidInventoryGroupException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInventoryGroupException(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - - case strings.EqualFold("InvalidResultAttributeException", errorCode): - return awsAwsjson11_deserializeErrorInvalidResultAttributeException(response, errorBody) - - case strings.EqualFold("InvalidTypeNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8005,14 +7672,14 @@ func awsAwsjson11_deserializeOpErrorGetInventory(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetInventorySchema struct { +type awsAwsjson11_deserializeOpGetDefaultPatchBaseline struct { } -func (*awsAwsjson11_deserializeOpGetInventorySchema) ID() string { +func (*awsAwsjson11_deserializeOpGetDefaultPatchBaseline) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) 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) @@ -8026,9 +7693,9 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetInventorySchema(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(response, &metadata) } - output := &GetInventorySchemaOutput{} + output := &GetDefaultPatchBaselineOutput{} out.Result = output var buff [1024]byte @@ -8048,7 +7715,7 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetInventorySchemaOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDefaultPatchBaselineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8062,7 +7729,7 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDefaultPatchBaseline(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)} @@ -8102,12 +7769,6 @@ func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Resp case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - - case strings.EqualFold("InvalidTypeNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8118,14 +7779,14 @@ func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpGetMaintenanceWindow struct { +type awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindow) ID() string { +func (*awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) 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) @@ -8139,9 +7800,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(response, &metadata) } - output := &GetMaintenanceWindowOutput{} + output := &GetDeployablePatchSnapshotForInstanceOutput{} out.Result = output var buff [1024]byte @@ -8161,7 +7822,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDeployablePatchSnapshotForInstanceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8175,7 +7836,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDeployablePatchSnapshotForInstance(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)} @@ -8212,12 +7873,15 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("UnsupportedFeatureRequiredException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedFeatureRequiredException(response, errorBody) + + case strings.EqualFold("UnsupportedOperatingSystem", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperatingSystem(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8228,14 +7892,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowExecution struct { +type awsAwsjson11_deserializeOpGetDocument struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) ID() string { +func (*awsAwsjson11_deserializeOpGetDocument) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetDocument) 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) @@ -8249,9 +7913,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetDocument(response, &metadata) } - output := &GetMaintenanceWindowExecutionOutput{} + output := &GetDocumentOutput{} out.Result = output var buff [1024]byte @@ -8271,7 +7935,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetDocumentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8285,7 +7949,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetDocument(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)} @@ -8322,12 +7986,15 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response *smit errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8338,14 +8005,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response *smit } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask struct { +type awsAwsjson11_deserializeOpGetInventory struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) ID() string { +func (*awsAwsjson11_deserializeOpGetInventory) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetInventory) 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) @@ -8359,9 +8026,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetInventory(response, &metadata) } - output := &GetMaintenanceWindowExecutionTaskOutput{} + output := &GetInventoryOutput{} out.Result = output var buff [1024]byte @@ -8381,7 +8048,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetInventoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8395,7 +8062,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetInventory(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)} @@ -8432,12 +8099,140 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response * errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidInventoryGroupException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInventoryGroupException(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidResultAttributeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidResultAttributeException(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetInventorySchema struct { +} + +func (*awsAwsjson11_deserializeOpGetInventorySchema) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetInventorySchema(response, &metadata) + } + output := &GetInventorySchemaOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetInventorySchemaOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetInventorySchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8448,14 +8243,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response * } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindow struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) 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) @@ -8469,9 +8264,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(response, &metadata) } - output := &GetMaintenanceWindowExecutionTaskInvocationOutput{} + output := &GetMaintenanceWindowOutput{} out.Result = output var buff [1024]byte @@ -8491,7 +8286,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8505,7 +8300,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindow(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)} @@ -8558,14 +8353,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation( } } -type awsAwsjson11_deserializeOpGetMaintenanceWindowTask struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecution struct { } -func (*awsAwsjson11_deserializeOpGetMaintenanceWindowTask) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) 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) @@ -8579,9 +8374,9 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(response, &metadata) } - output := &GetMaintenanceWindowTaskOutput{} + output := &GetMaintenanceWindowExecutionOutput{} out.Result = output var buff [1024]byte @@ -8601,7 +8396,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowTaskOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8615,7 +8410,7 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecution(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)} @@ -8668,14 +8463,14 @@ func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response *smithyhtt } } -type awsAwsjson11_deserializeOpGetOpsItem struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask struct { } -func (*awsAwsjson11_deserializeOpGetOpsItem) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) 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) @@ -8689,9 +8484,9 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsItem(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(response, &metadata) } - output := &GetOpsItemOutput{} + output := &GetMaintenanceWindowExecutionTaskOutput{} out.Result = output var buff [1024]byte @@ -8711,7 +8506,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetOpsItemOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8725,7 +8520,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTask(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)} @@ -8762,15 +8557,12 @@ func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, me errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsItemAccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) - - case strings.EqualFold("OpsItemNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8781,14 +8573,14 @@ func awsAwsjson11_deserializeOpErrorGetOpsItem(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpGetOpsMetadata struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation struct { } -func (*awsAwsjson11_deserializeOpGetOpsMetadata) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) 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) @@ -8802,9 +8594,9 @@ func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(response, &metadata) } - output := &GetOpsMetadataOutput{} + output := &GetMaintenanceWindowExecutionTaskInvocationOutput{} out.Result = output var buff [1024]byte @@ -8824,7 +8616,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetOpsMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowExecutionTaskInvocationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8838,7 +8630,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowExecutionTaskInvocation(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)} @@ -8875,15 +8667,12 @@ func awsAwsjson11_deserializeOpErrorGetOpsMetadata(response *smithyhttp.Response errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): - return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) - - case strings.EqualFold("OpsMetadataNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8894,14 +8683,14 @@ func awsAwsjson11_deserializeOpErrorGetOpsMetadata(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpGetOpsSummary struct { +type awsAwsjson11_deserializeOpGetMaintenanceWindowTask struct { } -func (*awsAwsjson11_deserializeOpGetOpsSummary) ID() string { +func (*awsAwsjson11_deserializeOpGetMaintenanceWindowTask) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) 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) @@ -8915,9 +8704,9 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsSummary(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(response, &metadata) } - output := &GetOpsSummaryOutput{} + output := &GetMaintenanceWindowTaskOutput{} out.Result = output var buff [1024]byte @@ -8937,7 +8726,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetOpsSummaryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetMaintenanceWindowTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8951,7 +8740,7 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetMaintenanceWindowTask(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)} @@ -8988,24 +8777,12 @@ func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAggregatorException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) - - case strings.EqualFold("InvalidFilter", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - - case strings.EqualFold("InvalidTypeNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) - - case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9016,14 +8793,14 @@ func awsAwsjson11_deserializeOpErrorGetOpsSummary(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetParameter struct { +type awsAwsjson11_deserializeOpGetOpsItem struct { } -func (*awsAwsjson11_deserializeOpGetParameter) ID() string { +func (*awsAwsjson11_deserializeOpGetOpsItem) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetOpsItem) 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) @@ -9037,9 +8814,9 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParameter(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsItem(response, &metadata) } - output := &GetParameterOutput{} + output := &GetOpsItemOutput{} out.Result = output var buff [1024]byte @@ -9059,7 +8836,7 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParameterOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetOpsItemOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9073,7 +8850,7 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetOpsItem(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)} @@ -9113,14 +8890,11 @@ func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidKeyId", errorCode): - return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) - - case strings.EqualFold("ParameterNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) - case strings.EqualFold("ParameterVersionNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9132,14 +8906,14 @@ func awsAwsjson11_deserializeOpErrorGetParameter(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetParameterHistory struct { +type awsAwsjson11_deserializeOpGetOpsMetadata struct { } -func (*awsAwsjson11_deserializeOpGetParameterHistory) ID() string { +func (*awsAwsjson11_deserializeOpGetOpsMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetOpsMetadata) 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) @@ -9153,9 +8927,9 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParameterHistory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsMetadata(response, &metadata) } - output := &GetParameterHistoryOutput{} + output := &GetOpsMetadataOutput{} out.Result = output var buff [1024]byte @@ -9175,7 +8949,7 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParameterHistoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetOpsMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9189,7 +8963,7 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetOpsMetadata(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)} @@ -9229,14 +9003,11 @@ func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidKeyId", errorCode): - return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) - case strings.EqualFold("ParameterNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + case strings.EqualFold("OpsMetadataNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9248,14 +9019,14 @@ func awsAwsjson11_deserializeOpErrorGetParameterHistory(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpGetParameters struct { +type awsAwsjson11_deserializeOpGetOpsSummary struct { } -func (*awsAwsjson11_deserializeOpGetParameters) ID() string { +func (*awsAwsjson11_deserializeOpGetOpsSummary) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetOpsSummary) 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) @@ -9269,9 +9040,9 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParameters(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetOpsSummary(response, &metadata) } - output := &GetParametersOutput{} + output := &GetOpsSummaryOutput{} out.Result = output var buff [1024]byte @@ -9291,7 +9062,7 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParametersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetOpsSummaryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9305,7 +9076,7 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetOpsSummary(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)} @@ -9345,8 +9116,20 @@ func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidKeyId", errorCode): - return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + case strings.EqualFold("InvalidAggregatorException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAggregatorException(response, errorBody) + + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + case strings.EqualFold("ResourceDataSyncNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9358,14 +9141,14 @@ func awsAwsjson11_deserializeOpErrorGetParameters(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetParametersByPath struct { +type awsAwsjson11_deserializeOpGetParameter struct { } -func (*awsAwsjson11_deserializeOpGetParametersByPath) ID() string { +func (*awsAwsjson11_deserializeOpGetParameter) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetParameter) 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) @@ -9379,9 +9162,9 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetParametersByPath(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameter(response, &metadata) } - output := &GetParametersByPathOutput{} + output := &GetParameterOutput{} out.Result = output var buff [1024]byte @@ -9401,7 +9184,7 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetParametersByPathOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetParameterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9415,7 +9198,7 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetParametersByPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetParameter(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)} @@ -9455,20 +9238,14 @@ func awsAwsjson11_deserializeOpErrorGetParametersByPath(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidFilterKey", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - - case strings.EqualFold("InvalidFilterOption", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) - - case strings.EqualFold("InvalidFilterValue", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) - case strings.EqualFold("InvalidKeyId", errorCode): return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) + + case strings.EqualFold("ParameterVersionNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9480,14 +9257,14 @@ func awsAwsjson11_deserializeOpErrorGetParametersByPath(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpGetPatchBaseline struct { +type awsAwsjson11_deserializeOpGetParameterHistory struct { } -func (*awsAwsjson11_deserializeOpGetPatchBaseline) ID() string { +func (*awsAwsjson11_deserializeOpGetParameterHistory) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetParameterHistory) 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) @@ -9501,9 +9278,9 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaseline(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameterHistory(response, &metadata) } - output := &GetPatchBaselineOutput{} + output := &GetParameterHistoryOutput{} out.Result = output var buff [1024]byte @@ -9523,7 +9300,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetParameterHistoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9537,7 +9314,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetParameterHistory(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)} @@ -9574,14 +9351,17 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Respon errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9593,14 +9373,14 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaseline(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup struct { +type awsAwsjson11_deserializeOpGetParameters struct { } -func (*awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) ID() string { +func (*awsAwsjson11_deserializeOpGetParameters) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetParameters) 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) @@ -9614,9 +9394,9 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetParameters(response, &metadata) } - output := &GetPatchBaselineForPatchGroupOutput{} + output := &GetParametersOutput{} out.Result = output var buff [1024]byte @@ -9636,7 +9416,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineForPatchGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetParametersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9650,7 +9430,7 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetParameters(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)} @@ -9690,6 +9470,9 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smit case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9700,14 +9483,14 @@ func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response *smit } } -type awsAwsjson11_deserializeOpGetResourcePolicies struct { +type awsAwsjson11_deserializeOpGetParametersByPath struct { } -func (*awsAwsjson11_deserializeOpGetResourcePolicies) ID() string { +func (*awsAwsjson11_deserializeOpGetParametersByPath) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetParametersByPath) 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) @@ -9721,9 +9504,9 @@ func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetResourcePolicies(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetParametersByPath(response, &metadata) } - output := &GetResourcePoliciesOutput{} + output := &GetParametersByPathOutput{} out.Result = output var buff [1024]byte @@ -9743,7 +9526,7 @@ func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetResourcePoliciesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetParametersByPathOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9757,7 +9540,7 @@ func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetParametersByPath(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)} @@ -9797,11 +9580,20 @@ func awsAwsjson11_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidFilterOption", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterOption(response, errorBody) + + case strings.EqualFold("InvalidFilterValue", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterValue(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9813,14 +9605,14 @@ func awsAwsjson11_deserializeOpErrorGetResourcePolicies(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpGetServiceSetting struct { +type awsAwsjson11_deserializeOpGetPatchBaseline struct { } -func (*awsAwsjson11_deserializeOpGetServiceSetting) ID() string { +func (*awsAwsjson11_deserializeOpGetPatchBaseline) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetPatchBaseline) 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) @@ -9834,9 +9626,9 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetServiceSetting(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaseline(response, &metadata) } - output := &GetServiceSettingOutput{} + output := &GetPatchBaselineOutput{} out.Result = output var buff [1024]byte @@ -9856,7 +9648,7 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetServiceSettingOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9870,7 +9662,7 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetPatchBaseline(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)} @@ -9907,11 +9699,14 @@ func awsAwsjson11_deserializeOpErrorGetServiceSetting(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ServiceSettingNotFound", errorCode): - return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9923,14 +9718,14 @@ func awsAwsjson11_deserializeOpErrorGetServiceSetting(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpLabelParameterVersion struct { +type awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup struct { } -func (*awsAwsjson11_deserializeOpLabelParameterVersion) ID() string { +func (*awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpLabelParameterVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) 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) @@ -9944,9 +9739,9 @@ func (m *awsAwsjson11_deserializeOpLabelParameterVersion) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorLabelParameterVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(response, &metadata) } - output := &LabelParameterVersionOutput{} + output := &GetPatchBaselineForPatchGroupOutput{} out.Result = output var buff [1024]byte @@ -9966,7 +9761,7 @@ func (m *awsAwsjson11_deserializeOpLabelParameterVersion) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentLabelParameterVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetPatchBaselineForPatchGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9980,7 +9775,7 @@ func (m *awsAwsjson11_deserializeOpLabelParameterVersion) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorLabelParameterVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetPatchBaselineForPatchGroup(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)} @@ -10020,18 +9815,6 @@ func awsAwsjson11_deserializeOpErrorLabelParameterVersion(response *smithyhttp.R case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ParameterNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) - - case strings.EqualFold("ParameterVersionLabelLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorParameterVersionLabelLimitExceeded(response, errorBody) - - case strings.EqualFold("ParameterVersionNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) - - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10042,14 +9825,14 @@ func awsAwsjson11_deserializeOpErrorLabelParameterVersion(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpListAssociations struct { +type awsAwsjson11_deserializeOpGetResourcePolicies struct { } -func (*awsAwsjson11_deserializeOpListAssociations) ID() string { +func (*awsAwsjson11_deserializeOpGetResourcePolicies) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetResourcePolicies) 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) @@ -10063,9 +9846,9 @@ func (m *awsAwsjson11_deserializeOpListAssociations) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListAssociations(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetResourcePolicies(response, &metadata) } - output := &ListAssociationsOutput{} + output := &GetResourcePoliciesOutput{} out.Result = output var buff [1024]byte @@ -10085,7 +9868,7 @@ func (m *awsAwsjson11_deserializeOpListAssociations) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListAssociationsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetResourcePoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10099,7 +9882,7 @@ func (m *awsAwsjson11_deserializeOpListAssociations) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetResourcePolicies(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)} @@ -10139,121 +9922,11 @@ func awsAwsjson11_deserializeOpErrorListAssociations(response *smithyhttp.Respon case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListAssociationVersions struct { -} - -func (*awsAwsjson11_deserializeOpListAssociationVersions) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpListAssociationVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListAssociationVersions(response, &metadata) - } - output := &ListAssociationVersionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentListAssociationVersionsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorListAssociationVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("AssociationDoesNotExist", errorCode): - return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) - - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10265,14 +9938,14 @@ func awsAwsjson11_deserializeOpErrorListAssociationVersions(response *smithyhttp } } -type awsAwsjson11_deserializeOpListCommandInvocations struct { +type awsAwsjson11_deserializeOpGetServiceSetting struct { } -func (*awsAwsjson11_deserializeOpListCommandInvocations) ID() string { +func (*awsAwsjson11_deserializeOpGetServiceSetting) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListCommandInvocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetServiceSetting) 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) @@ -10286,9 +9959,9 @@ func (m *awsAwsjson11_deserializeOpListCommandInvocations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListCommandInvocations(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetServiceSetting(response, &metadata) } - output := &ListCommandInvocationsOutput{} + output := &GetServiceSettingOutput{} out.Result = output var buff [1024]byte @@ -10308,7 +9981,7 @@ func (m *awsAwsjson11_deserializeOpListCommandInvocations) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListCommandInvocationsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetServiceSettingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10322,7 +9995,7 @@ func (m *awsAwsjson11_deserializeOpListCommandInvocations) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListCommandInvocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetServiceSetting(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)} @@ -10362,17 +10035,8 @@ func awsAwsjson11_deserializeOpErrorListCommandInvocations(response *smithyhttp. case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidCommandId", errorCode): - return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) - - case strings.EqualFold("InvalidFilterKey", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) - - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) - - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("ServiceSettingNotFound", errorCode): + return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10384,14 +10048,14 @@ func awsAwsjson11_deserializeOpErrorListCommandInvocations(response *smithyhttp. } } -type awsAwsjson11_deserializeOpListCommands struct { +type awsAwsjson11_deserializeOpLabelParameterVersion struct { } -func (*awsAwsjson11_deserializeOpListCommands) ID() string { +func (*awsAwsjson11_deserializeOpLabelParameterVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListCommands) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpLabelParameterVersion) 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) @@ -10405,9 +10069,9 @@ func (m *awsAwsjson11_deserializeOpListCommands) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListCommands(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorLabelParameterVersion(response, &metadata) } - output := &ListCommandsOutput{} + output := &LabelParameterVersionOutput{} out.Result = output var buff [1024]byte @@ -10427,7 +10091,7 @@ func (m *awsAwsjson11_deserializeOpListCommands) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListCommandsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentLabelParameterVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10441,7 +10105,7 @@ func (m *awsAwsjson11_deserializeOpListCommands) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListCommands(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorLabelParameterVersion(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)} @@ -10481,17 +10145,17 @@ func awsAwsjson11_deserializeOpErrorListCommands(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidCommandId", errorCode): - return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) - case strings.EqualFold("InvalidFilterKey", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + case strings.EqualFold("ParameterVersionLabelLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionLabelLimitExceeded(response, errorBody) - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + case strings.EqualFold("ParameterVersionNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10503,14 +10167,14 @@ func awsAwsjson11_deserializeOpErrorListCommands(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListComplianceItems struct { +type awsAwsjson11_deserializeOpListAssociations struct { } -func (*awsAwsjson11_deserializeOpListComplianceItems) ID() string { +func (*awsAwsjson11_deserializeOpListAssociations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListComplianceItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListAssociations) 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) @@ -10524,9 +10188,9 @@ func (m *awsAwsjson11_deserializeOpListComplianceItems) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListComplianceItems(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListAssociations(response, &metadata) } - output := &ListComplianceItemsOutput{} + output := &ListAssociationsOutput{} out.Result = output var buff [1024]byte @@ -10546,7 +10210,7 @@ func (m *awsAwsjson11_deserializeOpListComplianceItems) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListComplianceItemsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10560,7 +10224,7 @@ func (m *awsAwsjson11_deserializeOpListComplianceItems) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListComplianceItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListAssociations(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)} @@ -10600,18 +10264,9 @@ func awsAwsjson11_deserializeOpErrorListComplianceItems(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidFilter", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) - - case strings.EqualFold("InvalidResourceType", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10622,14 +10277,14 @@ func awsAwsjson11_deserializeOpErrorListComplianceItems(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListComplianceSummaries struct { +type awsAwsjson11_deserializeOpListAssociationVersions struct { } -func (*awsAwsjson11_deserializeOpListComplianceSummaries) ID() string { +func (*awsAwsjson11_deserializeOpListAssociationVersions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListComplianceSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListAssociationVersions) 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) @@ -10643,9 +10298,9 @@ func (m *awsAwsjson11_deserializeOpListComplianceSummaries) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListComplianceSummaries(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListAssociationVersions(response, &metadata) } - output := &ListComplianceSummariesOutput{} + output := &ListAssociationVersionsOutput{} out.Result = output var buff [1024]byte @@ -10665,7 +10320,7 @@ func (m *awsAwsjson11_deserializeOpListComplianceSummaries) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListComplianceSummariesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListAssociationVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10679,7 +10334,7 @@ func (m *awsAwsjson11_deserializeOpListComplianceSummaries) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListComplianceSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListAssociationVersions(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)} @@ -10716,12 +10371,12 @@ func awsAwsjson11_deserializeOpErrorListComplianceSummaries(response *smithyhttp errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidFilter", errorCode): - return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) @@ -10735,14 +10390,14 @@ func awsAwsjson11_deserializeOpErrorListComplianceSummaries(response *smithyhttp } } -type awsAwsjson11_deserializeOpListDocumentMetadataHistory struct { +type awsAwsjson11_deserializeOpListCommandInvocations struct { } -func (*awsAwsjson11_deserializeOpListDocumentMetadataHistory) ID() string { +func (*awsAwsjson11_deserializeOpListCommandInvocations) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListCommandInvocations) 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) @@ -10756,9 +10411,9 @@ func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListCommandInvocations(response, &metadata) } - output := &ListDocumentMetadataHistoryOutput{} + output := &ListCommandInvocationsOutput{} out.Result = output var buff [1024]byte @@ -10778,7 +10433,7 @@ func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDocumentMetadataHistoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListCommandInvocationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10792,7 +10447,7 @@ func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListCommandInvocations(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)} @@ -10832,11 +10487,14 @@ func awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(response *smithy case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) @@ -10851,14 +10509,14 @@ func awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(response *smithy } } -type awsAwsjson11_deserializeOpListDocuments struct { +type awsAwsjson11_deserializeOpListCommands struct { } -func (*awsAwsjson11_deserializeOpListDocuments) ID() string { +func (*awsAwsjson11_deserializeOpListCommands) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDocuments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListCommands) 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) @@ -10872,9 +10530,9 @@ func (m *awsAwsjson11_deserializeOpListDocuments) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDocuments(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListCommands(response, &metadata) } - output := &ListDocumentsOutput{} + output := &ListCommandsOutput{} out.Result = output var buff [1024]byte @@ -10894,7 +10552,7 @@ func (m *awsAwsjson11_deserializeOpListDocuments) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDocumentsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListCommandsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10908,7 +10566,7 @@ func (m *awsAwsjson11_deserializeOpListDocuments) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDocuments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListCommands(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)} @@ -10948,9 +10606,15 @@ func awsAwsjson11_deserializeOpErrorListDocuments(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidCommandId", errorCode): + return awsAwsjson11_deserializeErrorInvalidCommandId(response, errorBody) + case strings.EqualFold("InvalidFilterKey", errorCode): return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) @@ -10964,14 +10628,14 @@ func awsAwsjson11_deserializeOpErrorListDocuments(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListDocumentVersions struct { +type awsAwsjson11_deserializeOpListComplianceItems struct { } -func (*awsAwsjson11_deserializeOpListDocumentVersions) ID() string { +func (*awsAwsjson11_deserializeOpListComplianceItems) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListDocumentVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListComplianceItems) 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) @@ -10985,9 +10649,9 @@ func (m *awsAwsjson11_deserializeOpListDocumentVersions) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListDocumentVersions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListComplianceItems(response, &metadata) } - output := &ListDocumentVersionsOutput{} + output := &ListComplianceItemsOutput{} out.Result = output var buff [1024]byte @@ -11007,7 +10671,7 @@ func (m *awsAwsjson11_deserializeOpListDocumentVersions) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListDocumentVersionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListComplianceItemsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11021,7 +10685,7 @@ func (m *awsAwsjson11_deserializeOpListDocumentVersions) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListDocumentVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListComplianceItems(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)} @@ -11061,12 +10725,18 @@ func awsAwsjson11_deserializeOpErrorListDocumentVersions(response *smithyhttp.Re case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11077,14 +10747,14 @@ func awsAwsjson11_deserializeOpErrorListDocumentVersions(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpListInventoryEntries struct { +type awsAwsjson11_deserializeOpListComplianceSummaries struct { } -func (*awsAwsjson11_deserializeOpListInventoryEntries) ID() string { +func (*awsAwsjson11_deserializeOpListComplianceSummaries) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListInventoryEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListComplianceSummaries) 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) @@ -11098,9 +10768,9 @@ func (m *awsAwsjson11_deserializeOpListInventoryEntries) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListInventoryEntries(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListComplianceSummaries(response, &metadata) } - output := &ListInventoryEntriesOutput{} + output := &ListComplianceSummariesOutput{} out.Result = output var buff [1024]byte @@ -11120,7 +10790,7 @@ func (m *awsAwsjson11_deserializeOpListInventoryEntries) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListComplianceSummariesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11134,7 +10804,7 @@ func (m *awsAwsjson11_deserializeOpListInventoryEntries) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListInventoryEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListComplianceSummaries(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)} @@ -11177,15 +10847,9 @@ func awsAwsjson11_deserializeOpErrorListInventoryEntries(response *smithyhttp.Re case strings.EqualFold("InvalidFilter", errorCode): return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - case strings.EqualFold("InvalidTypeNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11196,14 +10860,14 @@ func awsAwsjson11_deserializeOpErrorListInventoryEntries(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpListOpsItemEvents struct { +type awsAwsjson11_deserializeOpListDocumentMetadataHistory struct { } -func (*awsAwsjson11_deserializeOpListOpsItemEvents) ID() string { +func (*awsAwsjson11_deserializeOpListDocumentMetadataHistory) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) 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) @@ -11217,9 +10881,9 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemEvents(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(response, &metadata) } - output := &ListOpsItemEventsOutput{} + output := &ListDocumentMetadataHistoryOutput{} out.Result = output var buff [1024]byte @@ -11239,7 +10903,7 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListOpsItemEventsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDocumentMetadataHistoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11253,7 +10917,7 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDocumentMetadataHistory(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)} @@ -11293,14 +10957,14 @@ func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Respo case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsItemInvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - case strings.EqualFold("OpsItemLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) - case strings.EqualFold("OpsItemNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11312,14 +10976,14 @@ func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpListOpsItemRelatedItems struct { +type awsAwsjson11_deserializeOpListDocuments struct { } -func (*awsAwsjson11_deserializeOpListOpsItemRelatedItems) ID() string { +func (*awsAwsjson11_deserializeOpListDocuments) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDocuments) 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) @@ -11333,9 +10997,9 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDocuments(response, &metadata) } - output := &ListOpsItemRelatedItemsOutput{} + output := &ListDocumentsOutput{} out.Result = output var buff [1024]byte @@ -11355,7 +11019,7 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDocumentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11369,7 +11033,7 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDocuments(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)} @@ -11409,8 +11073,11 @@ func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response *smithyhttp case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsItemInvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidFilterKey", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilterKey(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11422,14 +11089,14 @@ func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response *smithyhttp } } -type awsAwsjson11_deserializeOpListOpsMetadata struct { +type awsAwsjson11_deserializeOpListDocumentVersions struct { } -func (*awsAwsjson11_deserializeOpListOpsMetadata) ID() string { +func (*awsAwsjson11_deserializeOpListDocumentVersions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListDocumentVersions) 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) @@ -11443,9 +11110,9 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListOpsMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListDocumentVersions(response, &metadata) } - output := &ListOpsMetadataOutput{} + output := &ListDocumentVersionsOutput{} out.Result = output var buff [1024]byte @@ -11465,7 +11132,7 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListOpsMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListDocumentVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11479,7 +11146,7 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListDocumentVersions(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)} @@ -11519,8 +11186,11 @@ func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Respons case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): - return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11532,14 +11202,14 @@ func awsAwsjson11_deserializeOpErrorListOpsMetadata(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpListResourceComplianceSummaries struct { +type awsAwsjson11_deserializeOpListInventoryEntries struct { } -func (*awsAwsjson11_deserializeOpListResourceComplianceSummaries) ID() string { +func (*awsAwsjson11_deserializeOpListInventoryEntries) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListInventoryEntries) 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) @@ -11553,9 +11223,9 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListInventoryEntries(response, &metadata) } - output := &ListResourceComplianceSummariesOutput{} + output := &ListInventoryEntriesOutput{} out.Result = output var buff [1024]byte @@ -11575,7 +11245,7 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourceComplianceSummariesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListInventoryEntriesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11589,7 +11259,7 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListInventoryEntries(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)} @@ -11632,9 +11302,15 @@ func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *sm case strings.EqualFold("InvalidFilter", errorCode): return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11645,14 +11321,14 @@ func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response *sm } } -type awsAwsjson11_deserializeOpListResourceDataSync struct { +type awsAwsjson11_deserializeOpListOpsItemEvents struct { } -func (*awsAwsjson11_deserializeOpListResourceDataSync) ID() string { +func (*awsAwsjson11_deserializeOpListOpsItemEvents) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11666,9 +11342,9 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListResourceDataSync(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemEvents(response, &metadata) } - output := &ListResourceDataSyncOutput{} + output := &ListOpsItemEventsOutput{} out.Result = output var buff [1024]byte @@ -11688,7 +11364,7 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListResourceDataSyncOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListOpsItemEventsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11702,7 +11378,7 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListOpsItemEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11742,11 +11418,14 @@ func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Re case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidNextToken", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) - case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11758,14 +11437,14 @@ func awsAwsjson11_deserializeOpErrorListResourceDataSync(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListOpsItemRelatedItems struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListOpsItemRelatedItems) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -11779,9 +11458,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListOpsItemRelatedItemsOutput{} out.Result = output var buff [1024]byte @@ -11801,7 +11480,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListOpsItemRelatedItemsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11815,7 +11494,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListOpsItemRelatedItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -11855,11 +11534,8 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) - - case strings.EqualFold("InvalidResourceType", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11871,14 +11547,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpModifyDocumentPermission struct { +type awsAwsjson11_deserializeOpListOpsMetadata struct { } -func (*awsAwsjson11_deserializeOpModifyDocumentPermission) ID() string { +func (*awsAwsjson11_deserializeOpListOpsMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListOpsMetadata) 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) @@ -11892,9 +11568,9 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListOpsMetadata(response, &metadata) } - output := &ModifyDocumentPermissionOutput{} + output := &ListOpsMetadataOutput{} out.Result = output var buff [1024]byte @@ -11914,7 +11590,7 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentModifyDocumentPermissionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListOpsMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11928,7 +11604,7 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListOpsMetadata(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)} @@ -11965,20 +11641,11 @@ func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response *smithyhtt errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DocumentLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorDocumentLimitExceeded(response, errorBody) - - case strings.EqualFold("DocumentPermissionLimit", errorCode): - return awsAwsjson11_deserializeErrorDocumentPermissionLimit(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - - case strings.EqualFold("InvalidPermissionType", errorCode): - return awsAwsjson11_deserializeErrorInvalidPermissionType(response, errorBody) + case strings.EqualFold("OpsMetadataInvalidArgumentException", errorCode): + return awsAwsjson11_deserializeErrorOpsMetadataInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -11990,14 +11657,14 @@ func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response *smithyhtt } } -type awsAwsjson11_deserializeOpPutComplianceItems struct { +type awsAwsjson11_deserializeOpListResourceComplianceSummaries struct { } -func (*awsAwsjson11_deserializeOpPutComplianceItems) ID() string { +func (*awsAwsjson11_deserializeOpListResourceComplianceSummaries) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) 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) @@ -12011,9 +11678,9 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutComplianceItems(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(response, &metadata) } - output := &PutComplianceItemsOutput{} + output := &ListResourceComplianceSummariesOutput{} out.Result = output var buff [1024]byte @@ -12033,7 +11700,7 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutComplianceItemsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListResourceComplianceSummariesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12047,7 +11714,7 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListResourceComplianceSummaries(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)} @@ -12084,26 +11751,14 @@ func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Resp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ComplianceTypeCountLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorComplianceTypeCountLimitExceededException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidItemContentException", errorCode): - return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) - - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) - - case strings.EqualFold("InvalidResourceType", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) - - case strings.EqualFold("ItemSizeLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidFilter", errorCode): + return awsAwsjson11_deserializeErrorInvalidFilter(response, errorBody) - case strings.EqualFold("TotalSizeLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12115,14 +11770,14 @@ func awsAwsjson11_deserializeOpErrorPutComplianceItems(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpPutInventory struct { +type awsAwsjson11_deserializeOpListResourceDataSync struct { } -func (*awsAwsjson11_deserializeOpPutInventory) ID() string { +func (*awsAwsjson11_deserializeOpListResourceDataSync) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListResourceDataSync) 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) @@ -12136,9 +11791,9 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutInventory(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListResourceDataSync(response, &metadata) } - output := &PutInventoryOutput{} + output := &ListResourceDataSyncOutput{} out.Result = output var buff [1024]byte @@ -12158,7 +11813,7 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutInventoryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListResourceDataSyncOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12172,7 +11827,7 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutInventory(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListResourceDataSync(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)} @@ -12209,41 +11864,14 @@ func awsAwsjson11_deserializeOpErrorPutInventory(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("CustomSchemaCountLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorCustomSchemaCountLimitExceededException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) - - case strings.EqualFold("InvalidInventoryItemContextException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInventoryItemContextException(response, errorBody) - - case strings.EqualFold("InvalidItemContentException", errorCode): - return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) - - case strings.EqualFold("InvalidTypeNameException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) - - case strings.EqualFold("ItemContentMismatchException", errorCode): - return awsAwsjson11_deserializeErrorItemContentMismatchException(response, errorBody) - - case strings.EqualFold("ItemSizeLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) - - case strings.EqualFold("SubTypeCountLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorSubTypeCountLimitExceededException(response, errorBody) - - case strings.EqualFold("TotalSizeLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) - - case strings.EqualFold("UnsupportedInventoryItemContextException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedInventoryItemContextException(response, errorBody) + case strings.EqualFold("InvalidNextToken", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextToken(response, errorBody) - case strings.EqualFold("UnsupportedInventorySchemaVersionException", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedInventorySchemaVersionException(response, errorBody) + case strings.EqualFold("ResourceDataSyncInvalidConfigurationException", errorCode): + return awsAwsjson11_deserializeErrorResourceDataSyncInvalidConfigurationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12255,14 +11883,14 @@ func awsAwsjson11_deserializeOpErrorPutInventory(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpPutParameter struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpPutParameter) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutParameter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -12276,9 +11904,9 @@ func (m *awsAwsjson11_deserializeOpPutParameter) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutParameter(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PutParameterOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -12298,7 +11926,7 @@ func (m *awsAwsjson11_deserializeOpPutParameter) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutParameterOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12312,7 +11940,7 @@ func (m *awsAwsjson11_deserializeOpPutParameter) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutParameter(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -12349,50 +11977,14 @@ func awsAwsjson11_deserializeOpErrorPutParameter(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("HierarchyLevelLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorHierarchyLevelLimitExceededException(response, errorBody) - - case strings.EqualFold("HierarchyTypeMismatchException", errorCode): - return awsAwsjson11_deserializeErrorHierarchyTypeMismatchException(response, errorBody) - - case strings.EqualFold("IncompatiblePolicyException", errorCode): - return awsAwsjson11_deserializeErrorIncompatiblePolicyException(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAllowedPatternException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAllowedPatternException(response, errorBody) - - case strings.EqualFold("InvalidKeyId", errorCode): - return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) - - case strings.EqualFold("InvalidPolicyAttributeException", errorCode): - return awsAwsjson11_deserializeErrorInvalidPolicyAttributeException(response, errorBody) - - case strings.EqualFold("InvalidPolicyTypeException", errorCode): - return awsAwsjson11_deserializeErrorInvalidPolicyTypeException(response, errorBody) - - case strings.EqualFold("ParameterAlreadyExists", errorCode): - return awsAwsjson11_deserializeErrorParameterAlreadyExists(response, errorBody) - - case strings.EqualFold("ParameterLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorParameterLimitExceeded(response, errorBody) - - case strings.EqualFold("ParameterMaxVersionLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorParameterMaxVersionLimitExceeded(response, errorBody) - - case strings.EqualFold("ParameterPatternMismatchException", errorCode): - return awsAwsjson11_deserializeErrorParameterPatternMismatchException(response, errorBody) - - case strings.EqualFold("PoliciesLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorPoliciesLimitExceededException(response, errorBody) - - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) - case strings.EqualFold("UnsupportedParameterType", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedParameterType(response, errorBody) + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12404,14 +11996,14 @@ func awsAwsjson11_deserializeOpErrorPutParameter(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpPutResourcePolicy struct { +type awsAwsjson11_deserializeOpModifyDocumentPermission struct { } -func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { +func (*awsAwsjson11_deserializeOpModifyDocumentPermission) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) 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) @@ -12425,9 +12017,9 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorModifyDocumentPermission(response, &metadata) } - output := &PutResourcePolicyOutput{} + output := &ModifyDocumentPermissionOutput{} out.Result = output var buff [1024]byte @@ -12447,7 +12039,7 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentModifyDocumentPermissionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12461,7 +12053,7 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorModifyDocumentPermission(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)} @@ -12498,26 +12090,20 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - - case strings.EqualFold("MalformedResourcePolicyDocumentException", errorCode): - return awsAwsjson11_deserializeErrorMalformedResourcePolicyDocumentException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("DocumentLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorDocumentLimitExceeded(response, errorBody) - case strings.EqualFold("ResourcePolicyConflictException", errorCode): - return awsAwsjson11_deserializeErrorResourcePolicyConflictException(response, errorBody) + case strings.EqualFold("DocumentPermissionLimit", errorCode): + return awsAwsjson11_deserializeErrorDocumentPermissionLimit(response, errorBody) - case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ResourcePolicyLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourcePolicyLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - case strings.EqualFold("ResourcePolicyNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response, errorBody) + case strings.EqualFold("InvalidPermissionType", errorCode): + return awsAwsjson11_deserializeErrorInvalidPermissionType(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12529,14 +12115,14 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline struct { +type awsAwsjson11_deserializeOpPutComplianceItems struct { } -func (*awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) ID() string { +func (*awsAwsjson11_deserializeOpPutComplianceItems) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutComplianceItems) 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) @@ -12550,9 +12136,9 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutComplianceItems(response, &metadata) } - output := &RegisterDefaultPatchBaselineOutput{} + output := &PutComplianceItemsOutput{} out.Result = output var buff [1024]byte @@ -12572,7 +12158,7 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterDefaultPatchBaselineOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutComplianceItemsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12586,7 +12172,7 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutComplianceItems(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)} @@ -12623,15 +12209,27 @@ func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response *smith errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("ComplianceTypeCountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorComplianceTypeCountLimitExceededException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidItemContentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + case strings.EqualFold("ItemSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) + + case strings.EqualFold("TotalSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12642,14 +12240,14 @@ func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response *smith } } -type awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup struct { +type awsAwsjson11_deserializeOpPutInventory struct { } -func (*awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) ID() string { +func (*awsAwsjson11_deserializeOpPutInventory) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutInventory) 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) @@ -12663,9 +12261,9 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutInventory(response, &metadata) } - output := &RegisterPatchBaselineForPatchGroupOutput{} + output := &PutInventoryOutput{} out.Result = output var buff [1024]byte @@ -12685,7 +12283,7 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterPatchBaselineForPatchGroupOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutInventoryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12699,7 +12297,7 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutInventory(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)} @@ -12736,20 +12334,41 @@ func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("CustomSchemaCountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorCustomSchemaCountLimitExceededException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidInventoryItemContextException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInventoryItemContextException(response, errorBody) + + case strings.EqualFold("InvalidItemContentException", errorCode): + return awsAwsjson11_deserializeErrorInvalidItemContentException(response, errorBody) + + case strings.EqualFold("InvalidTypeNameException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTypeNameException(response, errorBody) + + case strings.EqualFold("ItemContentMismatchException", errorCode): + return awsAwsjson11_deserializeErrorItemContentMismatchException(response, errorBody) + + case strings.EqualFold("ItemSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorItemSizeLimitExceededException(response, errorBody) + + case strings.EqualFold("SubTypeCountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorSubTypeCountLimitExceededException(response, errorBody) + + case strings.EqualFold("TotalSizeLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorTotalSizeLimitExceededException(response, errorBody) + + case strings.EqualFold("UnsupportedInventoryItemContextException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedInventoryItemContextException(response, errorBody) + + case strings.EqualFold("UnsupportedInventorySchemaVersionException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedInventorySchemaVersionException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12761,14 +12380,14 @@ func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response } } -type awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow struct { +type awsAwsjson11_deserializeOpPutParameter struct { } -func (*awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) ID() string { +func (*awsAwsjson11_deserializeOpPutParameter) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutParameter) 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) @@ -12782,9 +12401,9 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutParameter(response, &metadata) } - output := &RegisterTargetWithMaintenanceWindowOutput{} + output := &PutParameterOutput{} out.Result = output var buff [1024]byte @@ -12804,7 +12423,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterTargetWithMaintenanceWindowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutParameterOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12818,7 +12437,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutParameter(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)} @@ -12855,17 +12474,50 @@ func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("HierarchyLevelLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorHierarchyLevelLimitExceededException(response, errorBody) - case strings.EqualFold("IdempotentParameterMismatch", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + case strings.EqualFold("HierarchyTypeMismatchException", errorCode): + return awsAwsjson11_deserializeErrorHierarchyTypeMismatchException(response, errorBody) + + case strings.EqualFold("IncompatiblePolicyException", errorCode): + return awsAwsjson11_deserializeErrorIncompatiblePolicyException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidAllowedPatternException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAllowedPatternException(response, errorBody) + + case strings.EqualFold("InvalidKeyId", errorCode): + return awsAwsjson11_deserializeErrorInvalidKeyId(response, errorBody) + + case strings.EqualFold("InvalidPolicyAttributeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidPolicyAttributeException(response, errorBody) + + case strings.EqualFold("InvalidPolicyTypeException", errorCode): + return awsAwsjson11_deserializeErrorInvalidPolicyTypeException(response, errorBody) + + case strings.EqualFold("ParameterAlreadyExists", errorCode): + return awsAwsjson11_deserializeErrorParameterAlreadyExists(response, errorBody) + + case strings.EqualFold("ParameterLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorParameterLimitExceeded(response, errorBody) + + case strings.EqualFold("ParameterMaxVersionLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorParameterMaxVersionLimitExceeded(response, errorBody) + + case strings.EqualFold("ParameterPatternMismatchException", errorCode): + return awsAwsjson11_deserializeErrorParameterPatternMismatchException(response, errorBody) + + case strings.EqualFold("PoliciesLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorPoliciesLimitExceededException(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + + case strings.EqualFold("UnsupportedParameterType", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedParameterType(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -12877,14 +12529,14 @@ func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response } } -type awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow struct { +type awsAwsjson11_deserializeOpPutResourcePolicy struct { } -func (*awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) ID() string { +func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutResourcePolicy) 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) @@ -12898,9 +12550,9 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) } - output := &RegisterTaskWithMaintenanceWindowOutput{} + output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -12920,7 +12572,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterTaskWithMaintenanceWindowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12934,7 +12586,7 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutResourcePolicy(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)} @@ -12971,136 +12623,26 @@ func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response * errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - - case strings.EqualFold("FeatureNotAvailableException", errorCode): - return awsAwsjson11_deserializeErrorFeatureNotAvailableException(response, errorBody) - - case strings.EqualFold("IdempotentParameterMismatch", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpRemoveTagsFromResource struct { -} - -func (*awsAwsjson11_deserializeOpRemoveTagsFromResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response, &metadata) - } - output := &RemoveTagsFromResourceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentRemoveTagsFromResourceOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("MalformedResourcePolicyDocumentException", errorCode): + return awsAwsjson11_deserializeErrorMalformedResourcePolicyDocumentException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("ResourcePolicyConflictException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyConflictException(response, errorBody) - case strings.EqualFold("InvalidResourceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + case strings.EqualFold("ResourcePolicyInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyInvalidParameterException(response, errorBody) - case strings.EqualFold("InvalidResourceType", errorCode): - return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + case strings.EqualFold("ResourcePolicyLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyLimitExceededException(response, errorBody) - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + case strings.EqualFold("ResourcePolicyNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13112,14 +12654,14 @@ func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response *smithyhttp. } } -type awsAwsjson11_deserializeOpResetServiceSetting struct { +type awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline struct { } -func (*awsAwsjson11_deserializeOpResetServiceSetting) ID() string { +func (*awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) 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) @@ -13133,9 +12675,9 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorResetServiceSetting(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(response, &metadata) } - output := &ResetServiceSettingOutput{} + output := &RegisterDefaultPatchBaselineOutput{} out.Result = output var buff [1024]byte @@ -13155,7 +12697,7 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentResetServiceSettingOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterDefaultPatchBaselineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13169,7 +12711,7 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorResetServiceSetting(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterDefaultPatchBaseline(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)} @@ -13206,14 +12748,14 @@ func awsAwsjson11_deserializeOpErrorResetServiceSetting(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("ServiceSettingNotFound", errorCode): - return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) - - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13225,14 +12767,14 @@ func awsAwsjson11_deserializeOpErrorResetServiceSetting(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpResumeSession struct { +type awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup struct { } -func (*awsAwsjson11_deserializeOpResumeSession) ID() string { +func (*awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) 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) @@ -13246,9 +12788,9 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorResumeSession(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(response, &metadata) } - output := &ResumeSessionOutput{} + output := &RegisterPatchBaselineForPatchGroupOutput{} out.Result = output var buff [1024]byte @@ -13268,7 +12810,7 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentResumeSessionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterPatchBaselineForPatchGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13282,7 +12824,7 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorResumeSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterPatchBaselineForPatchGroup(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)} @@ -13319,12 +12861,21 @@ func awsAwsjson11_deserializeOpErrorResumeSession(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + case strings.EqualFold("DoesNotExistException", errorCode): return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13335,14 +12886,14 @@ func awsAwsjson11_deserializeOpErrorResumeSession(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpSendAutomationSignal struct { +type awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow struct { } -func (*awsAwsjson11_deserializeOpSendAutomationSignal) ID() string { +func (*awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) 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) @@ -13356,9 +12907,9 @@ func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSendAutomationSignal(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(response, &metadata) } - output := &SendAutomationSignalOutput{} + output := &RegisterTargetWithMaintenanceWindowOutput{} out.Result = output var buff [1024]byte @@ -13378,7 +12929,7 @@ func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSendAutomationSignalOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterTargetWithMaintenanceWindowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13392,7 +12943,7 @@ func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSendAutomationSignal(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterTargetWithMaintenanceWindow(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)} @@ -13429,17 +12980,17 @@ func awsAwsjson11_deserializeOpErrorSendAutomationSignal(response *smithyhttp.Re errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("AutomationStepNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationStepNotFoundException(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAutomationSignalException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAutomationSignalException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13451,14 +13002,14 @@ func awsAwsjson11_deserializeOpErrorSendAutomationSignal(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpSendCommand struct { +type awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow struct { } -func (*awsAwsjson11_deserializeOpSendCommand) ID() string { +func (*awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) 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) @@ -13472,9 +13023,9 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSendCommand(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(response, &metadata) } - output := &SendCommandOutput{} + output := &RegisterTaskWithMaintenanceWindowOutput{} out.Result = output var buff [1024]byte @@ -13494,7 +13045,7 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSendCommandOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterTaskWithMaintenanceWindowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13508,7 +13059,7 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterTaskWithMaintenanceWindow(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)} @@ -13545,38 +13096,20 @@ func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DuplicateInstanceId", errorCode): - return awsAwsjson11_deserializeErrorDuplicateInstanceId(response, errorBody) - - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) - - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) - - case strings.EqualFold("InvalidNotificationConfig", errorCode): - return awsAwsjson11_deserializeErrorInvalidNotificationConfig(response, errorBody) - - case strings.EqualFold("InvalidOutputFolder", errorCode): - return awsAwsjson11_deserializeErrorInvalidOutputFolder(response, errorBody) + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) - case strings.EqualFold("InvalidParameters", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) + case strings.EqualFold("FeatureNotAvailableException", errorCode): + return awsAwsjson11_deserializeErrorFeatureNotAvailableException(response, errorBody) - case strings.EqualFold("InvalidRole", errorCode): - return awsAwsjson11_deserializeErrorInvalidRole(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) - case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): - return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("UnsupportedPlatformType", errorCode): - return awsAwsjson11_deserializeErrorUnsupportedPlatformType(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13588,14 +13121,14 @@ func awsAwsjson11_deserializeOpErrorSendCommand(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpStartAssociationsOnce struct { +type awsAwsjson11_deserializeOpRemoveTagsFromResource struct { } -func (*awsAwsjson11_deserializeOpStartAssociationsOnce) ID() string { +func (*awsAwsjson11_deserializeOpRemoveTagsFromResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) 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) @@ -13609,9 +13142,9 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(response, &metadata) } - output := &StartAssociationsOnceOutput{} + output := &RemoveTagsFromResourceOutput{} out.Result = output var buff [1024]byte @@ -13631,7 +13164,7 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartAssociationsOnceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRemoveTagsFromResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13645,7 +13178,7 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRemoveTagsFromResource(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)} @@ -13682,11 +13215,17 @@ func awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response *smithyhttp.R errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AssociationDoesNotExist", errorCode): - return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAssociation", errorCode): - return awsAwsjson11_deserializeErrorInvalidAssociation(response, errorBody) + case strings.EqualFold("InvalidResourceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceId(response, errorBody) + + case strings.EqualFold("InvalidResourceType", errorCode): + return awsAwsjson11_deserializeErrorInvalidResourceType(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13698,14 +13237,14 @@ func awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpStartAutomationExecution struct { +type awsAwsjson11_deserializeOpResetServiceSetting struct { } -func (*awsAwsjson11_deserializeOpStartAutomationExecution) ID() string { +func (*awsAwsjson11_deserializeOpResetServiceSetting) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpResetServiceSetting) 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) @@ -13719,9 +13258,9 @@ func (m *awsAwsjson11_deserializeOpStartAutomationExecution) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartAutomationExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorResetServiceSetting(response, &metadata) } - output := &StartAutomationExecutionOutput{} + output := &ResetServiceSettingOutput{} out.Result = output var buff [1024]byte @@ -13741,7 +13280,7 @@ func (m *awsAwsjson11_deserializeOpStartAutomationExecution) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartAutomationExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentResetServiceSettingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13755,7 +13294,7 @@ func (m *awsAwsjson11_deserializeOpStartAutomationExecution) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorResetServiceSetting(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)} @@ -13792,26 +13331,14 @@ func awsAwsjson11_deserializeOpErrorStartAutomationExecution(response *smithyhtt errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AutomationDefinitionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationDefinitionNotFoundException(response, errorBody) - - case strings.EqualFold("AutomationDefinitionVersionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationDefinitionVersionNotFoundException(response, errorBody) - - case strings.EqualFold("AutomationExecutionLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorAutomationExecutionLimitExceededException(response, errorBody) - - case strings.EqualFold("IdempotentParameterMismatch", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAutomationExecutionParametersException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAutomationExecutionParametersException(response, errorBody) + case strings.EqualFold("ServiceSettingNotFound", errorCode): + return awsAwsjson11_deserializeErrorServiceSettingNotFound(response, errorBody) - case strings.EqualFold("InvalidTarget", errorCode): - return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -13823,14 +13350,14 @@ func awsAwsjson11_deserializeOpErrorStartAutomationExecution(response *smithyhtt } } -type awsAwsjson11_deserializeOpStartChangeRequestExecution struct { +type awsAwsjson11_deserializeOpResumeSession struct { } -func (*awsAwsjson11_deserializeOpStartChangeRequestExecution) ID() string { +func (*awsAwsjson11_deserializeOpResumeSession) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpResumeSession) 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) @@ -13844,9 +13371,9 @@ func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorResumeSession(response, &metadata) } - output := &StartChangeRequestExecutionOutput{} + output := &ResumeSessionOutput{} out.Result = output var buff [1024]byte @@ -13866,7 +13393,7 @@ func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartChangeRequestExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentResumeSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13880,7 +13407,7 @@ func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorResumeSession(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)} @@ -13917,27 +13444,12 @@ func awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response *smithy errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AutomationDefinitionNotApprovedException", errorCode): - return awsAwsjson11_deserializeErrorAutomationDefinitionNotApprovedException(response, errorBody) - - case strings.EqualFold("AutomationDefinitionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationDefinitionNotFoundException(response, errorBody) - - case strings.EqualFold("AutomationDefinitionVersionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationDefinitionVersionNotFoundException(response, errorBody) - - case strings.EqualFold("AutomationExecutionLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorAutomationExecutionLimitExceededException(response, errorBody) - - case strings.EqualFold("IdempotentParameterMismatch", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAutomationExecutionParametersException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAutomationExecutionParametersException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13948,14 +13460,14 @@ func awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response *smithy } } -type awsAwsjson11_deserializeOpStartSession struct { +type awsAwsjson11_deserializeOpSendAutomationSignal struct { } -func (*awsAwsjson11_deserializeOpStartSession) ID() string { +func (*awsAwsjson11_deserializeOpSendAutomationSignal) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSendAutomationSignal) 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) @@ -13969,9 +13481,9 @@ func (m *awsAwsjson11_deserializeOpStartSession) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartSession(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSendAutomationSignal(response, &metadata) } - output := &StartSessionOutput{} + output := &SendAutomationSignalOutput{} out.Result = output var buff [1024]byte @@ -13991,7 +13503,7 @@ func (m *awsAwsjson11_deserializeOpStartSession) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartSessionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSendAutomationSignalOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14005,7 +13517,7 @@ func (m *awsAwsjson11_deserializeOpStartSession) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSendAutomationSignal(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)} @@ -14042,14 +13554,17 @@ func awsAwsjson11_deserializeOpErrorStartSession(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationStepNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationStepNotFoundException(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - - case strings.EqualFold("TargetNotConnected", errorCode): - return awsAwsjson11_deserializeErrorTargetNotConnected(response, errorBody) + case strings.EqualFold("InvalidAutomationSignalException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationSignalException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -14061,14 +13576,14 @@ func awsAwsjson11_deserializeOpErrorStartSession(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpStopAutomationExecution struct { +type awsAwsjson11_deserializeOpSendCommand struct { } -func (*awsAwsjson11_deserializeOpStopAutomationExecution) ID() string { +func (*awsAwsjson11_deserializeOpSendCommand) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopAutomationExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSendCommand) 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) @@ -14082,9 +13597,9 @@ func (m *awsAwsjson11_deserializeOpStopAutomationExecution) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopAutomationExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSendCommand(response, &metadata) } - output := &StopAutomationExecutionOutput{} + output := &SendCommandOutput{} out.Result = output var buff [1024]byte @@ -14104,7 +13619,7 @@ func (m *awsAwsjson11_deserializeOpStopAutomationExecution) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopAutomationExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSendCommandOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14118,7 +13633,7 @@ func (m *awsAwsjson11_deserializeOpStopAutomationExecution) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopAutomationExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSendCommand(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)} @@ -14155,121 +13670,38 @@ func awsAwsjson11_deserializeOpErrorStopAutomationExecution(response *smithyhttp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) + case strings.EqualFold("DuplicateInstanceId", errorCode): + return awsAwsjson11_deserializeErrorDuplicateInstanceId(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAutomationStatusUpdateException", errorCode): - return awsAwsjson11_deserializeErrorInvalidAutomationStatusUpdateException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpTerminateSession struct { -} - -func (*awsAwsjson11_deserializeOpTerminateSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpTerminateSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTerminateSession(response, &metadata) - } - output := &TerminateSessionOutput{} - 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 - } + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - err = awsAwsjson11_deserializeOpDocumentTerminateSessionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) - return out, metadata, err -} + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) -func awsAwsjson11_deserializeOpErrorTerminateSession(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()) + case strings.EqualFold("InvalidNotificationConfig", errorCode): + return awsAwsjson11_deserializeErrorInvalidNotificationConfig(response, errorBody) - errorCode := "UnknownError" - errorMessage := errorCode + case strings.EqualFold("InvalidOutputFolder", errorCode): + return awsAwsjson11_deserializeErrorInvalidOutputFolder(response, errorBody) - headerCode := response.Header.Get("X-Amzn-ErrorType") + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("InvalidRole", errorCode): + return awsAwsjson11_deserializeErrorInvalidRole(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): + return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("UnsupportedPlatformType", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedPlatformType(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -14281,14 +13713,14 @@ func awsAwsjson11_deserializeOpErrorTerminateSession(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpUnlabelParameterVersion struct { +type awsAwsjson11_deserializeOpStartAssociationsOnce struct { } -func (*awsAwsjson11_deserializeOpUnlabelParameterVersion) ID() string { +func (*awsAwsjson11_deserializeOpStartAssociationsOnce) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) 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) @@ -14302,9 +13734,9 @@ func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartAssociationsOnce(response, &metadata) } - output := &UnlabelParameterVersionOutput{} + output := &StartAssociationsOnceOutput{} out.Result = output var buff [1024]byte @@ -14324,7 +13756,7 @@ func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUnlabelParameterVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartAssociationsOnceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14338,7 +13770,7 @@ func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartAssociationsOnce(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)} @@ -14375,17 +13807,11 @@ func awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(response *smithyhttp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - - case strings.EqualFold("ParameterNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) - - case strings.EqualFold("ParameterVersionNotFound", errorCode): - return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + case strings.EqualFold("InvalidAssociation", errorCode): + return awsAwsjson11_deserializeErrorInvalidAssociation(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -14397,14 +13823,14 @@ func awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(response *smithyhttp } } -type awsAwsjson11_deserializeOpUpdateAssociation struct { +type awsAwsjson11_deserializeOpStartAutomationExecution struct { } -func (*awsAwsjson11_deserializeOpUpdateAssociation) ID() string { +func (*awsAwsjson11_deserializeOpStartAutomationExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartAutomationExecution) 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) @@ -14418,9 +13844,9 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociation) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAssociation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartAutomationExecution(response, &metadata) } - output := &UpdateAssociationOutput{} + output := &StartAutomationExecutionOutput{} out.Result = output var buff [1024]byte @@ -14440,7 +13866,7 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociation) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateAssociationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartAutomationExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14454,7 +13880,7 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociation) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartAutomationExecution(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)} @@ -14491,44 +13917,151 @@ func awsAwsjson11_deserializeOpErrorUpdateAssociation(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AssociationDoesNotExist", errorCode): - return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + case strings.EqualFold("AutomationDefinitionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionNotFoundException(response, errorBody) - case strings.EqualFold("AssociationVersionLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorAssociationVersionLimitExceeded(response, errorBody) + case strings.EqualFold("AutomationDefinitionVersionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionVersionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationExecutionLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionLimitExceededException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidAssociationVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidAssociationVersion(response, errorBody) + case strings.EqualFold("InvalidAutomationExecutionParametersException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationExecutionParametersException(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("InvalidTarget", errorCode): + return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case strings.EqualFold("InvalidOutputLocation", errorCode): - return awsAwsjson11_deserializeErrorInvalidOutputLocation(response, errorBody) + } +} - case strings.EqualFold("InvalidParameters", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) +type awsAwsjson11_deserializeOpStartChangeRequestExecution struct { +} - case strings.EqualFold("InvalidSchedule", errorCode): - return awsAwsjson11_deserializeErrorInvalidSchedule(response, errorBody) +func (*awsAwsjson11_deserializeOpStartChangeRequestExecution) ID() string { + return "OperationDeserializer" +} - case strings.EqualFold("InvalidTarget", errorCode): - return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) +func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) 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 + } - case strings.EqualFold("InvalidTargetMaps", errorCode): - return awsAwsjson11_deserializeErrorInvalidTargetMaps(response, errorBody) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - case strings.EqualFold("InvalidUpdate", errorCode): - return awsAwsjson11_deserializeErrorInvalidUpdate(response, errorBody) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response, &metadata) + } + output := &StartChangeRequestExecutionOutput{} + out.Result = output - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartChangeRequestExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartChangeRequestExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AutomationDefinitionNotApprovedException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionNotApprovedException(response, errorBody) + + case strings.EqualFold("AutomationDefinitionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationDefinitionVersionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationDefinitionVersionNotFoundException(response, errorBody) + + case strings.EqualFold("AutomationExecutionLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionLimitExceededException(response, errorBody) + + case strings.EqualFold("IdempotentParameterMismatch", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatch(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidAutomationExecutionParametersException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationExecutionParametersException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -14540,14 +14073,14 @@ func awsAwsjson11_deserializeOpErrorUpdateAssociation(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpUpdateAssociationStatus struct { +type awsAwsjson11_deserializeOpStartSession struct { } -func (*awsAwsjson11_deserializeOpUpdateAssociationStatus) ID() string { +func (*awsAwsjson11_deserializeOpStartSession) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartSession) 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) @@ -14561,9 +14094,9 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartSession(response, &metadata) } - output := &UpdateAssociationStatusOutput{} + output := &StartSessionOutput{} out.Result = output var buff [1024]byte @@ -14583,7 +14116,7 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateAssociationStatusOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14597,7 +14130,7 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartSession(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)} @@ -14634,23 +14167,14 @@ func awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(response *smithyhttp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AssociationDoesNotExist", errorCode): - return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidDocument", errorCode): return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) - - case strings.EqualFold("StatusUnchanged", errorCode): - return awsAwsjson11_deserializeErrorStatusUnchanged(response, errorBody) - - case strings.EqualFold("TooManyUpdates", errorCode): - return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + case strings.EqualFold("TargetNotConnected", errorCode): + return awsAwsjson11_deserializeErrorTargetNotConnected(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -14662,14 +14186,14 @@ func awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(response *smithyhttp } } -type awsAwsjson11_deserializeOpUpdateDocument struct { +type awsAwsjson11_deserializeOpStopAutomationExecution struct { } -func (*awsAwsjson11_deserializeOpUpdateDocument) ID() string { +func (*awsAwsjson11_deserializeOpStopAutomationExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDocument) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopAutomationExecution) 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) @@ -14683,9 +14207,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDocument) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocument(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopAutomationExecution(response, &metadata) } - output := &UpdateDocumentOutput{} + output := &StopAutomationExecutionOutput{} out.Result = output var buff [1024]byte @@ -14705,7 +14229,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDocument) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDocumentOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopAutomationExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14719,7 +14243,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDocument) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDocument(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopAutomationExecution(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)} @@ -14756,35 +14280,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDocument(response *smithyhttp.Response errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DocumentVersionLimitExceeded", errorCode): - return awsAwsjson11_deserializeErrorDocumentVersionLimitExceeded(response, errorBody) - - case strings.EqualFold("DuplicateDocumentContent", errorCode): - return awsAwsjson11_deserializeErrorDuplicateDocumentContent(response, errorBody) - - case strings.EqualFold("DuplicateDocumentVersionName", errorCode): - return awsAwsjson11_deserializeErrorDuplicateDocumentVersionName(response, errorBody) + case strings.EqualFold("AutomationExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorAutomationExecutionNotFoundException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - - case strings.EqualFold("InvalidDocumentContent", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentContent(response, errorBody) - - case strings.EqualFold("InvalidDocumentOperation", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) - - case strings.EqualFold("InvalidDocumentSchemaVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response, errorBody) - - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) - - case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): - return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) + case strings.EqualFold("InvalidAutomationStatusUpdateException", errorCode): + return awsAwsjson11_deserializeErrorInvalidAutomationStatusUpdateException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -14796,14 +14299,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDocument(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion struct { +type awsAwsjson11_deserializeOpTerminateSession struct { } -func (*awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) ID() string { +func (*awsAwsjson11_deserializeOpTerminateSession) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpTerminateSession) 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) @@ -14817,9 +14320,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorTerminateSession(response, &metadata) } - output := &UpdateDocumentDefaultVersionOutput{} + output := &TerminateSessionOutput{} out.Result = output var buff [1024]byte @@ -14839,7 +14342,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) HandleDeseriali return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDocumentDefaultVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentTerminateSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14853,7 +14356,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) HandleDeseriali return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorTerminateSession(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)} @@ -14893,15 +14396,6 @@ func awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(response *smith case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - - case strings.EqualFold("InvalidDocumentSchemaVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response, errorBody) - - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -14912,14 +14406,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(response *smith } } -type awsAwsjson11_deserializeOpUpdateDocumentMetadata struct { +type awsAwsjson11_deserializeOpUnlabelParameterVersion struct { } -func (*awsAwsjson11_deserializeOpUpdateDocumentMetadata) ID() string { +func (*awsAwsjson11_deserializeOpUnlabelParameterVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) 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) @@ -14933,9 +14427,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(response, &metadata) } - output := &UpdateDocumentMetadataOutput{} + output := &UnlabelParameterVersionOutput{} out.Result = output var buff [1024]byte @@ -14955,7 +14449,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDocumentMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUnlabelParameterVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14969,7 +14463,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUnlabelParameterVersion(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)} @@ -15009,14 +14503,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response *smithyhttp. case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidDocument", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + case strings.EqualFold("ParameterNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterNotFound(response, errorBody) - case strings.EqualFold("InvalidDocumentOperation", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) + case strings.EqualFold("ParameterVersionNotFound", errorCode): + return awsAwsjson11_deserializeErrorParameterVersionNotFound(response, errorBody) - case strings.EqualFold("InvalidDocumentVersion", errorCode): - return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -15028,14 +14522,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response *smithyhttp. } } -type awsAwsjson11_deserializeOpUpdateMaintenanceWindow struct { +type awsAwsjson11_deserializeOpUpdateAssociation struct { } -func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindow) ID() string { +func (*awsAwsjson11_deserializeOpUpdateAssociation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateAssociation) 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) @@ -15049,9 +14543,9 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAssociation(response, &metadata) } - output := &UpdateMaintenanceWindowOutput{} + output := &UpdateAssociationOutput{} out.Result = output var buff [1024]byte @@ -15071,7 +14565,7 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15085,7 +14579,7 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateAssociation(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)} @@ -15122,121 +14616,44 @@ func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindow(response *smithyhttp errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) + + case strings.EqualFold("AssociationVersionLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorAssociationVersionLimitExceeded(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget struct { -} - -func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTarget(response, &metadata) - } - output := &UpdateMaintenanceWindowTargetOutput{} - 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 - } + case strings.EqualFold("InvalidAssociationVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidAssociationVersion(response, errorBody) - err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTargetOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - return out, metadata, err -} + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) -func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTarget(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()) + case strings.EqualFold("InvalidOutputLocation", errorCode): + return awsAwsjson11_deserializeErrorInvalidOutputLocation(response, errorBody) - errorCode := "UnknownError" - errorMessage := errorCode + case strings.EqualFold("InvalidParameters", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameters(response, errorBody) - headerCode := response.Header.Get("X-Amzn-ErrorType") + case strings.EqualFold("InvalidSchedule", errorCode): + return awsAwsjson11_deserializeErrorInvalidSchedule(response, errorBody) - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("InvalidTarget", errorCode): + return awsAwsjson11_deserializeErrorInvalidTarget(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("InvalidTargetMaps", errorCode): + return awsAwsjson11_deserializeErrorInvalidTargetMaps(response, errorBody) - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("InvalidUpdate", errorCode): + return awsAwsjson11_deserializeErrorInvalidUpdate(response, errorBody) - case strings.EqualFold("InternalServerError", errorCode): - return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -15248,14 +14665,14 @@ func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTarget(response *smit } } -type awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask struct { +type awsAwsjson11_deserializeOpUpdateAssociationStatus struct { } -func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) ID() string { +func (*awsAwsjson11_deserializeOpUpdateAssociationStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) 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) @@ -15269,9 +14686,9 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(response, &metadata) } - output := &UpdateMaintenanceWindowTaskOutput{} + output := &UpdateAssociationStatusOutput{} out.Result = output var buff [1024]byte @@ -15291,7 +14708,7 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTaskOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateAssociationStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15305,7 +14722,7 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateAssociationStatus(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)} @@ -15342,12 +14759,24 @@ func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response *smithy errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("DoesNotExistException", errorCode): - return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + case strings.EqualFold("AssociationDoesNotExist", errorCode): + return awsAwsjson11_deserializeErrorAssociationDoesNotExist(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + case strings.EqualFold("StatusUnchanged", errorCode): + return awsAwsjson11_deserializeErrorStatusUnchanged(response, errorBody) + + case strings.EqualFold("TooManyUpdates", errorCode): + return awsAwsjson11_deserializeErrorTooManyUpdates(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -15358,14 +14787,14 @@ func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response *smithy } } -type awsAwsjson11_deserializeOpUpdateManagedInstanceRole struct { +type awsAwsjson11_deserializeOpUpdateDocument struct { } -func (*awsAwsjson11_deserializeOpUpdateManagedInstanceRole) ID() string { +func (*awsAwsjson11_deserializeOpUpdateDocument) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateDocument) 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) @@ -15379,9 +14808,9 @@ func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocument(response, &metadata) } - output := &UpdateManagedInstanceRoleOutput{} + output := &UpdateDocumentOutput{} out.Result = output var buff [1024]byte @@ -15401,7 +14830,7 @@ func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateManagedInstanceRoleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateDocumentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15415,7 +14844,7 @@ func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateDocument(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)} @@ -15452,11 +14881,35 @@ func awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response *smithyht errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("DocumentVersionLimitExceeded", errorCode): + return awsAwsjson11_deserializeErrorDocumentVersionLimitExceeded(response, errorBody) + + case strings.EqualFold("DuplicateDocumentContent", errorCode): + return awsAwsjson11_deserializeErrorDuplicateDocumentContent(response, errorBody) + + case strings.EqualFold("DuplicateDocumentVersionName", errorCode): + return awsAwsjson11_deserializeErrorDuplicateDocumentVersionName(response, errorBody) + case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("InvalidInstanceId", errorCode): - return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentContent", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentContent(response, errorBody) + + case strings.EqualFold("InvalidDocumentOperation", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) + + case strings.EqualFold("InvalidDocumentSchemaVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + case strings.EqualFold("MaxDocumentSizeExceeded", errorCode): + return awsAwsjson11_deserializeErrorMaxDocumentSizeExceeded(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -15468,14 +14921,14 @@ func awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response *smithyht } } -type awsAwsjson11_deserializeOpUpdateOpsItem struct { +type awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion struct { } -func (*awsAwsjson11_deserializeOpUpdateOpsItem) ID() string { +func (*awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) 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) @@ -15489,9 +14942,9 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOpsItem(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(response, &metadata) } - output := &UpdateOpsItemOutput{} + output := &UpdateDocumentDefaultVersionOutput{} out.Result = output var buff [1024]byte @@ -15511,7 +14964,7 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateOpsItemOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateDocumentDefaultVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15525,7 +14978,7 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateDocumentDefaultVersion(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)} @@ -15565,23 +15018,14 @@ func awsAwsjson11_deserializeOpErrorUpdateOpsItem(response *smithyhttp.Response, case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) - case strings.EqualFold("OpsItemAccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) - - case strings.EqualFold("OpsItemAlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemAlreadyExistsException(response, errorBody) - - case strings.EqualFold("OpsItemConflictException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemConflictException(response, errorBody) - - case strings.EqualFold("OpsItemInvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) - case strings.EqualFold("OpsItemLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidDocumentSchemaVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentSchemaVersion(response, errorBody) - case strings.EqualFold("OpsItemNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -15593,14 +15037,14 @@ func awsAwsjson11_deserializeOpErrorUpdateOpsItem(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateOpsMetadata struct { +type awsAwsjson11_deserializeOpUpdateDocumentMetadata struct { } -func (*awsAwsjson11_deserializeOpUpdateOpsMetadata) ID() string { +func (*awsAwsjson11_deserializeOpUpdateDocumentMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) 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) @@ -15614,9 +15058,9 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOpsMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response, &metadata) } - output := &UpdateOpsMetadataOutput{} + output := &UpdateDocumentMetadataOutput{} out.Result = output var buff [1024]byte @@ -15636,7 +15080,7 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateOpsMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateDocumentMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15650,7 +15094,688 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateOpsMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateDocumentMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidDocument", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocument(response, errorBody) + + case strings.EqualFold("InvalidDocumentOperation", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentOperation(response, errorBody) + + case strings.EqualFold("InvalidDocumentVersion", errorCode): + return awsAwsjson11_deserializeErrorInvalidDocumentVersion(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateMaintenanceWindow struct { +} + +func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindow(response, &metadata) + } + output := &UpdateMaintenanceWindowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget struct { +} + +func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTarget(response, &metadata) + } + output := &UpdateMaintenanceWindowTargetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTargetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask struct { +} + +func (*awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response, &metadata) + } + output := &UpdateMaintenanceWindowTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateMaintenanceWindowTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateMaintenanceWindowTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDoesNotExistException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateManagedInstanceRole struct { +} + +func (*awsAwsjson11_deserializeOpUpdateManagedInstanceRole) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response, &metadata) + } + output := &UpdateManagedInstanceRoleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateManagedInstanceRoleOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateManagedInstanceRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidInstanceId", errorCode): + return awsAwsjson11_deserializeErrorInvalidInstanceId(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateOpsItem struct { +} + +func (*awsAwsjson11_deserializeOpUpdateOpsItem) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOpsItem(response, &metadata) + } + output := &UpdateOpsItemOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateOpsItemOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateOpsItem(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("OpsItemAccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAccessDeniedException(response, errorBody) + + case strings.EqualFold("OpsItemAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemAlreadyExistsException(response, errorBody) + + case strings.EqualFold("OpsItemConflictException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemConflictException(response, errorBody) + + case strings.EqualFold("OpsItemInvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemInvalidParameterException(response, errorBody) + + case strings.EqualFold("OpsItemLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemLimitExceededException(response, errorBody) + + case strings.EqualFold("OpsItemNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorOpsItemNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateOpsMetadata struct { +} + +func (*awsAwsjson11_deserializeOpUpdateOpsMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOpsMetadata(response, &metadata) + } + output := &UpdateOpsMetadataOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateOpsMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateOpsMetadata(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)} @@ -17906,6 +18031,41 @@ func awsAwsjson11_deserializeErrorInvalidInstanceInformationFilterValue(response return output } +func awsAwsjson11_deserializeErrorInvalidInstancePropertyFilterValue(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInstancePropertyFilterValue{} + err := awsAwsjson11_deserializeDocumentInvalidInstancePropertyFilterValue(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson11_deserializeErrorInvalidInventoryGroupException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -28373,6 +28533,336 @@ func awsAwsjson11_deserializeDocumentInstancePatchStatesList(v *[]types.Instance return nil } +func awsAwsjson11_deserializeDocumentInstanceProperties(v *[]types.InstanceProperty, 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.InstanceProperty + if *v == nil { + cv = []types.InstanceProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceProperty + destAddr := &col + if err := awsAwsjson11_deserializeDocumentInstanceProperty(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInstanceProperty(v **types.InstanceProperty, 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.InstanceProperty + if *v == nil { + sv = &types.InstanceProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActivationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActivationId to be of type string, got %T instead", value) + } + sv.ActivationId = ptr.String(jtv) + } + + case "AgentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.AgentVersion = ptr.String(jtv) + } + + case "Architecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Architecture to be of type string, got %T instead", value) + } + sv.Architecture = ptr.String(jtv) + } + + case "AssociationOverview": + if err := awsAwsjson11_deserializeDocumentInstanceAggregatedAssociationOverview(&sv.AssociationOverview, value); err != nil { + return err + } + + case "AssociationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusName to be of type string, got %T instead", value) + } + sv.AssociationStatus = ptr.String(jtv) + } + + case "ComputerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputerName to be of type string, got %T instead", value) + } + sv.ComputerName = ptr.String(jtv) + } + + case "IamRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IamRole to be of type string, got %T instead", value) + } + sv.IamRole = ptr.String(jtv) + } + + case "InstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceId to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "InstanceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceRole to be of type string, got %T instead", value) + } + sv.InstanceRole = ptr.String(jtv) + } + + case "InstanceState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceState to be of type string, got %T instead", value) + } + sv.InstanceState = ptr.String(jtv) + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = ptr.String(jtv) + } + + case "IPAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.IPAddress = ptr.String(jtv) + } + + case "KeyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KeyName to be of type string, got %T instead", value) + } + sv.KeyName = ptr.String(jtv) + } + + case "LastAssociationExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastAssociationExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastPingDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastPingDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LastSuccessfulAssociationExecutionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastSuccessfulAssociationExecutionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "LaunchTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LaunchTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "PingStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PingStatus to be of type string, got %T instead", value) + } + sv.PingStatus = types.PingStatus(jtv) + } + + case "PlatformName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformName to be of type string, got %T instead", value) + } + sv.PlatformName = ptr.String(jtv) + } + + case "PlatformType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformType to be of type string, got %T instead", value) + } + sv.PlatformType = types.PlatformType(jtv) + } + + case "PlatformVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformVersion to be of type string, got %T instead", value) + } + sv.PlatformVersion = ptr.String(jtv) + } + + case "RegistrationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RegistrationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "SourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceId to be of type string, got %T instead", value) + } + sv.SourceId = ptr.String(jtv) + } + + case "SourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceType to be of type string, got %T instead", value) + } + sv.SourceType = types.SourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentInternalServerError(v **types.InternalServerError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -28733,7 +29223,198 @@ func awsAwsjson11_deserializeDocumentInvalidAutomationSignalException(v **types. return nil } -func awsAwsjson11_deserializeDocumentInvalidAutomationStatusUpdateException(v **types.InvalidAutomationStatusUpdateException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidAutomationStatusUpdateException(v **types.InvalidAutomationStatusUpdateException, 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.InvalidAutomationStatusUpdateException + if *v == nil { + sv = &types.InvalidAutomationStatusUpdateException{} + } 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 awsAwsjson11_deserializeDocumentInvalidCommandId(v **types.InvalidCommandId, 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.InvalidCommandId + if *v == nil { + sv = &types.InvalidCommandId{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidDeleteInventoryParametersException(v **types.InvalidDeleteInventoryParametersException, 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.InvalidDeleteInventoryParametersException + if *v == nil { + sv = &types.InvalidDeleteInventoryParametersException{} + } 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 awsAwsjson11_deserializeDocumentInvalidDeletionIdException(v **types.InvalidDeletionIdException, 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.InvalidDeletionIdException + if *v == nil { + sv = &types.InvalidDeletionIdException{} + } 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 awsAwsjson11_deserializeDocumentInvalidDocument(v **types.InvalidDocument, 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.InvalidDocument + if *v == nil { + sv = &types.InvalidDocument{} + } 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 awsAwsjson11_deserializeDocumentInvalidDocumentContent(v **types.InvalidDocumentContent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28746,9 +29427,9 @@ func awsAwsjson11_deserializeDocumentInvalidAutomationStatusUpdateException(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidAutomationStatusUpdateException + var sv *types.InvalidDocumentContent if *v == nil { - sv = &types.InvalidAutomationStatusUpdateException{} + sv = &types.InvalidDocumentContent{} } else { sv = *v } @@ -28773,38 +29454,7 @@ func awsAwsjson11_deserializeDocumentInvalidAutomationStatusUpdateException(v ** return nil } -func awsAwsjson11_deserializeDocumentInvalidCommandId(v **types.InvalidCommandId, 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.InvalidCommandId - if *v == nil { - sv = &types.InvalidCommandId{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInvalidDeleteInventoryParametersException(v **types.InvalidDeleteInventoryParametersException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidDocumentOperation(v **types.InvalidDocumentOperation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28817,9 +29467,9 @@ func awsAwsjson11_deserializeDocumentInvalidDeleteInventoryParametersException(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDeleteInventoryParametersException + var sv *types.InvalidDocumentOperation if *v == nil { - sv = &types.InvalidDeleteInventoryParametersException{} + sv = &types.InvalidDocumentOperation{} } else { sv = *v } @@ -28844,7 +29494,7 @@ func awsAwsjson11_deserializeDocumentInvalidDeleteInventoryParametersException(v return nil } -func awsAwsjson11_deserializeDocumentInvalidDeletionIdException(v **types.InvalidDeletionIdException, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidDocumentSchemaVersion(v **types.InvalidDocumentSchemaVersion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28857,9 +29507,9 @@ func awsAwsjson11_deserializeDocumentInvalidDeletionIdException(v **types.Invali return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDeletionIdException + var sv *types.InvalidDocumentSchemaVersion if *v == nil { - sv = &types.InvalidDeletionIdException{} + sv = &types.InvalidDocumentSchemaVersion{} } else { sv = *v } @@ -28884,7 +29534,7 @@ func awsAwsjson11_deserializeDocumentInvalidDeletionIdException(v **types.Invali return nil } -func awsAwsjson11_deserializeDocumentInvalidDocument(v **types.InvalidDocument, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidDocumentType(v **types.InvalidDocumentType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28897,9 +29547,9 @@ func awsAwsjson11_deserializeDocumentInvalidDocument(v **types.InvalidDocument, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDocument + var sv *types.InvalidDocumentType if *v == nil { - sv = &types.InvalidDocument{} + sv = &types.InvalidDocumentType{} } else { sv = *v } @@ -28924,7 +29574,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocument(v **types.InvalidDocument, return nil } -func awsAwsjson11_deserializeDocumentInvalidDocumentContent(v **types.InvalidDocumentContent, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidDocumentVersion(v **types.InvalidDocumentVersion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28937,9 +29587,9 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentContent(v **types.InvalidDoc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDocumentContent + var sv *types.InvalidDocumentVersion if *v == nil { - sv = &types.InvalidDocumentContent{} + sv = &types.InvalidDocumentVersion{} } else { sv = *v } @@ -28964,7 +29614,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentContent(v **types.InvalidDoc return nil } -func awsAwsjson11_deserializeDocumentInvalidDocumentOperation(v **types.InvalidDocumentOperation, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidFilter(v **types.InvalidFilter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -28977,9 +29627,9 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentOperation(v **types.InvalidD return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDocumentOperation + var sv *types.InvalidFilter if *v == nil { - sv = &types.InvalidDocumentOperation{} + sv = &types.InvalidFilter{} } else { sv = *v } @@ -29004,7 +29654,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentOperation(v **types.InvalidD return nil } -func awsAwsjson11_deserializeDocumentInvalidDocumentSchemaVersion(v **types.InvalidDocumentSchemaVersion, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidFilterKey(v **types.InvalidFilterKey, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29017,24 +29667,15 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentSchemaVersion(v **types.Inva return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDocumentSchemaVersion + var sv *types.InvalidFilterKey if *v == nil { - sv = &types.InvalidDocumentSchemaVersion{} + sv = &types.InvalidFilterKey{} } 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 @@ -29044,7 +29685,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentSchemaVersion(v **types.Inva return nil } -func awsAwsjson11_deserializeDocumentInvalidDocumentType(v **types.InvalidDocumentType, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidFilterOption(v **types.InvalidFilterOption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29057,16 +29698,16 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentType(v **types.InvalidDocume return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDocumentType + var sv *types.InvalidFilterOption if *v == nil { - sv = &types.InvalidDocumentType{} + sv = &types.InvalidFilterOption{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + case "message": if value != nil { jtv, ok := value.(string) if !ok { @@ -29084,7 +29725,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentType(v **types.InvalidDocume return nil } -func awsAwsjson11_deserializeDocumentInvalidDocumentVersion(v **types.InvalidDocumentVersion, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidFilterValue(v **types.InvalidFilterValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29097,9 +29738,9 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentVersion(v **types.InvalidDoc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidDocumentVersion + var sv *types.InvalidFilterValue if *v == nil { - sv = &types.InvalidDocumentVersion{} + sv = &types.InvalidFilterValue{} } else { sv = *v } @@ -29124,7 +29765,7 @@ func awsAwsjson11_deserializeDocumentInvalidDocumentVersion(v **types.InvalidDoc return nil } -func awsAwsjson11_deserializeDocumentInvalidFilter(v **types.InvalidFilter, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidInstanceId(v **types.InvalidInstanceId, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29137,9 +29778,9 @@ func awsAwsjson11_deserializeDocumentInvalidFilter(v **types.InvalidFilter, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidFilter + var sv *types.InvalidInstanceId if *v == nil { - sv = &types.InvalidFilter{} + sv = &types.InvalidInstanceId{} } else { sv = *v } @@ -29164,38 +29805,7 @@ func awsAwsjson11_deserializeDocumentInvalidFilter(v **types.InvalidFilter, valu return nil } -func awsAwsjson11_deserializeDocumentInvalidFilterKey(v **types.InvalidFilterKey, 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.InvalidFilterKey - if *v == nil { - sv = &types.InvalidFilterKey{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInvalidFilterOption(v **types.InvalidFilterOption, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidInstanceInformationFilterValue(v **types.InvalidInstanceInformationFilterValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29208,9 +29818,9 @@ func awsAwsjson11_deserializeDocumentInvalidFilterOption(v **types.InvalidFilter return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidFilterOption + var sv *types.InvalidInstanceInformationFilterValue if *v == nil { - sv = &types.InvalidFilterOption{} + sv = &types.InvalidInstanceInformationFilterValue{} } else { sv = *v } @@ -29235,47 +29845,7 @@ func awsAwsjson11_deserializeDocumentInvalidFilterOption(v **types.InvalidFilter return nil } -func awsAwsjson11_deserializeDocumentInvalidFilterValue(v **types.InvalidFilterValue, 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.InvalidFilterValue - if *v == nil { - sv = &types.InvalidFilterValue{} - } 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 awsAwsjson11_deserializeDocumentInvalidInstanceId(v **types.InvalidInstanceId, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidInstancePropertyFilterValue(v **types.InvalidInstancePropertyFilterValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -29288,49 +29858,9 @@ func awsAwsjson11_deserializeDocumentInvalidInstanceId(v **types.InvalidInstance return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidInstanceId + var sv *types.InvalidInstancePropertyFilterValue if *v == nil { - sv = &types.InvalidInstanceId{} - } 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 awsAwsjson11_deserializeDocumentInvalidInstanceInformationFilterValue(v **types.InvalidInstanceInformationFilterValue, 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.InvalidInstanceInformationFilterValue - if *v == nil { - sv = &types.InvalidInstanceInformationFilterValue{} + sv = &types.InvalidInstancePropertyFilterValue{} } else { sv = *v } @@ -43172,6 +43702,51 @@ func awsAwsjson11_deserializeOpDocumentDescribeInstancePatchStatesOutput(v **Des return nil } +func awsAwsjson11_deserializeOpDocumentDescribeInstancePropertiesOutput(v **DescribeInstancePropertiesOutput, 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 *DescribeInstancePropertiesOutput + if *v == nil { + sv = &DescribeInstancePropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstanceProperties": + if err := awsAwsjson11_deserializeDocumentInstanceProperties(&sv.InstanceProperties, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeInventoryDeletionsOutput(v **DescribeInventoryDeletionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ssm/generated.json b/service/ssm/generated.json index 1bc036ac46d..4bf32482c3a 100644 --- a/service/ssm/generated.json +++ b/service/ssm/generated.json @@ -54,6 +54,7 @@ "api_op_DescribeInstancePatchStates.go", "api_op_DescribeInstancePatchStatesForPatchGroup.go", "api_op_DescribeInstancePatches.go", + "api_op_DescribeInstanceProperties.go", "api_op_DescribeInventoryDeletions.go", "api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go", "api_op_DescribeMaintenanceWindowExecutionTasks.go", diff --git a/service/ssm/serializers.go b/service/ssm/serializers.go index b303330fbdd..e5adf5a2151 100644 --- a/service/ssm/serializers.go +++ b/service/ssm/serializers.go @@ -2491,6 +2491,61 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) Handl return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeInstanceProperties struct { +} + +func (*awsAwsjson11_serializeOpDescribeInstanceProperties) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeInstanceProperties) 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.(*DescribeInstancePropertiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AmazonSSM.DescribeInstanceProperties") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeInstancePropertiesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeInventoryDeletions struct { } @@ -8723,6 +8778,86 @@ func awsAwsjson11_serializeDocumentInstancePatchStateFilterValues(v []string, va return nil } +func awsAwsjson11_serializeDocumentInstancePropertyFilter(v *types.InstancePropertyFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Key) > 0 { + ok := object.Key("key") + ok.String(string(v.Key)) + } + + if v.ValueSet != nil { + ok := object.Key("valueSet") + if err := awsAwsjson11_serializeDocumentInstancePropertyFilterValueSet(v.ValueSet, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyFilterList(v []types.InstancePropertyFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInstancePropertyFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyFilterValueSet(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_serializeDocumentInstancePropertyStringFilter(v *types.InstancePropertyStringFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if len(v.Operator) > 0 { + ok := object.Key("Operator") + ok.String(string(v.Operator)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentInstancePropertyFilterValueSet(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInstancePropertyStringFilterList(v []types.InstancePropertyStringFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInstancePropertyStringFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentInventoryAggregator(v *types.InventoryAggregator, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -11978,6 +12113,37 @@ func awsAwsjson11_serializeOpDocumentDescribeInstancePatchStatesInput(v *Describ return nil } +func awsAwsjson11_serializeOpDocumentDescribeInstancePropertiesInput(v *DescribeInstancePropertiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FiltersWithOperator != nil { + ok := object.Key("FiltersWithOperator") + if err := awsAwsjson11_serializeDocumentInstancePropertyStringFilterList(v.FiltersWithOperator, ok); err != nil { + return err + } + } + + if v.InstancePropertyFilterList != nil { + ok := object.Key("InstancePropertyFilterList") + if err := awsAwsjson11_serializeDocumentInstancePropertyFilterList(v.InstancePropertyFilterList, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeInventoryDeletionsInput(v *DescribeInventoryDeletionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/ssm/snapshot_test.go b/service/ssm/snapshot_test.go index 3cb78e320a7..8eef1a0cc4e 100644 --- a/service/ssm/snapshot_test.go +++ b/service/ssm/snapshot_test.go @@ -602,6 +602,18 @@ func TestCheckSnapshot_DescribeInstancePatchStatesForPatchGroup(t *testing.T) { } } +func TestCheckSnapshot_DescribeInstanceProperties(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeInstanceProperties(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeInstanceProperties") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeInventoryDeletions(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeInventoryDeletions(context.Background(), nil, func(o *Options) { @@ -2269,6 +2281,18 @@ func TestUpdateSnapshot_DescribeInstancePatchStatesForPatchGroup(t *testing.T) { } } +func TestUpdateSnapshot_DescribeInstanceProperties(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeInstanceProperties(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeInstanceProperties") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeInventoryDeletions(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeInventoryDeletions(context.Background(), nil, func(o *Options) { diff --git a/service/ssm/types/enums.go b/service/ssm/types/enums.go index bb6c67ae3ea..5b42c1e18f3 100644 --- a/service/ssm/types/enums.go +++ b/service/ssm/types/enums.go @@ -896,6 +896,63 @@ func (InstancePatchStateOperatorType) Values() []InstancePatchStateOperatorType } } +type InstancePropertyFilterKey string + +// Enum values for InstancePropertyFilterKey +const ( + InstancePropertyFilterKeyInstanceIds InstancePropertyFilterKey = "InstanceIds" + InstancePropertyFilterKeyAgentVersion InstancePropertyFilterKey = "AgentVersion" + InstancePropertyFilterKeyPingStatus InstancePropertyFilterKey = "PingStatus" + InstancePropertyFilterKeyPlatformTypes InstancePropertyFilterKey = "PlatformTypes" + InstancePropertyFilterKeyDocumentName InstancePropertyFilterKey = "DocumentName" + InstancePropertyFilterKeyActivationIds InstancePropertyFilterKey = "ActivationIds" + InstancePropertyFilterKeyIamRole InstancePropertyFilterKey = "IamRole" + InstancePropertyFilterKeyResourceType InstancePropertyFilterKey = "ResourceType" + InstancePropertyFilterKeyAssociationStatus InstancePropertyFilterKey = "AssociationStatus" +) + +// Values returns all known values for InstancePropertyFilterKey. 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 (InstancePropertyFilterKey) Values() []InstancePropertyFilterKey { + return []InstancePropertyFilterKey{ + "InstanceIds", + "AgentVersion", + "PingStatus", + "PlatformTypes", + "DocumentName", + "ActivationIds", + "IamRole", + "ResourceType", + "AssociationStatus", + } +} + +type InstancePropertyFilterOperator string + +// Enum values for InstancePropertyFilterOperator +const ( + InstancePropertyFilterOperatorEqual InstancePropertyFilterOperator = "Equal" + InstancePropertyFilterOperatorNotEqual InstancePropertyFilterOperator = "NotEqual" + InstancePropertyFilterOperatorBeginWith InstancePropertyFilterOperator = "BeginWith" + InstancePropertyFilterOperatorLessThan InstancePropertyFilterOperator = "LessThan" + InstancePropertyFilterOperatorGreaterThan InstancePropertyFilterOperator = "GreaterThan" +) + +// Values returns all known values for InstancePropertyFilterOperator. 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 (InstancePropertyFilterOperator) Values() []InstancePropertyFilterOperator { + return []InstancePropertyFilterOperator{ + "Equal", + "NotEqual", + "BeginWith", + "LessThan", + "GreaterThan", + } +} + type InventoryAttributeDataType string // Enum values for InventoryAttributeDataType diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index c03b7a8ff73..f290d400854 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -1458,6 +1458,34 @@ func (e *InvalidInstanceInformationFilterValue) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The specified filter value isn't valid. +type InvalidInstancePropertyFilterValue struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInstancePropertyFilterValue) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInstancePropertyFilterValue) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInstancePropertyFilterValue) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInstancePropertyFilterValue" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInstancePropertyFilterValue) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The specified inventory group isn't valid. type InvalidInventoryGroupException struct { Message *string diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index b8ceacc730b..d0ea4da9473 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -2513,6 +2513,132 @@ type InstancePatchStateFilter struct { noSmithyDocumentSerde } +// An object containing various properties of a managed node. +type InstanceProperty struct { + + // The activation ID created by Systems Manager when the server or virtual machine + // (VM) was registered + ActivationId *string + + // The version of SSM Agent running on your managed node. + AgentVersion *string + + // The CPU architecture of the node. For example, x86_64. + Architecture *string + + // Status information about the aggregated associations. + AssociationOverview *InstanceAggregatedAssociationOverview + + // The status of the State Manager association applied to the managed node. + AssociationStatus *string + + // The fully qualified host name of the managed node. + ComputerName *string + + // The public IPv4 address assigned to the node. If a public IPv4 address isn't + // assigned to the node, this value is blank. + IPAddress *string + + // The IAM role used in the hybrid activation to register the node with Systems + // Manager. + IamRole *string + + // The ID of the managed node. + InstanceId *string + + // The instance profile attached to the node. If an instance profile isn't + // attached to the node, this value is blank. + InstanceRole *string + + // The current state of the node. + InstanceState *string + + // The instance type of the managed node. For example, t3.large. + InstanceType *string + + // The name of the key pair associated with the node. If a key pair isnt't + // associated with the node, this value is blank. + KeyName *string + + // The date the association was last run. + LastAssociationExecutionDate *time.Time + + // The date and time when the SSM Agent last pinged the Systems Manager service. + LastPingDateTime *time.Time + + // The last date the association was successfully run. + LastSuccessfulAssociationExecutionDate *time.Time + + // The timestamp for when the node was launched. + LaunchTime *time.Time + + // The value of the EC2 Name tag associated with the node. If a Name tag hasn't + // been applied to the node, this value is blank. + Name *string + + // Connection status of the SSM Agent on the managed node. + PingStatus PingStatus + + // The name of the operating system platform running on your managed node. + PlatformName *string + + // The operating system platform type of the managed node. For example, Windows. + PlatformType PlatformType + + // The version of the OS platform running on your managed node. + PlatformVersion *string + + // The date the node was registered with Systems Manager. + RegistrationDate *time.Time + + // The type of managed node. + ResourceType *string + + // The ID of the source resource. + SourceId *string + + // The type of the source resource. + SourceType SourceType + + noSmithyDocumentSerde +} + +// Describes a filter for a specific list of managed nodes. You can filter node +// information by using tags. You specify tags by using a key-value mapping. +type InstancePropertyFilter struct { + + // The name of the filter. + // + // This member is required. + Key InstancePropertyFilterKey + + // The filter values. + // + // This member is required. + ValueSet []string + + noSmithyDocumentSerde +} + +// The filters to describe or get information about your managed nodes. +type InstancePropertyStringFilter struct { + + // The filter key name to describe your managed nodes. + // + // This member is required. + Key *string + + // The filter key name to describe your managed nodes. + // + // This member is required. + Values []string + + // The operator used by the filter call. + Operator InstancePropertyFilterOperator + + noSmithyDocumentSerde +} + // Specifies the inventory type and attribute for the aggregation execution. type InventoryAggregator struct { @@ -5052,34 +5178,30 @@ type Tag struct { // information about running tasks that don't specify targets, see Registering // maintenance window tasks without targets (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) // in the Amazon Web Services Systems Manager User Guide. Supported formats include -// the following. -// - Key=InstanceIds,Values=,, -// - Key=tag:,Values=, -// - Key=tag-key,Values=, -// - Run Command and Maintenance window targets only: -// Key=resource-groups:Name,Values= -// - Maintenance window targets only: -// Key=resource-groups:ResourceTypeFilters,Values=, -// - Automation targets only: Key=ResourceGroup;Values= +// the following. For all Systems Manager capabilities: +// - Key=tag-key,Values=tag-value-1,tag-value-2 +// +// For Automation and Change Manager: +// - Key=tag:tag-key,Values=tag-value +// - Key=ResourceGroup,Values=resource-group-name +// - Key=ParameterValues,Values=value-1,value-2,value-3 +// - To target all instances in the Amazon Web Services Region: +// - Key=AWS::EC2::Instance,Values=* +// - Key=InstanceIds,Values=* // -// For example: +// For Run Command and Maintenance Windows: +// - Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 +// - Key=tag:tag-key,Values=tag-value-1,tag-value-2 +// - Key=resource-groups:Name,Values=resource-group-name +// - Additionally, Maintenance Windows support targeting resource types: +// - +// Key=resource-groups:ResourceTypeFilters,Values=resource-type-1,resource-type-2 // -// - -// Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE -// - Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3 -// - Key=tag-key,Values=Name,Instance-Type,CostCenter -// - Run Command and Maintenance window targets only: -// Key=resource-groups:Name,Values=ProductionResourceGroup This example -// demonstrates how to target all resources in the resource group -// ProductionResourceGroup in your maintenance window. -// - Maintenance window targets only: -// Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC -// This example demonstrates how to target only Amazon Elastic Compute Cloud -// (Amazon EC2) instances and VPCs in your maintenance window. -// - Automation targets only: Key=ResourceGroup,Values=MyResourceGroup -// - State Manager association targets only: Key=InstanceIds,Values=* This -// example demonstrates how to target all managed instances in the Amazon Web -// Services Region where the association was created. +// For State Manager: +// - Key=InstanceIds,Values=instance-id-1,instance-id-2,instance-id-3 +// - Key=tag:tag-key,Values=tag-value-1,tag-value-2 +// - To target all instances in the Amazon Web Services Region: +// - Key=InstanceIds,Values=* // // For more information about how to send commands that target managed nodes using // Key,Value parameters, see Targeting multiple managed nodes (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) diff --git a/service/ssm/validators.go b/service/ssm/validators.go index 37cb33aafb2..9b6e1ff36ee 100644 --- a/service/ssm/validators.go +++ b/service/ssm/validators.go @@ -830,6 +830,26 @@ func (m *validateOpDescribeInstancePatchStates) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpDescribeInstanceProperties struct { +} + +func (*validateOpDescribeInstanceProperties) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstanceProperties) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstancePropertiesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstancePropertiesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeMaintenanceWindowExecutions struct { } @@ -2654,6 +2674,10 @@ func addOpDescribeInstancePatchStatesValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpDescribeInstancePatchStates{}, middleware.After) } +func addOpDescribeInstancePropertiesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstanceProperties{}, middleware.After) +} + func addOpDescribeMaintenanceWindowExecutionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeMaintenanceWindowExecutions{}, middleware.After) } @@ -3545,6 +3569,76 @@ func validateInstancePatchStateFilterList(v []types.InstancePatchStateFilter) er } } +func validateInstancePropertyFilter(v *types.InstancePropertyFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyFilter"} + if len(v.Key) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.ValueSet == nil { + invalidParams.Add(smithy.NewErrParamRequired("ValueSet")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePropertyFilterList(v []types.InstancePropertyFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyFilterList"} + for i := range v { + if err := validateInstancePropertyFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePropertyStringFilter(v *types.InstancePropertyStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyStringFilter"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInstancePropertyStringFilterList(v []types.InstancePropertyStringFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InstancePropertyStringFilterList"} + for i := range v { + if err := validateInstancePropertyStringFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInventoryAggregator(v *types.InventoryAggregator) error { if v == nil { return nil @@ -5305,6 +5399,28 @@ func validateOpDescribeInstancePatchStatesInput(v *DescribeInstancePatchStatesIn } } +func validateOpDescribeInstancePropertiesInput(v *DescribeInstancePropertiesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstancePropertiesInput"} + if v.InstancePropertyFilterList != nil { + if err := validateInstancePropertyFilterList(v.InstancePropertyFilterList); err != nil { + invalidParams.AddNested("InstancePropertyFilterList", err.(smithy.InvalidParamsError)) + } + } + if v.FiltersWithOperator != nil { + if err := validateInstancePropertyStringFilterList(v.FiltersWithOperator); err != nil { + invalidParams.AddNested("FiltersWithOperator", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeMaintenanceWindowExecutionsInput(v *DescribeMaintenanceWindowExecutionsInput) error { if v == nil { return nil