From 0097c82b9d2202c27ae799837f495fe7d7759422 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 17 Sep 2024 18:25:47 +0000 Subject: [PATCH] Regenerated Clients --- .../2b88a3b93db744ed8b96ac92287113df.json | 8 + .../8365976fa1184f11a358ab506601b66e.json | 8 + .../a041cacae5ad48e6a5eb5f1f9eef3a08.json | 8 + .../a258210fd0cc42f98c48758495965b99.json | 8 + .../ea0dc4903708427fb4b5154fb9b53e23.json | 8 + .../edda608a7c624d02b3048aa4aac91c34.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- service/codebuild/types/enums.go | 2 + service/codebuild/types/types.go | 12 +- service/ecr/deserializers.go | 27 + service/ecr/types/types.go | 19 +- service/ecs/api_op_PutAccountSetting.go | 3 - service/ecs/types/types.go | 143 +- service/lambda/api_op_DeleteResourcePolicy.go | 146 + .../api_op_GetPublicAccessBlockConfig.go | 143 + service/lambda/api_op_GetResourcePolicy.go | 148 + .../api_op_PutPublicAccessBlockConfig.go | 169 ++ service/lambda/api_op_PutResourcePolicy.go | 173 ++ service/lambda/deserializers.go | 2461 +++++++++++------ service/lambda/generated.json | 5 + service/lambda/serializers.go | 399 +++ .../api_op_DeleteResourcePolicy.go.snap | 36 + .../api_op_GetPublicAccessBlockConfig.go.snap | 36 + .../snapshot/api_op_GetResourcePolicy.go.snap | 36 + .../api_op_PutPublicAccessBlockConfig.go.snap | 36 + .../snapshot/api_op_PutResourcePolicy.go.snap | 36 + service/lambda/snapshot_test.go | 120 + service/lambda/types/errors.go | 31 + service/lambda/types/types.go | 18 + service/lambda/validators.go | 201 ++ service/rds/api_op_CreateDBInstance.go | 10 +- .../api_op_RestoreDBInstanceFromDBSnapshot.go | 10 +- .../api_op_RestoreDBInstanceToPointInTime.go | 10 +- service/ssm/api_op_CreateActivation.go | 10 +- service/ssm/api_op_CreateAssociation.go | 4 +- service/ssm/api_op_CreateDocument.go | 2 +- service/ssm/api_op_CreatePatchBaseline.go | 8 +- service/ssm/api_op_CreateResourceDataSync.go | 4 +- service/ssm/api_op_DeleteInventory.go | 4 +- service/ssm/api_op_DescribeInstancePatches.go | 4 +- ..._op_DescribeMaintenanceWindowExecutions.go | 2 +- .../ssm/api_op_GetMaintenanceWindowTask.go | 4 +- service/ssm/api_op_GetParameter.go | 2 +- ...pi_op_RegisterTaskWithMaintenanceWindow.go | 4 +- .../ssm/api_op_StartAutomationExecution.go | 17 +- .../ssm/api_op_UpdateMaintenanceWindowTask.go | 8 +- .../ssm/api_op_UpdateManagedInstanceRole.go | 4 +- service/ssm/api_op_UpdateOpsItem.go | 4 +- service/ssm/api_op_UpdatePatchBaseline.go | 8 +- service/ssm/deserializers.go | 91 + service/ssm/serializers.go | 45 + service/ssm/types/errors.go | 4 +- service/ssm/types/types.go | 127 +- 53 files changed, 3886 insertions(+), 950 deletions(-) create mode 100644 .changelog/2b88a3b93db744ed8b96ac92287113df.json create mode 100644 .changelog/8365976fa1184f11a358ab506601b66e.json create mode 100644 .changelog/a041cacae5ad48e6a5eb5f1f9eef3a08.json create mode 100644 .changelog/a258210fd0cc42f98c48758495965b99.json create mode 100644 .changelog/ea0dc4903708427fb4b5154fb9b53e23.json create mode 100644 .changelog/edda608a7c624d02b3048aa4aac91c34.json create mode 100644 service/lambda/api_op_DeleteResourcePolicy.go create mode 100644 service/lambda/api_op_GetPublicAccessBlockConfig.go create mode 100644 service/lambda/api_op_GetResourcePolicy.go create mode 100644 service/lambda/api_op_PutPublicAccessBlockConfig.go create mode 100644 service/lambda/api_op_PutResourcePolicy.go create mode 100644 service/lambda/snapshot/api_op_DeleteResourcePolicy.go.snap create mode 100644 service/lambda/snapshot/api_op_GetPublicAccessBlockConfig.go.snap create mode 100644 service/lambda/snapshot/api_op_GetResourcePolicy.go.snap create mode 100644 service/lambda/snapshot/api_op_PutPublicAccessBlockConfig.go.snap create mode 100644 service/lambda/snapshot/api_op_PutResourcePolicy.go.snap diff --git a/.changelog/2b88a3b93db744ed8b96ac92287113df.json b/.changelog/2b88a3b93db744ed8b96ac92287113df.json new file mode 100644 index 00000000000..9e9bf3aca23 --- /dev/null +++ b/.changelog/2b88a3b93db744ed8b96ac92287113df.json @@ -0,0 +1,8 @@ +{ + "id": "2b88a3b9-3db7-44ed-8b96-ac92287113df", + "type": "feature", + "description": "GitLab Enhancements - Add support for Self-Hosted GitLab runners in CodeBuild. Add group webhooks", + "modules": [ + "service/codebuild" + ] +} \ No newline at end of file diff --git a/.changelog/8365976fa1184f11a358ab506601b66e.json b/.changelog/8365976fa1184f11a358ab506601b66e.json new file mode 100644 index 00000000000..0807d13f788 --- /dev/null +++ b/.changelog/8365976fa1184f11a358ab506601b66e.json @@ -0,0 +1,8 @@ +{ + "id": "8365976f-a118-4f11-a358-ab506601b66e", + "type": "feature", + "description": "Support for additional levels of cross-account, cross-Region organizational units in Automation. Various documentation updates.", + "modules": [ + "service/ssm" + ] +} \ No newline at end of file diff --git a/.changelog/a041cacae5ad48e6a5eb5f1f9eef3a08.json b/.changelog/a041cacae5ad48e6a5eb5f1f9eef3a08.json new file mode 100644 index 00000000000..30179e9ba98 --- /dev/null +++ b/.changelog/a041cacae5ad48e6a5eb5f1f9eef3a08.json @@ -0,0 +1,8 @@ +{ + "id": "a041caca-e5ad-48e6-a5eb-5f1f9eef3a08", + "type": "documentation", + "description": "Updates Amazon RDS documentation with configuration information about the BYOL model for RDS for Db2.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/a258210fd0cc42f98c48758495965b99.json b/.changelog/a258210fd0cc42f98c48758495965b99.json new file mode 100644 index 00000000000..96531be6605 --- /dev/null +++ b/.changelog/a258210fd0cc42f98c48758495965b99.json @@ -0,0 +1,8 @@ +{ + "id": "a258210f-d0cc-42f9-8c48-758495965b99", + "type": "feature", + "description": "The `DescribeImageScanning` API now includes `fixAvailable`, `exploitAvailable`, and `fixedInVersion` fields to provide more detailed information about the availability of fixes, exploits, and fixed versions for identified image vulnerabilities.", + "modules": [ + "service/ecr" + ] +} \ No newline at end of file diff --git a/.changelog/ea0dc4903708427fb4b5154fb9b53e23.json b/.changelog/ea0dc4903708427fb4b5154fb9b53e23.json new file mode 100644 index 00000000000..ebb9a7b70df --- /dev/null +++ b/.changelog/ea0dc4903708427fb4b5154fb9b53e23.json @@ -0,0 +1,8 @@ +{ + "id": "ea0dc490-3708-427f-b4b5-154fb9b53e23", + "type": "feature", + "description": "Support for JSON resource-based policies and block public access", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/edda608a7c624d02b3048aa4aac91c34.json b/.changelog/edda608a7c624d02b3048aa4aac91c34.json new file mode 100644 index 00000000000..872457fb73d --- /dev/null +++ b/.changelog/edda608a7c624d02b3048aa4aac91c34.json @@ -0,0 +1,8 @@ +{ + "id": "edda608a-7c62-4d02-b304-8aa4aac91c34", + "type": "documentation", + "description": "This is a documentation only release to address various tickets.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 3d99308b424..03e82996405 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.14.14" +const goModuleVersion = "1.15.3" diff --git a/service/codebuild/types/enums.go b/service/codebuild/types/enums.go index 5043dda04ec..4f4e0184fd9 100644 --- a/service/codebuild/types/enums.go +++ b/service/codebuild/types/enums.go @@ -1017,6 +1017,7 @@ type WebhookScopeType string const ( WebhookScopeTypeGithubOrganization WebhookScopeType = "GITHUB_ORGANIZATION" WebhookScopeTypeGithubGlobal WebhookScopeType = "GITHUB_GLOBAL" + WebhookScopeTypeGitlabGroup WebhookScopeType = "GITLAB_GROUP" ) // Values returns all known values for WebhookScopeType. Note that this can be @@ -1027,5 +1028,6 @@ func (WebhookScopeType) Values() []WebhookScopeType { return []WebhookScopeType{ "GITHUB_ORGANIZATION", "GITHUB_GLOBAL", + "GITLAB_GROUP", } } diff --git a/service/codebuild/types/types.go b/service/codebuild/types/types.go index f696a110782..f4dca30cdbe 100644 --- a/service/codebuild/types/types.go +++ b/service/codebuild/types/types.go @@ -2315,20 +2315,20 @@ type ScalingConfigurationOutput struct { // Contains configuration information about the scope for a webhook. type ScopeConfiguration struct { - // The name of either the enterprise or organization that will send webhook events - // to CodeBuild, depending on if the webhook is a global or organization webhook - // respectively. + // The name of either the group, enterprise, or organization that will send + // webhook events to CodeBuild, depending on the type of webhook. // // This member is required. Name *string - // The type of scope for a GitHub webhook. + // The type of scope for a GitHub or GitLab webhook. // // This member is required. Scope WebhookScopeType - // The domain of the GitHub Enterprise organization. Note that this parameter is - // only required if your project's source type is GITHUB_ENTERPRISE + // The domain of the GitHub Enterprise organization or the GitLab Self Managed + // group. Note that this parameter is only required if your project's source type + // is GITHUB_ENTERPRISE or GITLAB_SELF_MANAGED. Domain *string noSmithyDocumentSerde diff --git a/service/ecr/deserializers.go b/service/ecr/deserializers.go index 83595939c2e..4b768ad682a 100644 --- a/service/ecr/deserializers.go +++ b/service/ecr/deserializers.go @@ -7966,6 +7966,15 @@ func awsAwsjson11_deserializeDocumentEnhancedImageScanFinding(v **types.Enhanced sv.Description = ptr.String(jtv) } + case "exploitAvailable": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExploitAvailable to be of type string, got %T instead", value) + } + sv.ExploitAvailable = ptr.String(jtv) + } + case "findingArn": if value != nil { jtv, ok := value.(string) @@ -7991,6 +8000,15 @@ func awsAwsjson11_deserializeDocumentEnhancedImageScanFinding(v **types.Enhanced } } + case "fixAvailable": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FixAvailable to be of type string, got %T instead", value) + } + sv.FixAvailable = ptr.String(jtv) + } + case "lastObservedAt": if value != nil { switch jtv := value.(type) { @@ -12935,6 +12953,15 @@ func awsAwsjson11_deserializeDocumentVulnerablePackage(v **types.VulnerablePacka sv.FilePath = ptr.String(jtv) } + case "fixedInVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FixedInVersion to be of type string, got %T instead", value) + } + sv.FixedInVersion = ptr.String(jtv) + } + case "name": if value != nil { jtv, ok := value.(string) diff --git a/service/ecr/types/types.go b/service/ecr/types/types.go index 5910d66b088..7bab1662648 100644 --- a/service/ecr/types/types.go +++ b/service/ecr/types/types.go @@ -166,10 +166,11 @@ type EncryptionConfiguration struct { // // If you use the AES256 encryption type, Amazon ECR uses server-side encryption // with Amazon S3-managed encryption keys which encrypts the images in the - // repository using an AES256 encryption algorithm. For more information, see [Protecting data using server-side encryption with Amazon S3-managed encryption keys (SSE-S3)]in - // the Amazon Simple Storage Service Console Developer Guide. + // repository using an AES256 encryption algorithm. // - // [Protecting data using server-side encryption with Amazon S3-managed encryption keys (SSE-S3)]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html + // For more information, see [Amazon ECR encryption at rest] in the Amazon Elastic Container Registry User Guide. + // + // [Amazon ECR encryption at rest]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/encryption-at-rest.html // // This member is required. EncryptionType EncryptionType @@ -225,12 +226,21 @@ type EnhancedImageScanFinding struct { // The description of the finding. Description *string + // If a finding discovered in your environment has an exploit available. + ExploitAvailable *string + // The Amazon Resource Number (ARN) of the finding. FindingArn *string // The date and time that the finding was first observed. FirstObservedAt *time.Time + // Details on whether a fix is available through a version update. This value can + // be YES , NO , or PARTIAL . A PARTIAL fix means that some, but not all, of the + // packages identified in the finding have fixes available through updated + // versions. + FixAvailable *string + // The date and time that the finding was last observed. LastObservedAt *time.Time @@ -978,6 +988,9 @@ type VulnerablePackage struct { // The file path of the vulnerable package. FilePath *string + // The version of the package that contains the vulnerability fix. + FixedInVersion *string + // The name of the vulnerable package. Name *string diff --git a/service/ecs/api_op_PutAccountSetting.go b/service/ecs/api_op_PutAccountSetting.go index e2218e6a5ea..3fbe17fca5d 100644 --- a/service/ecs/api_op_PutAccountSetting.go +++ b/service/ecs/api_op_PutAccountSetting.go @@ -81,9 +81,6 @@ type PutAccountSettingInput struct { // more information on using IPv6 with tasks launched on Amazon EC2 instances, see [Using a VPC in dual-stack mode] // . For more information on using IPv6 with tasks launched on Fargate, see [Using a VPC in dual-stack mode]. // - // - fargateFIPSMode - If you specify fargateFIPSMode , Fargate FIPS 140 - // compliance is affected. - // // - fargateTaskRetirementWaitPeriod - When Amazon Web Services determines that a // security or infrastructure update is needed for an Amazon ECS task hosted on // Fargate, the tasks need to be stopped and new tasks launched to replace them. diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index 75a577ab7d7..e3d9801d01e 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -639,12 +639,12 @@ type Container struct { type ContainerDefinition struct { // The command that's passed to the container. This parameter maps to Cmd in the - // docker conainer create command and the COMMAND parameter to docker run. If + // docker container create command and the COMMAND parameter to docker run. If // there are multiple arguments, each argument is a separated string in the array. Command []string // The number of cpu units reserved for the container. This parameter maps to - // CpuShares in the docker conainer create commandand the --cpu-shares option to + // CpuShares in the docker container create commandand the --cpu-shares option to // docker run. // // This field is optional for tasks using the Fargate launch type, and the only @@ -757,27 +757,27 @@ type ContainerDefinition struct { DependsOn []ContainerDependency // When this parameter is true, networking is off within the container. This - // parameter maps to NetworkDisabled in the docker conainer create command. + // parameter maps to NetworkDisabled in the docker container create command. // // This parameter is not supported for Windows containers. DisableNetworking *bool // A list of DNS search domains that are presented to the container. This - // parameter maps to DnsSearch in the docker conainer create command and the + // parameter maps to DnsSearch in the docker container create command and the // --dns-search option to docker run. // // This parameter is not supported for Windows containers. DnsSearchDomains []string // A list of DNS servers that are presented to the container. This parameter maps - // to Dns in the the docker conainer create command and the --dns option to docker + // to Dns in the docker container create command and the --dns option to docker // run. // // This parameter is not supported for Windows containers. DnsServers []string // A key/value map of labels to add to the container. This parameter maps to Labels - // in the docker conainer create command and the --label option to docker run. + // in the docker container create command and the --label option to docker run. // This parameter requires version 1.18 of the Docker Remote API or greater on your // container instance. To check the Docker Remote API version on your container // instance, log in to your container instance and run the following command: sudo @@ -795,7 +795,7 @@ type ContainerDefinition struct { // file that configures a container for Active Directory authentication. For more // information, see [Using gMSAs for Windows Containers]and [Using gMSAs for Linux Containers] in the Amazon Elastic Container Service Developer Guide. // - // This parameter maps to SecurityOpt in the docker conainer create command and + // This parameter maps to SecurityOpt in the docker container create command and // the --security-opt option to docker run. // // The Amazon ECS container agent running on a container instance must register @@ -818,12 +818,12 @@ type ContainerDefinition struct { // instead. // // The entry point that's passed to the container. This parameter maps to - // Entrypoint in tthe docker conainer create command and the --entrypoint option + // Entrypoint in the docker container create command and the --entrypoint option // to docker run. EntryPoint []string // The environment variables to pass to a container. This parameter maps to Env in - // the docker conainer create command and the --env option to docker run. + // the docker container create command and the --env option to docker run. // // We don't recommend that you use plaintext environment variables for sensitive // information, such as credential data. @@ -863,7 +863,7 @@ type ContainerDefinition struct { Essential *bool // A list of hostnames and IP address mappings to append to the /etc/hosts file on - // the container. This parameter maps to ExtraHosts in the docker conainer create + // the container. This parameter maps to ExtraHosts in the docker container create // command and the --add-host option to docker run. // // This parameter isn't supported for Windows containers or tasks that use the @@ -878,12 +878,12 @@ type ContainerDefinition struct { FirelensConfiguration *FirelensConfiguration // The container health check command and associated configuration parameters for - // the container. This parameter maps to HealthCheck in the docker conainer create - // command and the HEALTHCHECK parameter of docker run. + // the container. This parameter maps to HealthCheck in the docker container + // create command and the HEALTHCHECK parameter of docker run. HealthCheck *HealthCheck - // The hostname to use for your container. This parameter maps to Hostname in - // thethe docker conainer create command and the --hostname option to docker run. + // The hostname to use for your container. This parameter maps to Hostname in the + // docker container create command and the --hostname option to docker run. // // The hostname parameter is not supported if you're using the awsvpc network mode. Hostname *string @@ -893,7 +893,7 @@ type ContainerDefinition struct { // Other repositories are specified with either repository-url/image:tag or // repository-url/image@digest . Up to 255 letters (uppercase and lowercase), // numbers, hyphens, underscores, colons, periods, forward slashes, and number - // signs are allowed. This parameter maps to Image in the docker conainer create + // signs are allowed. This parameter maps to Image in the docker container create // command and the IMAGE parameter of docker run. // // - When a new task starts, the Amazon ECS container agent pulls the latest @@ -919,7 +919,7 @@ type ContainerDefinition struct { // When this parameter is true , you can deploy containerized applications that // require stdin or a tty to be allocated. This parameter maps to OpenStdin in the - // docker conainer create command and the --interactive option to docker run. + // docker container create command and the --interactive option to docker run. Interactive *bool // The links parameter allows containers to communicate with each other without @@ -927,7 +927,7 @@ type ContainerDefinition struct { // of a task definition is bridge . The name:internalName construct is analogous // to name:alias in Docker links. Up to 255 letters (uppercase and lowercase), // numbers, underscores, and hyphens are allowed.. This parameter maps to Links in - // the docker conainer create command and the --link option to docker run. + // the docker container create command and the --link option to docker run. // // This parameter is not supported for Windows containers. // @@ -947,7 +947,7 @@ type ContainerDefinition struct { // The log configuration specification for the container. // - // This parameter maps to LogConfig in the docker conainer create command and the + // This parameter maps to LogConfig in the docker container create command and the // --log-driver option to docker run. By default, containers use the same logging // driver that the Docker daemon uses. However the container can use a different // logging driver than the Docker daemon by specifying a log driver with this @@ -978,7 +978,7 @@ type ContainerDefinition struct { // attempts to exceed the memory specified here, the container is killed. The total // amount of memory reserved for all containers within a task must be lower than // the task memory value, if one is specified. This parameter maps to Memory in - // thethe docker conainer create command and the --memory option to docker run. + // the docker container create command and the --memory option to docker run. // // If using the Fargate launch type, this parameter is optional. // @@ -1002,8 +1002,8 @@ type ContainerDefinition struct { // to this soft limit. However, your container can consume more memory when it // needs to, up to either the hard limit specified with the memory parameter (if // applicable), or all of the available memory on the container instance, whichever - // comes first. This parameter maps to MemoryReservation in the the docker - // conainer create command and the --memory-reservation option to docker run. + // comes first. This parameter maps to MemoryReservation in the docker container + // create command and the --memory-reservation option to docker run. // // If a task-level memory value is not specified, you must specify a non-zero // integer for one or both of memory or memoryReservation in a container @@ -1029,8 +1029,8 @@ type ContainerDefinition struct { // The mount points for data volumes in your container. // - // This parameter maps to Volumes in the the docker conainer create command and - // the --volume option to docker run. + // This parameter maps to Volumes in the docker container create command and the + // --volume option to docker run. // // Windows containers can mount whole directories on the same drive as // $env:ProgramData . Windows containers can't mount directories on a different @@ -1041,7 +1041,7 @@ type ContainerDefinition struct { // task definition, the name of one container can be entered in the links of // another container to connect the containers. Up to 255 letters (uppercase and // lowercase), numbers, underscores, and hyphens are allowed. This parameter maps - // to name in tthe docker conainer create command and the --name option to docker + // to name in the docker container create command and the --name option to docker // run. Name *string @@ -1056,7 +1056,7 @@ type ContainerDefinition struct { // There's no loopback for port mappings on Windows, so you can't access a // container's mapped port from the host itself. // - // This parameter maps to PortBindings in the the docker conainer create command + // This parameter maps to PortBindings in the the docker container create command // and the --publish option to docker run. If the network mode of a task // definition is set to none , then you can't specify port mappings. If the network // mode of a task definition is set to host , then host ports must either be @@ -1072,18 +1072,18 @@ type ContainerDefinition struct { // When this parameter is true, the container is given elevated privileges on the // host container instance (similar to the root user). This parameter maps to - // Privileged in the the docker conainer create command and the --privileged - // option to docker run + // Privileged in the docker container create command and the --privileged option + // to docker run // // This parameter is not supported for Windows containers or tasks run on Fargate. Privileged *bool // When this parameter is true , a TTY is allocated. This parameter maps to Tty in - // tthe docker conainer create command and the --tty option to docker run. + // the docker container create command and the --tty option to docker run. PseudoTerminal *bool // When this parameter is true, the container is given read-only access to its - // root file system. This parameter maps to ReadonlyRootfs in the docker conainer + // root file system. This parameter maps to ReadonlyRootfs in the docker container // create command and the --read-only option to docker run. // // This parameter is not supported for Windows containers. @@ -1153,8 +1153,9 @@ type ContainerDefinition struct { // // - Windows platform version 1.0.0 or later. // - // The max stop timeout value is 120 seconds and if the parameter is not - // specified, the default value of 30 seconds is used. + // For tasks that use the Fargate launch type, the max stop timeout value is 120 + // seconds and if the parameter is not specified, the default value of 30 seconds + // is used. // // For tasks that use the EC2 launch type, if the stopTimeout parameter isn't // specified, the value set for the Amazon ECS container agent configuration @@ -1172,21 +1173,21 @@ type ContainerDefinition struct { // ecs-init . For more information, see [Amazon ECS-optimized Linux AMI] in the Amazon Elastic Container Service // Developer Guide. // - // The valid values are 2-120 seconds. + // The valid values for Fargate are 2-120 seconds. // // [Updating the Amazon ECS Container Agent]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html // [Amazon ECS-optimized Linux AMI]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html StopTimeout *int32 // A list of namespaced kernel parameters to set in the container. This parameter - // maps to Sysctls in tthe docker conainer create command and the --sysctl option + // maps to Sysctls in the docker container create command and the --sysctl option // to docker run. For example, you can configure net.ipv4.tcp_keepalive_time // setting to maintain longer lived connections. SystemControls []SystemControl // A list of ulimits to set in the container. If a ulimit value is specified in a // task definition, it overrides the default values set by Docker. This parameter - // maps to Ulimits in tthe docker conainer create command and the --ulimit option + // maps to Ulimits in the docker container create command and the --ulimit option // to docker run. Valid naming values are displayed in the [Ulimit]data type. // // Amazon ECS tasks hosted on Fargate use the default resource limit values set by @@ -1206,7 +1207,7 @@ type ContainerDefinition struct { Ulimits []Ulimit // The user to use inside the container. This parameter maps to User in the docker - // conainer create command and the --user option to docker run. + // container create command and the --user option to docker run. // // When running tasks using the host network mode, don't run containers using the // root user (UID 0). We recommend using a non-root user for better security. @@ -1230,12 +1231,12 @@ type ContainerDefinition struct { User *string // Data volumes to mount from another container. This parameter maps to VolumesFrom - // in tthe docker conainer create command and the --volumes-from option to docker + // in the docker container create command and the --volumes-from option to docker // run. VolumesFrom []VolumeFrom // The working directory to run commands inside the container in. This parameter - // maps to WorkingDir in the docker conainer create command and the --workdir + // maps to WorkingDir in the docker container create command and the --workdir // option to docker run. WorkingDirectory *string @@ -1790,12 +1791,17 @@ type DeploymentConfiguration struct { // value for a service using the REPLICA service scheduler is 200%. // // If a service is using either the blue/green ( CODE_DEPLOY ) or EXTERNAL - // deployment types and tasks that use the EC2 launch type, the maximum percent - // value is set to the default value and is used to define the upper limit on the - // number of the tasks in the service that remain in the RUNNING state while the - // container instances are in the DRAINING state. If the tasks in the service use - // the Fargate launch type, the maximum percent value is not used, although it is - // returned when describing your service. + // deployment types, and tasks in the service use the EC2 launch type, the maximum + // percent value is set to the default value. The maximum percent value is used to + // define the upper limit on the number of the tasks in the service that remain in + // the RUNNING state while the container instances are in the DRAINING state. + // + // You can't specify a custom maximumPercent value for a service that uses either + // the blue/green ( CODE_DEPLOY ) or EXTERNAL deployment types and has tasks that + // use the EC2 launch type. + // + // If the tasks in the service use the Fargate launch type, the maximum percent + // value is not used, although it is returned when describing your service. MaximumPercent *int32 // If a service is using the rolling update ( ECS ) deployment type, the @@ -1846,12 +1852,19 @@ type DeploymentConfiguration struct { // // If a service is using either the blue/green ( CODE_DEPLOY ) or EXTERNAL // deployment types and is running tasks that use the EC2 launch type, the minimum - // healthy percent value is set to the default value and is used to define the - // lower limit on the number of the tasks in the service that remain in the RUNNING - // state while the container instances are in the DRAINING state. If a service is - // using either the blue/green ( CODE_DEPLOY ) or EXTERNAL deployment types and is - // running tasks that use the Fargate launch type, the minimum healthy percent - // value is not used, although it is returned when describing your service. + // healthy percent value is set to the default value. The minimum healthy percent + // value is used to define the lower limit on the number of the tasks in the + // service that remain in the RUNNING state while the container instances are in + // the DRAINING state. + // + // You can't specify a custom minimumHealthyPercent value for a service that uses + // either the blue/green ( CODE_DEPLOY ) or EXTERNAL deployment types and has + // tasks that use the EC2 launch type. + // + // If a service is using either the blue/green ( CODE_DEPLOY ) or EXTERNAL + // deployment types and is running tasks that use the Fargate launch type, the + // minimum healthy percent value is not used, although it is returned when + // describing your service. MinimumHealthyPercent *int32 noSmithyDocumentSerde @@ -1934,7 +1947,7 @@ type DockerVolumeConfiguration struct { // installed using the Docker plugin CLI, use docker plugin ls to retrieve the // driver name from your container instance. If the driver was installed using // another method, use Docker plugin discovery to retrieve the driver name. This - // parameter maps to Driver in the docker conainer create command and the xxdriver + // parameter maps to Driver in the docker container create command and the xxdriver // option to docker volume create. Driver *string @@ -1944,7 +1957,7 @@ type DockerVolumeConfiguration struct { DriverOpts map[string]string // Custom metadata to add to your Docker volume. This parameter maps to Labels in - // the docker conainer create command and the xxlabel option to docker volume + // the docker container create command and the xxlabel option to docker volume // create. Labels map[string]string @@ -2402,7 +2415,7 @@ type HealthCheck struct { // CMD-SHELL, curl -f http://localhost/ || exit 1 // // An exit code of 0 indicates success, and non-zero exit code indicates failure. - // For more information, see HealthCheck in tthe docker conainer create command + // For more information, see HealthCheck in the docker container create command // // This member is required. Command []string @@ -2539,7 +2552,7 @@ type KernelCapabilities struct { // The Linux capabilities for the container that have been added to the default // configuration provided by Docker. This parameter maps to CapAdd in the docker - // conainer create command and the --cap-add option to docker run. + // container create command and the --cap-add option to docker run. // // Tasks launched on Fargate only support adding the SYS_PTRACE kernel capability. // @@ -2555,7 +2568,7 @@ type KernelCapabilities struct { // The Linux capabilities for the container that have been removed from the // default configuration provided by Docker. This parameter maps to CapDrop in the - // docker conainer create command and the --cap-drop option to docker run. + // docker container create command and the --cap-drop option to docker run. // // Valid values: "ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | // "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" @@ -2598,7 +2611,7 @@ type LinuxParameters struct { Capabilities *KernelCapabilities // Any host devices to expose to the container. This parameter maps to Devices in - // tthe docker conainer create command and the --device option to docker run. + // the docker container create command and the --device option to docker run. // // If you're using tasks that use the Fargate launch type, the devices parameter // isn't supported. @@ -2725,7 +2738,7 @@ type LoadBalancer struct { } // The log configuration for the container. This parameter maps to LogConfig in -// the docker conainer create command and the --log-driver option to docker run. +// the docker container create command and the --log-driver option to docker run. // // By default, containers use the same logging driver that the Docker daemon uses. // However, the container might use a different logging driver than the Docker @@ -3115,7 +3128,7 @@ type PlatformDevice struct { // must be the same value as the containerPort . // // Most fields of this parameter ( containerPort , hostPort , protocol ) maps to -// PortBindings in the docker conainer create command and the --publish option to +// PortBindings in the docker container create command and the --publish option to // docker run . If the network mode of a task definition is set to host , host // ports must either be undefined or match the container port in the port mapping. // @@ -3764,7 +3777,7 @@ type ServiceConnectConfiguration struct { Enabled bool // The log configuration for the container. This parameter maps to LogConfig in - // the docker conainer create command and the --log-driver option to docker run. + // the docker container create command and the --log-driver option to docker run. // // By default, containers use the same logging driver that the Docker daemon uses. // However, the container might use a different logging driver than the Docker @@ -4200,7 +4213,7 @@ type Setting struct { } // A list of namespaced kernel parameters to set in the container. This parameter -// maps to Sysctls in tthe docker conainer create command and the --sysctl option +// maps to Sysctls in the docker container create command and the --sysctl option // to docker run. For example, you can configure net.ipv4.tcp_keepalive_time // setting to maintain longer lived connections. // @@ -4554,9 +4567,9 @@ type Task struct { // to launching the task definition through an Amazon ECS service or task. type TaskDefinition struct { - // The task launch types the task definition validated against during task - // definition registration. For more information, see [Amazon ECS launch types]in the Amazon Elastic - // Container Service Developer Guide. + // Amazon ECS validates the task definition parameters with those supported by the + // launch type. For more information, see [Amazon ECS launch types]in the Amazon Elastic Container Service + // Developer Guide. // // [Amazon ECS launch types]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Compatibilities []Compatibility @@ -5316,7 +5329,8 @@ type Tmpfs struct { // You can specify the ulimit settings for a container in a task definition. type Ulimit struct { - // The hard limit for the ulimit type. + // The hard limit for the ulimit type. The value can be specified in bytes, + // seconds, or as a count, depending on the type of the ulimit . // // This member is required. HardLimit int32 @@ -5326,7 +5340,8 @@ type Ulimit struct { // This member is required. Name UlimitName - // The soft limit for the ulimit type. + // The soft limit for the ulimit type. The value can be specified in bytes, + // seconds, or as a count, depending on the type of the ulimit . // // This member is required. SoftLimit int32 diff --git a/service/lambda/api_op_DeleteResourcePolicy.go b/service/lambda/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..00578fe3446 --- /dev/null +++ b/service/lambda/api_op_DeleteResourcePolicy.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// Deletes a [resource-based policy] from a function. +// +// [resource-based policy]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // The Amazon Resource Name (ARN) of the function you want to delete the policy + // from. You can use either a qualified or an unqualified ARN, but the value you + // specify must be a complete ARN and wildcard characters are not accepted. + // + // This member is required. + ResourceArn *string + + // Delete the existing policy only if its revision ID matches the string you + // specify. To find the revision ID of the policy currently attached to your + // function, use the GetResourcePolicyaction. + RevisionId *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePolicy"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(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_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResourcePolicy", + } +} diff --git a/service/lambda/api_op_GetPublicAccessBlockConfig.go b/service/lambda/api_op_GetPublicAccessBlockConfig.go new file mode 100644 index 00000000000..16d0bd543e7 --- /dev/null +++ b/service/lambda/api_op_GetPublicAccessBlockConfig.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieve the public-access settings for a function. +func (c *Client) GetPublicAccessBlockConfig(ctx context.Context, params *GetPublicAccessBlockConfigInput, optFns ...func(*Options)) (*GetPublicAccessBlockConfigOutput, error) { + if params == nil { + params = &GetPublicAccessBlockConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPublicAccessBlockConfig", params, optFns, c.addOperationGetPublicAccessBlockConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPublicAccessBlockConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPublicAccessBlockConfigInput struct { + + // The Amazon Resource Name (ARN) of the function you want to retrieve + // public-access settings for. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type GetPublicAccessBlockConfigOutput struct { + + // The public-access settings configured for the function you specified + PublicAccessBlockConfig *types.PublicAccessBlockConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPublicAccessBlockConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPublicAccessBlockConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPublicAccessBlockConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPublicAccessBlockConfig"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetPublicAccessBlockConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPublicAccessBlockConfig(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_opGetPublicAccessBlockConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPublicAccessBlockConfig", + } +} diff --git a/service/lambda/api_op_GetResourcePolicy.go b/service/lambda/api_op_GetResourcePolicy.go new file mode 100644 index 00000000000..b91427e2125 --- /dev/null +++ b/service/lambda/api_op_GetResourcePolicy.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// Retrieves the [resource-based policy] attached to a function. +// +// [resource-based policy]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html +func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { + if params == nil { + params = &GetResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePolicyInput struct { + + // The Amazon Resource Name (ARN) of the function you want to retrieve the policy + // for. You can use either a qualified or an unqualified ARN, but the value you + // specify must be a complete ARN and wildcard characters are not accepted. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type GetResourcePolicyOutput struct { + + // The resource-based policy attached to the function you specified. + Policy *string + + // The revision ID of the policy. + RevisionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourcePolicy"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(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_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResourcePolicy", + } +} diff --git a/service/lambda/api_op_PutPublicAccessBlockConfig.go b/service/lambda/api_op_PutPublicAccessBlockConfig.go new file mode 100644 index 00000000000..13b609062b9 --- /dev/null +++ b/service/lambda/api_op_PutPublicAccessBlockConfig.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Configure your function's public-access settings. +// +// To control public access to a Lambda function, you can choose whether to allow +// the creation of [resource-based policies]that allow public access to that function. You can also block +// public access to a function, even if it has an existing resource-based policy +// that allows it. +// +// [resource-based policies]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html +func (c *Client) PutPublicAccessBlockConfig(ctx context.Context, params *PutPublicAccessBlockConfigInput, optFns ...func(*Options)) (*PutPublicAccessBlockConfigOutput, error) { + if params == nil { + params = &PutPublicAccessBlockConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutPublicAccessBlockConfig", params, optFns, c.addOperationPutPublicAccessBlockConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutPublicAccessBlockConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutPublicAccessBlockConfigInput struct { + + // An object defining the public-access settings you want to apply. + // + // To block the creation of resource-based policies that would grant public access + // to your function, set BlockPublicPolicy to true . To allow the creation of + // resource-based policies that would grant public access to your function, set + // BlockPublicPolicy to false . + // + // To block public access to your function, even if its resource-based policy + // allows it, set RestrictPublicResource to true . To allow public access to a + // function with a resource-based policy that permits it, set + // RestrictPublicResource to false . + // + // The default setting for both BlockPublicPolicy and RestrictPublicResource is + // true . + // + // This member is required. + PublicAccessBlockConfig *types.PublicAccessBlockConfig + + // The Amazon Resource Name (ARN) of the function you want to configure + // public-access settings for. Public-access settings are applied at the function + // level, so you can't apply different settings to function versions or aliases. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type PutPublicAccessBlockConfigOutput struct { + + // The public-access settings Lambda applied to your function. + PublicAccessBlockConfig *types.PublicAccessBlockConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutPublicAccessBlockConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutPublicAccessBlockConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutPublicAccessBlockConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutPublicAccessBlockConfig"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpPutPublicAccessBlockConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutPublicAccessBlockConfig(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_opPutPublicAccessBlockConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutPublicAccessBlockConfig", + } +} diff --git a/service/lambda/api_op_PutResourcePolicy.go b/service/lambda/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..ca23b0a10b1 --- /dev/null +++ b/service/lambda/api_op_PutResourcePolicy.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// Adds a [resource-based policy] to a function. You can use resource-based policies to grant access to +// other [Amazon Web Services accounts], [organizations], or [services]. Resource-based policies apply to a single function, version, or +// alias. +// +// Adding a resource-based policy using this API action replaces any existing +// policy you've previously created. This means that if you've previously added +// resource-based permissions to a function using the AddPermissionaction, those permissions +// will be overwritten by your new policy. +// +// [resource-based policy]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html +// [Amazon Web Services accounts]: https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-cross-account.html +// [organizations]: https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-organization.html +// [services]: https://docs.aws.amazon.com/lambda/latest/dg/permissions-function-services.html +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // The JSON resource-based policy you want to add to your function. + // + // To learn more about creating resource-based policies for controlling access to + // Lambda, see [Working with resource-based IAM policies in Lambda]in the Lambda Developer Guide. + // + // [Working with resource-based IAM policies in Lambda]: https://docs.aws.amazon.com/ + // + // This member is required. + Policy *string + + // The Amazon Resource Name (ARN) of the function you want to add the policy to. + // You can use either a qualified or an unqualified ARN, but the value you specify + // must be a complete ARN and wildcard characters are not accepted. + // + // This member is required. + ResourceArn *string + + // Replace the existing policy only if its revision ID matches the string you + // specify. To find the revision ID of the policy currently attached to your + // function, use the GetResourcePolicyaction. + RevisionId *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + + // The policy Lambda added to your function. + Policy *string + + // The revision ID of the policy Lambda added to your function. + RevisionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePolicy"); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(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_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutResourcePolicy", + } +} diff --git a/service/lambda/deserializers.go b/service/lambda/deserializers.go index f71b48d347a..979715f6a85 100644 --- a/service/lambda/deserializers.go +++ b/service/lambda/deserializers.go @@ -3092,6 +3092,110 @@ func awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response } } +type awsRestjson1_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteResourcePolicy) 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_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + 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 awsRestjson1_deserializeOpErrorDeleteResourcePolicy(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("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpGetAccountSettings struct { } @@ -6529,14 +6633,14 @@ func awsRestjson1_deserializeOpDocumentGetProvisionedConcurrencyConfigOutput(v * return nil } -type awsRestjson1_deserializeOpGetRuntimeManagementConfig struct { +type awsRestjson1_deserializeOpGetPublicAccessBlockConfig struct { } -func (*awsRestjson1_deserializeOpGetRuntimeManagementConfig) ID() string { +func (*awsRestjson1_deserializeOpGetPublicAccessBlockConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPublicAccessBlockConfig) 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) @@ -6550,9 +6654,9 @@ func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPublicAccessBlockConfig(response, &metadata) } - output := &GetRuntimeManagementConfigOutput{} + output := &GetPublicAccessBlockConfigOutput{} out.Result = output var buff [1024]byte @@ -6573,7 +6677,7 @@ func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPublicAccessBlockConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6586,7 +6690,7 @@ func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPublicAccessBlockConfig(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)} @@ -6649,7 +6753,7 @@ func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response *smithyh } } -func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetRuntimeManagementConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPublicAccessBlockConfigOutput(v **GetPublicAccessBlockConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6662,40 +6766,18 @@ func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetR return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetRuntimeManagementConfigOutput + var sv *GetPublicAccessBlockConfigOutput if *v == nil { - sv = &GetRuntimeManagementConfigOutput{} + sv = &GetPublicAccessBlockConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) - } - sv.FunctionArn = ptr.String(jtv) - } - - case "RuntimeVersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value) - } - sv.RuntimeVersionArn = ptr.String(jtv) - } - - case "UpdateRuntimeOn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpdateRuntimeOn to be of type string, got %T instead", value) - } - sv.UpdateRuntimeOn = types.UpdateRuntimeOn(jtv) + case "PublicAccessBlockConfig": + if err := awsRestjson1_deserializeDocumentPublicAccessBlockConfig(&sv.PublicAccessBlockConfig, value); err != nil { + return err } default: @@ -6707,14 +6789,14 @@ func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetR return nil } -type awsRestjson1_deserializeOpInvoke struct { +type awsRestjson1_deserializeOpGetResourcePolicy struct { } -func (*awsRestjson1_deserializeOpInvoke) ID() string { +func (*awsRestjson1_deserializeOpGetResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpInvoke) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetResourcePolicy) 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) @@ -6728,25 +6810,43 @@ func (m *awsRestjson1_deserializeOpInvoke) HandleDeserialize(ctx context.Context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorInvoke(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicy(response, &metadata) } - output := &InvokeOutput{} + output := &GetResourcePolicyOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsInvokeOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + 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_deserializeOpDocumentInvokeOutput(output, response.Body, response.ContentLength) + err = awsRestjson1_deserializeOpDocumentGetResourcePolicyOutput(&output, shape) if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + 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_deserializeOpErrorInvoke(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetResourcePolicy(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)} @@ -6787,96 +6887,18 @@ func awsRestjson1_deserializeOpErrorInvoke(response *smithyhttp.Response, metada } switch { - case strings.EqualFold("EC2AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorEC2AccessDeniedException(response, errorBody) - - case strings.EqualFold("EC2ThrottledException", errorCode): - return awsRestjson1_deserializeErrorEC2ThrottledException(response, errorBody) - - case strings.EqualFold("EC2UnexpectedException", errorCode): - return awsRestjson1_deserializeErrorEC2UnexpectedException(response, errorBody) - - case strings.EqualFold("EFSIOException", errorCode): - return awsRestjson1_deserializeErrorEFSIOException(response, errorBody) - - case strings.EqualFold("EFSMountConnectivityException", errorCode): - return awsRestjson1_deserializeErrorEFSMountConnectivityException(response, errorBody) - - case strings.EqualFold("EFSMountFailureException", errorCode): - return awsRestjson1_deserializeErrorEFSMountFailureException(response, errorBody) - - case strings.EqualFold("EFSMountTimeoutException", errorCode): - return awsRestjson1_deserializeErrorEFSMountTimeoutException(response, errorBody) - - case strings.EqualFold("ENILimitReachedException", errorCode): - return awsRestjson1_deserializeErrorENILimitReachedException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("InvalidRequestContentException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) - - case strings.EqualFold("InvalidRuntimeException", errorCode): - return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) - - case strings.EqualFold("InvalidSecurityGroupIDException", errorCode): - return awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response, errorBody) - - case strings.EqualFold("InvalidSubnetIDException", errorCode): - return awsRestjson1_deserializeErrorInvalidSubnetIDException(response, errorBody) - - case strings.EqualFold("InvalidZipFileException", errorCode): - return awsRestjson1_deserializeErrorInvalidZipFileException(response, errorBody) - - case strings.EqualFold("KMSAccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorKMSAccessDeniedException(response, errorBody) - - case strings.EqualFold("KMSDisabledException", errorCode): - return awsRestjson1_deserializeErrorKMSDisabledException(response, errorBody) - - case strings.EqualFold("KMSInvalidStateException", errorCode): - return awsRestjson1_deserializeErrorKMSInvalidStateException(response, errorBody) - - case strings.EqualFold("KMSNotFoundException", errorCode): - return awsRestjson1_deserializeErrorKMSNotFoundException(response, errorBody) - - case strings.EqualFold("RecursiveInvocationException", errorCode): - return awsRestjson1_deserializeErrorRecursiveInvocationException(response, errorBody) - - case strings.EqualFold("RequestTooLargeException", errorCode): - return awsRestjson1_deserializeErrorRequestTooLargeException(response, errorBody) - - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceNotReadyException", errorCode): - return awsRestjson1_deserializeErrorResourceNotReadyException(response, errorBody) - case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) - case strings.EqualFold("SnapStartException", errorCode): - return awsRestjson1_deserializeErrorSnapStartException(response, errorBody) - - case strings.EqualFold("SnapStartNotReadyException", errorCode): - return awsRestjson1_deserializeErrorSnapStartNotReadyException(response, errorBody) - - case strings.EqualFold("SnapStartTimeoutException", errorCode): - return awsRestjson1_deserializeErrorSnapStartTimeoutException(response, errorBody) - - case strings.EqualFold("SubnetIPAddressLimitReachedException", errorCode): - return awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnsupportedMediaTypeException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6887,60 +6909,63 @@ func awsRestjson1_deserializeOpErrorInvoke(response *smithyhttp.Response, metada } } -func awsRestjson1_deserializeOpHttpBindingsInvokeOutput(v *InvokeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, value interface{}) error { if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) } - - if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ExecutedVersion = ptr.String(headerValues[0]) + if value == nil { + return nil } - if headerValues := response.Header.Values("X-Amz-Function-Error"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.FunctionError = ptr.String(headerValues[0]) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - if headerValues := response.Header.Values("X-Amz-Log-Result"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.LogResult = ptr.String(headerValues[0]) + var sv *GetResourcePolicyOutput + if *v == nil { + sv = &GetResourcePolicyOutput{} + } else { + sv = *v } - v.StatusCode = int32(response.StatusCode) + for key, value := range shape { + switch key { + case "Policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourcePolicy to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } - return nil -} -func awsRestjson1_deserializeOpDocumentInvokeOutput(v *InvokeOutput, body io.ReadCloser, contentLength int64) error { - if v == nil { - return fmt.Errorf("unsupported deserialization of nil %T", v) - } + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RevisionId to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } - var buf bytes.Buffer - if contentLength > 0 { - buf.Grow(int(contentLength)) - } else { - buf.Grow(512) - } + default: + _, _ = key, value - _, err := buf.ReadFrom(body) - if err != nil { - return err - } - if buf.Len() > 0 { - v.Payload = buf.Bytes() + } } + *v = sv return nil } -type awsRestjson1_deserializeOpInvokeAsync struct { +type awsRestjson1_deserializeOpGetRuntimeManagementConfig struct { } -func (*awsRestjson1_deserializeOpInvokeAsync) ID() string { +func (*awsRestjson1_deserializeOpGetRuntimeManagementConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpInvokeAsync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) 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) @@ -6954,20 +6979,43 @@ func (m *awsRestjson1_deserializeOpInvokeAsync) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorInvokeAsync(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response, &metadata) } - output := &InvokeAsyncOutput{} + output := &GetRuntimeManagementConfigOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(output, response) + 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_deserializeOpDocumentGetRuntimeManagementConfigOutput(&output, shape) if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + 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_deserializeOpErrorInvokeAsync(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(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)} @@ -7008,14 +7056,8 @@ func awsRestjson1_deserializeOpErrorInvokeAsync(response *smithyhttp.Response, m } switch { - case strings.EqualFold("InvalidRequestContentException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) - - case strings.EqualFold("InvalidRuntimeException", errorCode): - return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) - - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7023,6 +7065,9 @@ func awsRestjson1_deserializeOpErrorInvokeAsync(response *smithyhttp.Response, m case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7033,24 +7078,72 @@ func awsRestjson1_deserializeOpErrorInvokeAsync(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(v *InvokeAsyncOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetRuntimeManagementConfigOutput, value interface{}) error { if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - v.Status = int32(response.StatusCode) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetRuntimeManagementConfigOutput + if *v == nil { + sv = &GetRuntimeManagementConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "RuntimeVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value) + } + sv.RuntimeVersionArn = ptr.String(jtv) + } + + case "UpdateRuntimeOn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateRuntimeOn to be of type string, got %T instead", value) + } + sv.UpdateRuntimeOn = types.UpdateRuntimeOn(jtv) + } + + default: + _, _ = key, value + } + } + *v = sv return nil } -type awsRestjson1_deserializeOpInvokeWithResponseStream struct { +type awsRestjson1_deserializeOpInvoke struct { } -func (*awsRestjson1_deserializeOpInvokeWithResponseStream) ID() string { +func (*awsRestjson1_deserializeOpInvoke) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpInvoke) 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) @@ -7064,20 +7157,25 @@ func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorInvoke(response, &metadata) } - output := &InvokeWithResponseStreamOutput{} + output := &InvokeOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsInvokeOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } + err = awsRestjson1_deserializeOpDocumentInvokeOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorInvoke(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)} @@ -7218,7 +7316,7 @@ func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *InvokeWithResponseStreamOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsInvokeOutput(v *InvokeOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -7228,24 +7326,50 @@ func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *Inv v.ExecutedVersion = ptr.String(headerValues[0]) } - if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + if headerValues := response.Header.Values("X-Amz-Function-Error"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ResponseStreamContentType = ptr.String(headerValues[0]) + v.FunctionError = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("X-Amz-Log-Result"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.LogResult = ptr.String(headerValues[0]) } v.StatusCode = int32(response.StatusCode) return nil } +func awsRestjson1_deserializeOpDocumentInvokeOutput(v *InvokeOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } -type awsRestjson1_deserializeOpListAliases struct { + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Payload = buf.Bytes() + } + return nil } -func (*awsRestjson1_deserializeOpListAliases) ID() string { +type awsRestjson1_deserializeOpInvokeAsync struct { +} + +func (*awsRestjson1_deserializeOpInvokeAsync) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpInvokeAsync) 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) @@ -7259,43 +7383,20 @@ func (m *awsRestjson1_deserializeOpListAliases) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAliases(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorInvokeAsync(response, &metadata) } - output := &ListAliasesOutput{} + output := &InvokeAsyncOutput{} 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_deserializeOpDocumentListAliasesOutput(&output, shape) + err = awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(output, response) 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, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorInvokeAsync(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)} @@ -7336,8 +7437,14 @@ func awsRestjson1_deserializeOpErrorListAliases(response *smithyhttp.Response, m } switch { - case strings.EqualFold("InvalidParameterValueException", errorCode): - return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidRequestContentException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) + + case strings.EqualFold("InvalidRuntimeException", errorCode): + return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7345,9 +7452,6 @@ func awsRestjson1_deserializeOpErrorListAliases(response *smithyhttp.Response, m case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7358,59 +7462,24 @@ func awsRestjson1_deserializeOpErrorListAliases(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(v *InvokeAsyncOutput, response *smithyhttp.Response) 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 *ListAliasesOutput - if *v == nil { - sv = &ListAliasesOutput{} - } else { - sv = *v + return fmt.Errorf("unsupported deserialization for nil %T", v) } - for key, value := range shape { - switch key { - case "Aliases": - if err := awsRestjson1_deserializeDocumentAliasList(&sv.Aliases, value); err != nil { - return err - } - - case "NextMarker": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextMarker = ptr.String(jtv) - } - - default: - _, _ = key, value + v.Status = int32(response.StatusCode) - } - } - *v = sv return nil } -type awsRestjson1_deserializeOpListCodeSigningConfigs struct { +type awsRestjson1_deserializeOpInvokeWithResponseStream struct { } -func (*awsRestjson1_deserializeOpListCodeSigningConfigs) ID() string { +func (*awsRestjson1_deserializeOpInvokeWithResponseStream) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) 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) @@ -7424,43 +7493,20 @@ func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response, &metadata) } - output := &ListCodeSigningConfigsOutput{} + output := &InvokeWithResponseStreamOutput{} 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_deserializeOpDocumentListCodeSigningConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(output, response) 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, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(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)} @@ -7501,12 +7547,96 @@ func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response *smithyhttp. } switch { + case strings.EqualFold("EC2AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorEC2AccessDeniedException(response, errorBody) + + case strings.EqualFold("EC2ThrottledException", errorCode): + return awsRestjson1_deserializeErrorEC2ThrottledException(response, errorBody) + + case strings.EqualFold("EC2UnexpectedException", errorCode): + return awsRestjson1_deserializeErrorEC2UnexpectedException(response, errorBody) + + case strings.EqualFold("EFSIOException", errorCode): + return awsRestjson1_deserializeErrorEFSIOException(response, errorBody) + + case strings.EqualFold("EFSMountConnectivityException", errorCode): + return awsRestjson1_deserializeErrorEFSMountConnectivityException(response, errorBody) + + case strings.EqualFold("EFSMountFailureException", errorCode): + return awsRestjson1_deserializeErrorEFSMountFailureException(response, errorBody) + + case strings.EqualFold("EFSMountTimeoutException", errorCode): + return awsRestjson1_deserializeErrorEFSMountTimeoutException(response, errorBody) + + case strings.EqualFold("ENILimitReachedException", errorCode): + return awsRestjson1_deserializeErrorENILimitReachedException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("InvalidRequestContentException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) + + case strings.EqualFold("InvalidRuntimeException", errorCode): + return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) + + case strings.EqualFold("InvalidSecurityGroupIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response, errorBody) + + case strings.EqualFold("InvalidSubnetIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSubnetIDException(response, errorBody) + + case strings.EqualFold("InvalidZipFileException", errorCode): + return awsRestjson1_deserializeErrorInvalidZipFileException(response, errorBody) + + case strings.EqualFold("KMSAccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorKMSAccessDeniedException(response, errorBody) + + case strings.EqualFold("KMSDisabledException", errorCode): + return awsRestjson1_deserializeErrorKMSDisabledException(response, errorBody) + + case strings.EqualFold("KMSInvalidStateException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidStateException(response, errorBody) + + case strings.EqualFold("KMSNotFoundException", errorCode): + return awsRestjson1_deserializeErrorKMSNotFoundException(response, errorBody) + + case strings.EqualFold("RecursiveInvocationException", errorCode): + return awsRestjson1_deserializeErrorRecursiveInvocationException(response, errorBody) + + case strings.EqualFold("RequestTooLargeException", errorCode): + return awsRestjson1_deserializeErrorRequestTooLargeException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceNotReadyException", errorCode): + return awsRestjson1_deserializeErrorResourceNotReadyException(response, errorBody) + case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) + case strings.EqualFold("SnapStartException", errorCode): + return awsRestjson1_deserializeErrorSnapStartException(response, errorBody) + + case strings.EqualFold("SnapStartNotReadyException", errorCode): + return awsRestjson1_deserializeErrorSnapStartNotReadyException(response, errorBody) + + case strings.EqualFold("SnapStartTimeoutException", errorCode): + return awsRestjson1_deserializeErrorSnapStartTimeoutException(response, errorBody) + + case strings.EqualFold("SubnetIPAddressLimitReachedException", errorCode): + return awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnsupportedMediaTypeException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7517,59 +7647,34 @@ func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCodeSigningConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *InvokeWithResponseStreamOutput, response *smithyhttp.Response) error { if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil + return fmt.Errorf("unsupported deserialization for nil %T", v) } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ExecutedVersion = ptr.String(headerValues[0]) } - var sv *ListCodeSigningConfigsOutput - if *v == nil { - sv = &ListCodeSigningConfigsOutput{} - } else { - sv = *v + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ResponseStreamContentType = ptr.String(headerValues[0]) } - for key, value := range shape { - switch key { - case "CodeSigningConfigs": - if err := awsRestjson1_deserializeDocumentCodeSigningConfigList(&sv.CodeSigningConfigs, value); err != nil { - return err - } - - case "NextMarker": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextMarker = ptr.String(jtv) - } - - default: - _, _ = key, value + v.StatusCode = int32(response.StatusCode) - } - } - *v = sv return nil } -type awsRestjson1_deserializeOpListEventSourceMappings struct { +type awsRestjson1_deserializeOpListAliases struct { } -func (*awsRestjson1_deserializeOpListEventSourceMappings) ID() string { +func (*awsRestjson1_deserializeOpListAliases) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAliases) 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) @@ -7583,9 +7688,9 @@ func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEventSourceMappings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAliases(response, &metadata) } - output := &ListEventSourceMappingsOutput{} + output := &ListAliasesOutput{} out.Result = output var buff [1024]byte @@ -7606,7 +7711,7 @@ func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAliasesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7619,7 +7724,7 @@ func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEventSourceMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAliases(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)} @@ -7682,7 +7787,7 @@ func awsRestjson1_deserializeOpErrorListEventSourceMappings(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEventSourceMappingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7695,17 +7800,17 @@ func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEve return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEventSourceMappingsOutput + var sv *ListAliasesOutput if *v == nil { - sv = &ListEventSourceMappingsOutput{} + sv = &ListAliasesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EventSourceMappings": - if err := awsRestjson1_deserializeDocumentEventSourceMappingsList(&sv.EventSourceMappings, value); err != nil { + case "Aliases": + if err := awsRestjson1_deserializeDocumentAliasList(&sv.Aliases, value); err != nil { return err } @@ -7727,14 +7832,14 @@ func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEve return nil } -type awsRestjson1_deserializeOpListFunctionEventInvokeConfigs struct { +type awsRestjson1_deserializeOpListCodeSigningConfigs struct { } -func (*awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) ID() string { +func (*awsRestjson1_deserializeOpListCodeSigningConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) 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) @@ -7748,9 +7853,9 @@ func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response, &metadata) } - output := &ListFunctionEventInvokeConfigsOutput{} + output := &ListCodeSigningConfigsOutput{} out.Result = output var buff [1024]byte @@ -7771,7 +7876,7 @@ func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7784,7 +7889,7 @@ func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(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)} @@ -7828,15 +7933,9 @@ func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response *smi case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7847,7 +7946,7 @@ func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response *smi } } -func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v **ListFunctionEventInvokeConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCodeSigningConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7860,17 +7959,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionEventInvokeConfigsOutput + var sv *ListCodeSigningConfigsOutput if *v == nil { - sv = &ListFunctionEventInvokeConfigsOutput{} + sv = &ListCodeSigningConfigsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionEventInvokeConfigs": - if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(&sv.FunctionEventInvokeConfigs, value); err != nil { + case "CodeSigningConfigs": + if err := awsRestjson1_deserializeDocumentCodeSigningConfigList(&sv.CodeSigningConfigs, value); err != nil { return err } @@ -7892,14 +7991,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v ** return nil } -type awsRestjson1_deserializeOpListFunctions struct { +type awsRestjson1_deserializeOpListEventSourceMappings struct { } -func (*awsRestjson1_deserializeOpListFunctions) ID() string { +func (*awsRestjson1_deserializeOpListEventSourceMappings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEventSourceMappings) 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) @@ -7913,9 +8012,9 @@ func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFunctions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEventSourceMappings(response, &metadata) } - output := &ListFunctionsOutput{} + output := &ListEventSourceMappingsOutput{} out.Result = output var buff [1024]byte @@ -7936,7 +8035,7 @@ func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7949,7 +8048,7 @@ func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEventSourceMappings(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)} @@ -7993,6 +8092,9 @@ func awsRestjson1_deserializeOpErrorListFunctions(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) @@ -8009,7 +8111,7 @@ func awsRestjson1_deserializeOpErrorListFunctions(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEventSourceMappingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8022,17 +8124,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionsOutput + var sv *ListEventSourceMappingsOutput if *v == nil { - sv = &ListFunctionsOutput{} + sv = &ListEventSourceMappingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Functions": - if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Functions, value); err != nil { + case "EventSourceMappings": + if err := awsRestjson1_deserializeDocumentEventSourceMappingsList(&sv.EventSourceMappings, value); err != nil { return err } @@ -8054,14 +8156,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutp return nil } -type awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig struct { +type awsRestjson1_deserializeOpListFunctionEventInvokeConfigs struct { } -func (*awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) ID() string { +func (*awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) 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) @@ -8075,9 +8177,9 @@ func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response, &metadata) } - output := &ListFunctionsByCodeSigningConfigOutput{} + output := &ListFunctionEventInvokeConfigsOutput{} out.Result = output var buff [1024]byte @@ -8098,7 +8200,7 @@ func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8111,7 +8213,7 @@ func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(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)} @@ -8161,6 +8263,9 @@ func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response *s case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8171,7 +8276,7 @@ func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response *s } } -func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v **ListFunctionsByCodeSigningConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v **ListFunctionEventInvokeConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8184,17 +8289,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionsByCodeSigningConfigOutput + var sv *ListFunctionEventInvokeConfigsOutput if *v == nil { - sv = &ListFunctionsByCodeSigningConfigOutput{} + sv = &ListFunctionEventInvokeConfigsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionArns": - if err := awsRestjson1_deserializeDocumentFunctionArnList(&sv.FunctionArns, value); err != nil { + case "FunctionEventInvokeConfigs": + if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(&sv.FunctionEventInvokeConfigs, value); err != nil { return err } @@ -8216,14 +8321,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v return nil } -type awsRestjson1_deserializeOpListFunctionUrlConfigs struct { +type awsRestjson1_deserializeOpListFunctions struct { } -func (*awsRestjson1_deserializeOpListFunctionUrlConfigs) ID() string { +func (*awsRestjson1_deserializeOpListFunctions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFunctions) 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) @@ -8237,9 +8342,9 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFunctions(response, &metadata) } - output := &ListFunctionUrlConfigsOutput{} + output := &ListFunctionsOutput{} out.Result = output var buff [1024]byte @@ -8260,7 +8365,7 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8273,7 +8378,7 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFunctions(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)} @@ -8317,9 +8422,6 @@ func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp. case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) @@ -8336,7 +8438,7 @@ func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunctionUrlConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8349,17 +8451,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionUrlConfigsOutput + var sv *ListFunctionsOutput if *v == nil { - sv = &ListFunctionUrlConfigsOutput{} + sv = &ListFunctionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionUrlConfigs": - if err := awsRestjson1_deserializeDocumentFunctionUrlConfigList(&sv.FunctionUrlConfigs, value); err != nil { + case "Functions": + if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Functions, value); err != nil { return err } @@ -8381,14 +8483,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunc return nil } -type awsRestjson1_deserializeOpListLayers struct { +type awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig struct { } -func (*awsRestjson1_deserializeOpListLayers) ID() string { +func (*awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) 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) @@ -8402,9 +8504,9 @@ func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLayers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response, &metadata) } - output := &ListLayersOutput{} + output := &ListFunctionsByCodeSigningConfigOutput{} out.Result = output var buff [1024]byte @@ -8425,7 +8527,7 @@ func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8438,7 +8540,7 @@ func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(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)} @@ -8482,12 +8584,12 @@ func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, me case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8498,7 +8600,7 @@ func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v **ListFunctionsByCodeSigningConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8511,17 +8613,17 @@ func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLayersOutput + var sv *ListFunctionsByCodeSigningConfigOutput if *v == nil { - sv = &ListLayersOutput{} + sv = &ListFunctionsByCodeSigningConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Layers": - if err := awsRestjson1_deserializeDocumentLayersList(&sv.Layers, value); err != nil { + case "FunctionArns": + if err := awsRestjson1_deserializeDocumentFunctionArnList(&sv.FunctionArns, value); err != nil { return err } @@ -8543,14 +8645,14 @@ func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, va return nil } -type awsRestjson1_deserializeOpListLayerVersions struct { +type awsRestjson1_deserializeOpListFunctionUrlConfigs struct { } -func (*awsRestjson1_deserializeOpListLayerVersions) ID() string { +func (*awsRestjson1_deserializeOpListFunctionUrlConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) 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) @@ -8564,9 +8666,9 @@ func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLayerVersions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response, &metadata) } - output := &ListLayerVersionsOutput{} + output := &ListFunctionUrlConfigsOutput{} out.Result = output var buff [1024]byte @@ -8587,7 +8689,7 @@ func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8600,7 +8702,7 @@ func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLayerVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(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)} @@ -8663,7 +8765,7 @@ func awsRestjson1_deserializeOpErrorListLayerVersions(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunctionUrlConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8676,17 +8778,17 @@ func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVers return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLayerVersionsOutput + var sv *ListFunctionUrlConfigsOutput if *v == nil { - sv = &ListLayerVersionsOutput{} + sv = &ListFunctionUrlConfigsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LayerVersions": - if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil { + case "FunctionUrlConfigs": + if err := awsRestjson1_deserializeDocumentFunctionUrlConfigList(&sv.FunctionUrlConfigs, value); err != nil { return err } @@ -8708,14 +8810,14 @@ func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVers return nil } -type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct { +type awsRestjson1_deserializeOpListLayers struct { } -func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string { +func (*awsRestjson1_deserializeOpListLayers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLayers) 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) @@ -8729,9 +8831,9 @@ func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLayers(response, &metadata) } - output := &ListProvisionedConcurrencyConfigsOutput{} + output := &ListLayersOutput{} out.Result = output var buff [1024]byte @@ -8752,7 +8854,7 @@ func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8765,7 +8867,7 @@ func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLayers(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)} @@ -8809,9 +8911,6 @@ func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response * case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceException", errorCode): return awsRestjson1_deserializeErrorServiceException(response, errorBody) @@ -8828,7 +8927,7 @@ func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response * } } -func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v **ListProvisionedConcurrencyConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8841,15 +8940,20 @@ func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProvisionedConcurrencyConfigsOutput + var sv *ListLayersOutput if *v == nil { - sv = &ListProvisionedConcurrencyConfigsOutput{} + sv = &ListLayersOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersList(&sv.Layers, value); err != nil { + return err + } + case "NextMarker": if value != nil { jtv, ok := value.(string) @@ -8859,11 +8963,6 @@ func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v sv.NextMarker = ptr.String(jtv) } - case "ProvisionedConcurrencyConfigs": - if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(&sv.ProvisionedConcurrencyConfigs, value); err != nil { - return err - } - default: _, _ = key, value @@ -8873,14 +8972,14 @@ func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v return nil } -type awsRestjson1_deserializeOpListTags struct { +type awsRestjson1_deserializeOpListLayerVersions struct { } -func (*awsRestjson1_deserializeOpListTags) ID() string { +func (*awsRestjson1_deserializeOpListLayerVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLayerVersions) 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) @@ -8894,9 +8993,9 @@ func (m *awsRestjson1_deserializeOpListTags) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTags(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLayerVersions(response, &metadata) } - output := &ListTagsOutput{} + output := &ListLayerVersionsOutput{} out.Result = output var buff [1024]byte @@ -8917,7 +9016,7 @@ func (m *awsRestjson1_deserializeOpListTags) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8930,7 +9029,7 @@ func (m *awsRestjson1_deserializeOpListTags) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLayerVersions(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)} @@ -8993,7 +9092,7 @@ func awsRestjson1_deserializeOpErrorListTags(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9006,20 +9105,29 @@ func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsOutput + var sv *ListLayerVersionsOutput if *v == nil { - sv = &ListTagsOutput{} + sv = &ListLayerVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + case "LayerVersions": + if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil { return err } + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + default: _, _ = key, value @@ -9029,14 +9137,14 @@ func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value return nil } -type awsRestjson1_deserializeOpListVersionsByFunction struct { +type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct { } -func (*awsRestjson1_deserializeOpListVersionsByFunction) ID() string { +func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListVersionsByFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) 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) @@ -9050,9 +9158,9 @@ func (m *awsRestjson1_deserializeOpListVersionsByFunction) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListVersionsByFunction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata) } - output := &ListVersionsByFunctionOutput{} + output := &ListProvisionedConcurrencyConfigsOutput{} out.Result = output var buff [1024]byte @@ -9073,7 +9181,7 @@ func (m *awsRestjson1_deserializeOpListVersionsByFunction) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9086,7 +9194,7 @@ func (m *awsRestjson1_deserializeOpListVersionsByFunction) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListVersionsByFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(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)} @@ -9149,7 +9257,7 @@ func awsRestjson1_deserializeOpErrorListVersionsByFunction(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVersionsByFunctionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v **ListProvisionedConcurrencyConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9162,9 +9270,9 @@ func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVers return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListVersionsByFunctionOutput + var sv *ListProvisionedConcurrencyConfigsOutput if *v == nil { - sv = &ListVersionsByFunctionOutput{} + sv = &ListProvisionedConcurrencyConfigsOutput{} } else { sv = *v } @@ -9180,8 +9288,8 @@ func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVers sv.NextMarker = ptr.String(jtv) } - case "Versions": - if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Versions, value); err != nil { + case "ProvisionedConcurrencyConfigs": + if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(&sv.ProvisionedConcurrencyConfigs, value); err != nil { return err } @@ -9194,14 +9302,14 @@ func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVers return nil } -type awsRestjson1_deserializeOpPublishLayerVersion struct { +type awsRestjson1_deserializeOpListTags struct { } -func (*awsRestjson1_deserializeOpPublishLayerVersion) ID() string { +func (*awsRestjson1_deserializeOpListTags) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTags) 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) @@ -9215,9 +9323,9 @@ func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPublishLayerVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTags(response, &metadata) } - output := &PublishLayerVersionOutput{} + output := &ListTagsOutput{} out.Result = output var buff [1024]byte @@ -9238,7 +9346,7 @@ func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9251,7 +9359,7 @@ func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTags(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)} @@ -9292,9 +9400,6 @@ func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Res } switch { - case strings.EqualFold("CodeStorageExceededException", errorCode): - return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -9317,7 +9422,7 @@ func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLayerVersionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9330,86 +9435,183 @@ func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLaye return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PublishLayerVersionOutput + var sv *ListTagsOutput if *v == nil { - sv = &PublishLayerVersionOutput{} + sv = &ListTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CompatibleArchitectures": - if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } - case "CompatibleRuntimes": - if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { - return err - } + default: + _, _ = key, value - case "Content": - if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil { - return err - } + } + } + *v = sv + return nil +} - case "CreatedDate": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - sv.CreatedDate = ptr.String(jtv) - } +type awsRestjson1_deserializeOpListVersionsByFunction struct { +} - case "Description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Description to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } +func (*awsRestjson1_deserializeOpListVersionsByFunction) ID() string { + return "OperationDeserializer" +} - case "LayerArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) - } - sv.LayerArn = ptr.String(jtv) - } +func (m *awsRestjson1_deserializeOpListVersionsByFunction) 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 "LayerVersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) - } - sv.LayerVersionArn = ptr.String(jtv) - } + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - case "LicenseInfo": + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListVersionsByFunction(response, &metadata) + } + output := &ListVersionsByFunctionOutput{} + 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_deserializeOpDocumentListVersionsByFunctionOutput(&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_deserializeOpErrorListVersionsByFunction(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("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVersionsByFunctionOutput, 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 *ListVersionsByFunctionOutput + if *v == nil { + sv = &ListVersionsByFunctionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextMarker": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.LicenseInfo = ptr.String(jtv) + sv.NextMarker = ptr.String(jtv) } - case "Version": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Version = i64 + case "Versions": + if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Versions, value); err != nil { + return err } default: @@ -9421,14 +9623,14 @@ func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLaye return nil } -type awsRestjson1_deserializeOpPublishVersion struct { +type awsRestjson1_deserializeOpPublishLayerVersion struct { } -func (*awsRestjson1_deserializeOpPublishVersion) ID() string { +func (*awsRestjson1_deserializeOpPublishLayerVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPublishVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPublishLayerVersion) 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) @@ -9442,9 +9644,9 @@ func (m *awsRestjson1_deserializeOpPublishVersion) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPublishVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPublishLayerVersion(response, &metadata) } - output := &PublishVersionOutput{} + output := &PublishLayerVersionOutput{} out.Result = output var buff [1024]byte @@ -9465,7 +9667,7 @@ func (m *awsRestjson1_deserializeOpPublishVersion) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPublishVersionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9478,7 +9680,7 @@ func (m *awsRestjson1_deserializeOpPublishVersion) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorPublishVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPublishLayerVersion(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)} @@ -9525,12 +9727,6 @@ func awsRestjson1_deserializeOpErrorPublishVersion(response *smithyhttp.Response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionFailedException", errorCode): - return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) - - case strings.EqualFold("ResourceConflictException", errorCode): - return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -9550,7 +9746,7 @@ func awsRestjson1_deserializeOpErrorPublishVersion(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLayerVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9563,30 +9759,263 @@ func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PublishVersionOutput + var sv *PublishLayerVersionOutput if *v == nil { - sv = &PublishVersionOutput{} + sv = &PublishLayerVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Architectures": - if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + case "CompatibleArchitectures": + if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { return err } - case "CodeSha256": + case "CompatibleRuntimes": + if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { + return err + } + + case "Content": + if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil { + return err + } + + case "CreatedDate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.CodeSha256 = ptr.String(jtv) + sv.CreatedDate = ptr.String(jtv) } - case "CodeSize": + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LayerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) + } + sv.LayerArn = ptr.String(jtv) + } + + case "LayerVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) + } + sv.LayerVersionArn = ptr.String(jtv) + } + + case "LicenseInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) + } + sv.LicenseInfo = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPublishVersion struct { +} + +func (*awsRestjson1_deserializeOpPublishVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPublishVersion) 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_deserializeOpErrorPublishVersion(response, &metadata) + } + output := &PublishVersionOutput{} + 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_deserializeOpDocumentPublishVersionOutput(&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_deserializeOpErrorPublishVersion(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("CodeStorageExceededException", errorCode): + return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOutput, 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 *PublishVersionOutput + if *v == nil { + sv = &PublishVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + return err + } + + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -9773,91 +10202,433 @@ func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOu sv.Runtime = types.Runtime(jtv) } - case "RuntimeVersionConfig": - if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { - return err - } + case "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + case "SnapStart": + if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { + return err + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected State to be of type string, got %T instead", value) + } + sv.State = types.State(jtv) + } + + case "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "StateReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) + } + sv.StateReasonCode = types.StateReasonCode(jtv) + } + + case "Timeout": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Timeout = ptr.Int32(int32(i64)) + } + + case "TracingConfig": + if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutFunctionCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) 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_deserializeOpErrorPutFunctionCodeSigningConfig(response, &metadata) + } + output := &PutFunctionCodeSigningConfigOutput{} + 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_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(&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_deserializeOpErrorPutFunctionCodeSigningConfig(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("CodeSigningConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(v **PutFunctionCodeSigningConfigOutput, 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 *PutFunctionCodeSigningConfigOutput + if *v == nil { + sv = &PutFunctionCodeSigningConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSigningConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value) + } + sv.CodeSigningConfigArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutFunctionConcurrency struct { +} + +func (*awsRestjson1_deserializeOpPutFunctionConcurrency) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutFunctionConcurrency) 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_deserializeOpErrorPutFunctionConcurrency(response, &metadata) + } + output := &PutFunctionConcurrencyOutput{} + 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_deserializeOpDocumentPutFunctionConcurrencyOutput(&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_deserializeOpErrorPutFunctionConcurrency(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("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) - case "SigningJobArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.SigningJobArn = ptr.String(jtv) - } + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case "SigningProfileVersionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.SigningProfileVersionArn = ptr.String(jtv) - } + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case "SnapStart": - if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { - return err - } + } +} - case "State": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected State to be of type string, got %T instead", value) - } - sv.State = types.State(jtv) - } +func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunctionConcurrencyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "StateReason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) - } - sv.StateReason = ptr.String(jtv) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "StateReasonCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) - } - sv.StateReasonCode = types.StateReasonCode(jtv) - } + var sv *PutFunctionConcurrencyOutput + if *v == nil { + sv = &PutFunctionConcurrencyOutput{} + } else { + sv = *v + } - case "Timeout": + for key, value := range shape { + switch key { + case "ReservedConcurrentExecutions": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value) + return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.Timeout = ptr.Int32(int32(i64)) - } - - case "TracingConfig": - if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { - return err - } - - case "Version": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Version to be of type string, got %T instead", value) - } - sv.Version = ptr.String(jtv) - } - - case "VpcConfig": - if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { - return err + sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) } default: @@ -9869,14 +10640,14 @@ func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOu return nil } -type awsRestjson1_deserializeOpPutFunctionCodeSigningConfig struct { +type awsRestjson1_deserializeOpPutFunctionEventInvokeConfig struct { } -func (*awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) ID() string { +func (*awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) 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) @@ -9890,9 +10661,9 @@ func (m *awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response, &metadata) } - output := &PutFunctionCodeSigningConfigOutput{} + output := &PutFunctionEventInvokeConfigOutput{} out.Result = output var buff [1024]byte @@ -9913,7 +10684,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9926,7 +10697,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(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)} @@ -9967,9 +10738,6 @@ func awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response *smith } switch { - case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode): - return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -9995,7 +10763,7 @@ func awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response *smith } } -func awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(v **PutFunctionCodeSigningConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **PutFunctionEventInvokeConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10008,31 +10776,69 @@ func awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(v **Pu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutFunctionCodeSigningConfigOutput + var sv *PutFunctionEventInvokeConfigOutput if *v == nil { - sv = &PutFunctionCodeSigningConfigOutput{} + sv = &PutFunctionEventInvokeConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CodeSigningConfigArn": + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "FunctionArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value) + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) } - sv.CodeSigningConfigArn = ptr.String(jtv) + sv.FunctionArn = ptr.String(jtv) } - case "FunctionName": + case "LastModified": if value != nil { - jtv, ok := value.(string) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "MaximumEventAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected FunctionName to be of type string, got %T instead", value) + return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) } - sv.FunctionName = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) } default: @@ -10044,14 +10850,14 @@ func awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(v **Pu return nil } -type awsRestjson1_deserializeOpPutFunctionConcurrency struct { +type awsRestjson1_deserializeOpPutFunctionRecursionConfig struct { } -func (*awsRestjson1_deserializeOpPutFunctionConcurrency) ID() string { +func (*awsRestjson1_deserializeOpPutFunctionRecursionConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutFunctionConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) 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) @@ -10065,9 +10871,9 @@ func (m *awsRestjson1_deserializeOpPutFunctionConcurrency) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response, &metadata) } - output := &PutFunctionConcurrencyOutput{} + output := &PutFunctionRecursionConfigOutput{} out.Result = output var buff [1024]byte @@ -10088,7 +10894,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionConcurrency) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10101,7 +10907,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionConcurrency) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(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)} @@ -10167,7 +10973,7 @@ func awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunctionConcurrencyOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutFunctionRecursionConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10180,26 +10986,22 @@ func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunct return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutFunctionConcurrencyOutput + var sv *PutFunctionRecursionConfigOutput if *v == nil { - sv = &PutFunctionConcurrencyOutput{} + sv = &PutFunctionRecursionConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ReservedConcurrentExecutions": + case "RecursiveLoop": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected RecursiveLoop to be of type string, got %T instead", value) } - sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) + sv.RecursiveLoop = types.RecursiveLoop(jtv) } default: @@ -10211,14 +11013,14 @@ func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunct return nil } -type awsRestjson1_deserializeOpPutFunctionEventInvokeConfig struct { +type awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig struct { } -func (*awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) ID() string { +func (*awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) 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) @@ -10232,9 +11034,9 @@ func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response, &metadata) } - output := &PutFunctionEventInvokeConfigOutput{} + output := &PutProvisionedConcurrencyConfigOutput{} out.Result = output var buff [1024]byte @@ -10255,7 +11057,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10268,7 +11070,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(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)} @@ -10334,7 +11136,7 @@ func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response *smith } } -func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **PutFunctionEventInvokeConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v **PutProvisionedConcurrencyConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10347,69 +11149,79 @@ func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **Pu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutFunctionEventInvokeConfigOutput + var sv *PutProvisionedConcurrencyConfigOutput if *v == nil { - sv = &PutFunctionEventInvokeConfigOutput{} + sv = &PutProvisionedConcurrencyConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DestinationConfig": - if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { - return err + case "AllocatedProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) } - case "FunctionArn": + case "AvailableProvisionedConcurrentExecutions": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err } - sv.FunctionArn = ptr.String(jtv) + sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) } case "LastModified": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } + sv.LastModified = ptr.String(jtv) } - case "MaximumEventAgeInSeconds": + case "RequestedProvisionedConcurrentExecutions": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) + sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) } - case "MaximumRetryAttempts": + case "Status": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value) + return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + sv.StatusReason = ptr.String(jtv) } default: @@ -10421,14 +11233,14 @@ func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **Pu return nil } -type awsRestjson1_deserializeOpPutFunctionRecursionConfig struct { +type awsRestjson1_deserializeOpPutPublicAccessBlockConfig struct { } -func (*awsRestjson1_deserializeOpPutFunctionRecursionConfig) ID() string { +func (*awsRestjson1_deserializeOpPutPublicAccessBlockConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutPublicAccessBlockConfig) 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) @@ -10442,9 +11254,9 @@ func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutPublicAccessBlockConfig(response, &metadata) } - output := &PutFunctionRecursionConfigOutput{} + output := &PutPublicAccessBlockConfigOutput{} out.Result = output var buff [1024]byte @@ -10465,7 +11277,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutPublicAccessBlockConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10478,7 +11290,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutPublicAccessBlockConfig(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)} @@ -10544,7 +11356,7 @@ func awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response *smithyh } } -func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutFunctionRecursionConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutPublicAccessBlockConfigOutput(v **PutPublicAccessBlockConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10557,22 +11369,18 @@ func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutF return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutFunctionRecursionConfigOutput + var sv *PutPublicAccessBlockConfigOutput if *v == nil { - sv = &PutFunctionRecursionConfigOutput{} + sv = &PutPublicAccessBlockConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RecursiveLoop": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RecursiveLoop to be of type string, got %T instead", value) - } - sv.RecursiveLoop = types.RecursiveLoop(jtv) + case "PublicAccessBlockConfig": + if err := awsRestjson1_deserializeDocumentPublicAccessBlockConfig(&sv.PublicAccessBlockConfig, value); err != nil { + return err } default: @@ -10584,14 +11392,14 @@ func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutF return nil } -type awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig struct { +type awsRestjson1_deserializeOpPutResourcePolicy struct { } -func (*awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) ID() string { +func (*awsRestjson1_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_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) @@ -10605,9 +11413,9 @@ func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutResourcePolicy(response, &metadata) } - output := &PutProvisionedConcurrencyConfigOutput{} + output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -10628,7 +11436,7 @@ func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10641,7 +11449,7 @@ func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_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)} @@ -10685,6 +11493,15 @@ func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response *sm case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PolicyLengthExceededException", errorCode): + return awsRestjson1_deserializeErrorPolicyLengthExceededException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("PublicPolicyException", errorCode): + return awsRestjson1_deserializeErrorPublicPolicyException(response, errorBody) + case strings.EqualFold("ResourceConflictException", errorCode): return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) @@ -10707,7 +11524,7 @@ func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response *sm } } -func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v **PutProvisionedConcurrencyConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10720,79 +11537,31 @@ func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutProvisionedConcurrencyConfigOutput + var sv *PutResourcePolicyOutput if *v == nil { - sv = &PutProvisionedConcurrencyConfigOutput{} + sv = &PutResourcePolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AllocatedProvisionedConcurrentExecutions": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) - } - - case "AvailableProvisionedConcurrentExecutions": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) - } - - case "LastModified": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - sv.LastModified = ptr.String(jtv) - } - - case "RequestedProvisionedConcurrentExecutions": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) - } - - case "Status": + case "Policy": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourcePolicy to be of type string, got %T instead", value) } - sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv) + sv.Policy = ptr.String(jtv) } - case "StatusReason": + case "RevisionId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected RevisionId to be of type string, got %T instead", value) } - sv.StatusReason = ptr.String(jtv) + sv.RevisionId = ptr.String(jtv) } default: @@ -14589,6 +15358,42 @@ func awsRestjson1_deserializeErrorProvisionedConcurrencyConfigNotFoundException( return output } +func awsRestjson1_deserializeErrorPublicPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PublicPolicyException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentPublicPolicyException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorRecursiveInvocationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.RecursiveInvocationException{} var buff [1024]byte @@ -19718,6 +20523,104 @@ func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigNotFoundExcepti return nil } +func awsRestjson1_deserializeDocumentPublicAccessBlockConfig(v **types.PublicAccessBlockConfig, 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.PublicAccessBlockConfig + if *v == nil { + sv = &types.PublicAccessBlockConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BlockPublicPolicy": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + } + sv.BlockPublicPolicy = ptr.Bool(jtv) + } + + case "RestrictPublicResource": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + } + sv.RestrictPublicResource = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPublicPolicyException(v **types.PublicPolicyException, 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.PublicPolicyException + if *v == nil { + sv = &types.PublicPolicyException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentQueues(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/lambda/generated.json b/service/lambda/generated.json index 42f7f193c80..16b008fe7d5 100644 --- a/service/lambda/generated.json +++ b/service/lambda/generated.json @@ -27,6 +27,7 @@ "api_op_DeleteFunctionUrlConfig.go", "api_op_DeleteLayerVersion.go", "api_op_DeleteProvisionedConcurrencyConfig.go", + "api_op_DeleteResourcePolicy.go", "api_op_GetAccountSettings.go", "api_op_GetAlias.go", "api_op_GetCodeSigningConfig.go", @@ -43,6 +44,8 @@ "api_op_GetLayerVersionPolicy.go", "api_op_GetPolicy.go", "api_op_GetProvisionedConcurrencyConfig.go", + "api_op_GetPublicAccessBlockConfig.go", + "api_op_GetResourcePolicy.go", "api_op_GetRuntimeManagementConfig.go", "api_op_Invoke.go", "api_op_InvokeAsync.go", @@ -66,6 +69,8 @@ "api_op_PutFunctionEventInvokeConfig.go", "api_op_PutFunctionRecursionConfig.go", "api_op_PutProvisionedConcurrencyConfig.go", + "api_op_PutPublicAccessBlockConfig.go", + "api_op_PutResourcePolicy.go", "api_op_PutRuntimeManagementConfig.go", "api_op_RemoveLayerVersionPermission.go", "api_op_RemovePermission.go", diff --git a/service/lambda/serializers.go b/service/lambda/serializers.go index b7508c6bd71..924f0e6ff11 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -1674,6 +1674,75 @@ func awsRestjson1_serializeOpHttpBindingsDeleteProvisionedConcurrencyConfigInput return nil } +type awsRestjson1_serializeOpDeleteResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteResourcePolicy) 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.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2024-09-16/resource-policy/{ResourceArn}") + 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_serializeOpHttpBindingsDeleteResourcePolicyInput(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_serializeOpHttpBindingsDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.RevisionId != nil { + encoder.SetQuery("RevisionId").String(*v.RevisionId) + } + + return nil +} + type awsRestjson1_serializeOpGetAccountSettings struct { } @@ -2747,6 +2816,136 @@ func awsRestjson1_serializeOpHttpBindingsGetProvisionedConcurrencyConfigInput(v return nil } +type awsRestjson1_serializeOpGetPublicAccessBlockConfig struct { +} + +func (*awsRestjson1_serializeOpGetPublicAccessBlockConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPublicAccessBlockConfig) 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.(*GetPublicAccessBlockConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2024-09-16/public-access-block/{ResourceArn}") + 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_serializeOpHttpBindingsGetPublicAccessBlockConfigInput(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_serializeOpHttpBindingsGetPublicAccessBlockConfigInput(v *GetPublicAccessBlockConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpGetResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetResourcePolicy) 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.(*GetResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2024-09-16/resource-policy/{ResourceArn}") + 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_serializeOpHttpBindingsGetResourcePolicyInput(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_serializeOpHttpBindingsGetResourcePolicyInput(v *GetResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetRuntimeManagementConfig struct { } @@ -4625,6 +4824,189 @@ func awsRestjson1_serializeOpDocumentPutProvisionedConcurrencyConfigInput(v *Put return nil } +type awsRestjson1_serializeOpPutPublicAccessBlockConfig struct { +} + +func (*awsRestjson1_serializeOpPutPublicAccessBlockConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutPublicAccessBlockConfig) 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.(*PutPublicAccessBlockConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2024-09-16/public-access-block/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutPublicAccessBlockConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutPublicAccessBlockConfigInput(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_serializeOpHttpBindingsPutPublicAccessBlockConfigInput(v *PutPublicAccessBlockConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutPublicAccessBlockConfigInput(v *PutPublicAccessBlockConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PublicAccessBlockConfig != nil { + ok := object.Key("PublicAccessBlockConfig") + if err := awsRestjson1_serializeDocumentPublicAccessBlockConfig(v.PublicAccessBlockConfig, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutResourcePolicy) 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.(*PutResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2024-09-16/resource-policy/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutResourcePolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutResourcePolicyInput(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_serializeOpHttpBindingsPutResourcePolicyInput(v *PutResourcePolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Policy != nil { + ok := object.Key("Policy") + ok.String(*v.Policy) + } + + if v.RevisionId != nil { + ok := object.Key("RevisionId") + ok.String(*v.RevisionId) + } + + return nil +} + type awsRestjson1_serializeOpPutRuntimeManagementConfig struct { } @@ -6507,6 +6889,23 @@ func awsRestjson1_serializeDocumentOnSuccess(v *types.OnSuccess, value smithyjso return nil } +func awsRestjson1_serializeDocumentPublicAccessBlockConfig(v *types.PublicAccessBlockConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BlockPublicPolicy != nil { + ok := object.Key("BlockPublicPolicy") + ok.Boolean(*v.BlockPublicPolicy) + } + + if v.RestrictPublicResource != nil { + ok := object.Key("RestrictPublicResource") + ok.Boolean(*v.RestrictPublicResource) + } + + return nil +} + func awsRestjson1_serializeDocumentQueues(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/lambda/snapshot/api_op_DeleteResourcePolicy.go.snap b/service/lambda/snapshot/api_op_DeleteResourcePolicy.go.snap new file mode 100644 index 00000000000..e3eb9f6710c --- /dev/null +++ b/service/lambda/snapshot/api_op_DeleteResourcePolicy.go.snap @@ -0,0 +1,36 @@ +DeleteResourcePolicy + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/lambda/snapshot/api_op_GetPublicAccessBlockConfig.go.snap b/service/lambda/snapshot/api_op_GetPublicAccessBlockConfig.go.snap new file mode 100644 index 00000000000..3f64feea6ba --- /dev/null +++ b/service/lambda/snapshot/api_op_GetPublicAccessBlockConfig.go.snap @@ -0,0 +1,36 @@ +GetPublicAccessBlockConfig + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/lambda/snapshot/api_op_GetResourcePolicy.go.snap b/service/lambda/snapshot/api_op_GetResourcePolicy.go.snap new file mode 100644 index 00000000000..04b5aba5c5f --- /dev/null +++ b/service/lambda/snapshot/api_op_GetResourcePolicy.go.snap @@ -0,0 +1,36 @@ +GetResourcePolicy + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/lambda/snapshot/api_op_PutPublicAccessBlockConfig.go.snap b/service/lambda/snapshot/api_op_PutPublicAccessBlockConfig.go.snap new file mode 100644 index 00000000000..845f7352a15 --- /dev/null +++ b/service/lambda/snapshot/api_op_PutPublicAccessBlockConfig.go.snap @@ -0,0 +1,36 @@ +PutPublicAccessBlockConfig + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/lambda/snapshot/api_op_PutResourcePolicy.go.snap b/service/lambda/snapshot/api_op_PutResourcePolicy.go.snap new file mode 100644 index 00000000000..4e713e2f39b --- /dev/null +++ b/service/lambda/snapshot/api_op_PutResourcePolicy.go.snap @@ -0,0 +1,36 @@ +PutResourcePolicy + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/lambda/snapshot_test.go b/service/lambda/snapshot_test.go index 032a01ea21e..68edd3b2355 100644 --- a/service/lambda/snapshot_test.go +++ b/service/lambda/snapshot_test.go @@ -266,6 +266,18 @@ func TestCheckSnapshot_DeleteProvisionedConcurrencyConfig(t *testing.T) { } } +func TestCheckSnapshot_DeleteResourcePolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteResourcePolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteResourcePolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetAccountSettings(t *testing.T) { svc := New(Options{}) _, err := svc.GetAccountSettings(context.Background(), nil, func(o *Options) { @@ -458,6 +470,30 @@ func TestCheckSnapshot_GetProvisionedConcurrencyConfig(t *testing.T) { } } +func TestCheckSnapshot_GetPublicAccessBlockConfig(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPublicAccessBlockConfig(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetPublicAccessBlockConfig") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetResourcePolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetResourcePolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetResourcePolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetRuntimeManagementConfig(t *testing.T) { svc := New(Options{}) _, err := svc.GetRuntimeManagementConfig(context.Background(), nil, func(o *Options) { @@ -734,6 +770,30 @@ func TestCheckSnapshot_PutProvisionedConcurrencyConfig(t *testing.T) { } } +func TestCheckSnapshot_PutPublicAccessBlockConfig(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutPublicAccessBlockConfig(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "PutPublicAccessBlockConfig") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_PutResourcePolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutResourcePolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "PutResourcePolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_PutRuntimeManagementConfig(t *testing.T) { svc := New(Options{}) _, err := svc.PutRuntimeManagementConfig(context.Background(), nil, func(o *Options) { @@ -1081,6 +1141,18 @@ func TestUpdateSnapshot_DeleteProvisionedConcurrencyConfig(t *testing.T) { } } +func TestUpdateSnapshot_DeleteResourcePolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteResourcePolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteResourcePolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetAccountSettings(t *testing.T) { svc := New(Options{}) _, err := svc.GetAccountSettings(context.Background(), nil, func(o *Options) { @@ -1273,6 +1345,30 @@ func TestUpdateSnapshot_GetProvisionedConcurrencyConfig(t *testing.T) { } } +func TestUpdateSnapshot_GetPublicAccessBlockConfig(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetPublicAccessBlockConfig(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetPublicAccessBlockConfig") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetResourcePolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetResourcePolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetResourcePolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetRuntimeManagementConfig(t *testing.T) { svc := New(Options{}) _, err := svc.GetRuntimeManagementConfig(context.Background(), nil, func(o *Options) { @@ -1549,6 +1645,30 @@ func TestUpdateSnapshot_PutProvisionedConcurrencyConfig(t *testing.T) { } } +func TestUpdateSnapshot_PutPublicAccessBlockConfig(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutPublicAccessBlockConfig(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "PutPublicAccessBlockConfig") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_PutResourcePolicy(t *testing.T) { + svc := New(Options{}) + _, err := svc.PutResourcePolicy(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "PutResourcePolicy") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_PutRuntimeManagementConfig(t *testing.T) { svc := New(Options{}) _, err := svc.PutRuntimeManagementConfig(context.Background(), nil, func(o *Options) { diff --git a/service/lambda/types/errors.go b/service/lambda/types/errors.go index 92dd0d56a22..b329619fb75 100644 --- a/service/lambda/types/errors.go +++ b/service/lambda/types/errors.go @@ -742,6 +742,37 @@ func (e *ProvisionedConcurrencyConfigNotFoundException) ErrorFault() smithy.Erro return smithy.FaultClient } +// Lambda prevented your policy from being created because it would grant public +// access to your function. If you intended to create a public policy, use the PutPublicAccessBlockConfigAPI +// action to configure your function's public-access settings to allow public +// policies. +type PublicPolicyException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *PublicPolicyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PublicPolicyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PublicPolicyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PublicPolicyException" + } + return *e.ErrorCodeOverride +} +func (e *PublicPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Lambda has detected your function being invoked in a recursive loop with other // Amazon Web Services resources and stopped your function's invocation. type RecursiveInvocationException struct { diff --git a/service/lambda/types/types.go b/service/lambda/types/types.go index 19b25b2330a..aba5f6c9bf3 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -1124,6 +1124,24 @@ type ProvisionedConcurrencyConfigListItem struct { noSmithyDocumentSerde } +// An object that defines the public-access settings for a function. +type PublicAccessBlockConfig struct { + + // To block the creation of resource-based policies that would grant public access + // to your function, set BlockPublicPolicy to true . To allow the creation of + // resource-based policies that would grant public access to your function, set + // BlockPublicPolicy to false . + BlockPublicPolicy *bool + + // To block public access to your function, even if its resource-based policy + // allows it, set RestrictPublicResource to true . To allow public access to a + // function with a resource-based policy that permits it, set + // RestrictPublicResource to false . + RestrictPublicResource *bool + + noSmithyDocumentSerde +} + // The ARN of the runtime and any errors that occured. type RuntimeVersionConfig struct { diff --git a/service/lambda/validators.go b/service/lambda/validators.go index c4c103d7baf..4550af31989 100644 --- a/service/lambda/validators.go +++ b/service/lambda/validators.go @@ -350,6 +350,26 @@ func (m *validateOpDeleteProvisionedConcurrencyConfig) HandleInitialize(ctx cont return next.HandleInitialize(ctx, in) } +type validateOpDeleteResourcePolicy struct { +} + +func (*validateOpDeleteResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetAlias struct { } @@ -650,6 +670,46 @@ func (m *validateOpGetProvisionedConcurrencyConfig) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpGetPublicAccessBlockConfig struct { +} + +func (*validateOpGetPublicAccessBlockConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPublicAccessBlockConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPublicAccessBlockConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPublicAccessBlockConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResourcePolicy struct { +} + +func (*validateOpGetResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetRuntimeManagementConfig struct { } @@ -1030,6 +1090,46 @@ func (m *validateOpPutProvisionedConcurrencyConfig) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpPutPublicAccessBlockConfig struct { +} + +func (*validateOpPutPublicAccessBlockConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutPublicAccessBlockConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutPublicAccessBlockConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutPublicAccessBlockConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutRuntimeManagementConfig struct { } @@ -1338,6 +1438,10 @@ func addOpDeleteProvisionedConcurrencyConfigValidationMiddleware(stack *middlewa return stack.Initialize.Add(&validateOpDeleteProvisionedConcurrencyConfig{}, middleware.After) } +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + func addOpGetAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAlias{}, middleware.After) } @@ -1398,6 +1502,14 @@ func addOpGetProvisionedConcurrencyConfigValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpGetProvisionedConcurrencyConfig{}, middleware.After) } +func addOpGetPublicAccessBlockConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPublicAccessBlockConfig{}, middleware.After) +} + +func addOpGetResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicy{}, middleware.After) +} + func addOpGetRuntimeManagementConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRuntimeManagementConfig{}, middleware.After) } @@ -1474,6 +1586,14 @@ func addOpPutProvisionedConcurrencyConfigValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpPutProvisionedConcurrencyConfig{}, middleware.After) } +func addOpPutPublicAccessBlockConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutPublicAccessBlockConfig{}, middleware.After) +} + +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + func addOpPutRuntimeManagementConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutRuntimeManagementConfig{}, middleware.After) } @@ -1901,6 +2021,21 @@ func validateOpDeleteProvisionedConcurrencyConfigInput(v *DeleteProvisionedConcu } } +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetAliasInput(v *GetAliasInput) error { if v == nil { return nil @@ -2138,6 +2273,36 @@ func validateOpGetProvisionedConcurrencyConfigInput(v *GetProvisionedConcurrency } } +func validateOpGetPublicAccessBlockConfigInput(v *GetPublicAccessBlockConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPublicAccessBlockConfigInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResourcePolicyInput(v *GetResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetRuntimeManagementConfigInput(v *GetRuntimeManagementConfigInput) error { if v == nil { return nil @@ -2444,6 +2609,42 @@ func validateOpPutProvisionedConcurrencyConfigInput(v *PutProvisionedConcurrency } } +func validateOpPutPublicAccessBlockConfigInput(v *PutPublicAccessBlockConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutPublicAccessBlockConfigInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.PublicAccessBlockConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("PublicAccessBlockConfig")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutRuntimeManagementConfigInput(v *PutRuntimeManagementConfigInput) error { if v == nil { return nil diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index fed94395d86..1e03669300f 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -730,10 +730,10 @@ type CreateDBInstanceInput struct { // The license model information for this DB instance. // // License models for RDS for Db2 require additional configuration. The Bring Your - // Own License (BYOL) model requires a custom parameter group. The Db2 license - // through Amazon Web Services Marketplace model requires an Amazon Web Services - // Marketplace subscription. For more information, see [RDS for Db2 licensing options]in the Amazon RDS User - // Guide. + // Own License (BYOL) model requires a custom parameter group and an Amazon Web + // Services License Manager self-managed license. The Db2 license through Amazon + // Web Services Marketplace model requires an Amazon Web Services Marketplace + // subscription. For more information, see [Amazon RDS for Db2 licensing options]in the Amazon RDS User Guide. // // The default for RDS for Db2 is bring-your-own-license . // @@ -753,7 +753,7 @@ type CreateDBInstanceInput struct { // // - RDS for PostgreSQL - postgresql-license // - // [RDS for Db2 licensing options]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html + // [Amazon RDS for Db2 licensing options]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html LicenseModel *string // Specifies whether to manage the master user password with Amazon Web Services diff --git a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go index 2c1c22aa389..820b33b3d72 100644 --- a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go +++ b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go @@ -411,10 +411,10 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // License model information for the restored DB instance. // // License models for RDS for Db2 require additional configuration. The Bring Your - // Own License (BYOL) model requires a custom parameter group. The Db2 license - // through Amazon Web Services Marketplace model requires an Amazon Web Services - // Marketplace subscription. For more information, see [RDS for Db2 licensing options]in the Amazon RDS User - // Guide. + // Own License (BYOL) model requires a custom parameter group and an Amazon Web + // Services License Manager self-managed license. The Db2 license through Amazon + // Web Services Marketplace model requires an Amazon Web Services Marketplace + // subscription. For more information, see [Amazon RDS for Db2 licensing options]in the Amazon RDS User Guide. // // This setting doesn't apply to Amazon Aurora or RDS Custom DB instances. // @@ -434,7 +434,7 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // Default: Same as the source. // - // [RDS for Db2 licensing options]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html + // [Amazon RDS for Db2 licensing options]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html LicenseModel *string // Specifies whether the DB instance is a Multi-AZ deployment. diff --git a/service/rds/api_op_RestoreDBInstanceToPointInTime.go b/service/rds/api_op_RestoreDBInstanceToPointInTime.go index fe1d32bbc8b..12ec6105d80 100644 --- a/service/rds/api_op_RestoreDBInstanceToPointInTime.go +++ b/service/rds/api_op_RestoreDBInstanceToPointInTime.go @@ -370,10 +370,10 @@ type RestoreDBInstanceToPointInTimeInput struct { // The license model information for the restored DB instance. // // License models for RDS for Db2 require additional configuration. The Bring Your - // Own License (BYOL) model requires a custom parameter group. The Db2 license - // through Amazon Web Services Marketplace model requires an Amazon Web Services - // Marketplace subscription. For more information, see [RDS for Db2 licensing options]in the Amazon RDS User - // Guide. + // Own License (BYOL) model requires a custom parameter group and an Amazon Web + // Services License Manager self-managed license. The Db2 license through Amazon + // Web Services Marketplace model requires an Amazon Web Services Marketplace + // subscription. For more information, see [Amazon RDS for Db2 licensing options]in the Amazon RDS User Guide. // // This setting doesn't apply to Amazon Aurora or RDS Custom DB instances. // @@ -393,7 +393,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // Default: Same as the source. // - // [RDS for Db2 licensing options]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html + // [Amazon RDS for Db2 licensing options]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html LicenseModel *string // The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale diff --git a/service/ssm/api_op_CreateActivation.go b/service/ssm/api_op_CreateActivation.go index 8df00eb1d1b..aecf1545baa 100644 --- a/service/ssm/api_op_CreateActivation.go +++ b/service/ssm/api_op_CreateActivation.go @@ -18,14 +18,14 @@ import ( // it possible to manage them using Systems Manager capabilities. You use the // activation code and ID when installing SSM Agent on machines in your hybrid // environment. For more information about requirements for managing on-premises -// machines using Systems Manager, see [Setting up Amazon Web Services Systems Manager for hybrid and multicloud environments]in the Amazon Web Services Systems Manager +// machines using Systems Manager, see [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager // User Guide. // // Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and // on-premises servers and VMs that are configured for Systems Manager are all // called managed nodes. // -// [Setting up Amazon Web Services Systems Manager for hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html +// [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-hybrid-multicloud.html func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationInput, optFns ...func(*Options)) (*CreateActivationOutput, error) { if params == nil { params = &CreateActivationInput{} @@ -46,13 +46,13 @@ type CreateActivationInput struct { // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com - // . For more information, see [Create an IAM service role for a hybrid and multicloud environment]in the Amazon Web Services Systems Manager User + // . For more information, see [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]in the Amazon Web Services Systems Manager User // Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // - // [Create an IAM service role for a hybrid and multicloud environment]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html + // [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html // // This member is required. IamRole *string @@ -71,7 +71,7 @@ type CreateActivationInput struct { Description *string // The date by which this activation request should expire, in timestamp format, - // such as "2021-07-07T00:00:00". You can specify a date up to 30 days in advance. + // such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. // If you don't provide an expiration date, the activation code expires in 24 // hours. ExpirationDate *time.Time diff --git a/service/ssm/api_op_CreateAssociation.go b/service/ssm/api_op_CreateAssociation.go index 7ceb3a536ba..4bfef5dfd52 100644 --- a/service/ssm/api_op_CreateAssociation.go +++ b/service/ssm/api_op_CreateAssociation.go @@ -215,10 +215,10 @@ type CreateAssociationInput struct { // Amazon Web Services resource groups, all managed nodes in an Amazon Web Services // account, or individual managed node IDs. You can target all managed nodes in an // Amazon Web Services account by specifying the InstanceIds key with a value of * - // . For more information about choosing targets for an association, see [About targets and rate controls in State Manager associations]in the + // . For more information about choosing targets for an association, see [Understanding targets and rate controls in State Manager associations]in the // Amazon Web Services Systems Manager User Guide. // - // [About targets and rate controls in State Manager associations]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html + // [Understanding targets and rate controls in State Manager associations]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html Targets []types.Target noSmithyDocumentSerde diff --git a/service/ssm/api_op_CreateDocument.go b/service/ssm/api_op_CreateDocument.go index 3278ea09550..33f9518021d 100644 --- a/service/ssm/api_op_CreateDocument.go +++ b/service/ssm/api_op_CreateDocument.go @@ -17,7 +17,7 @@ import ( // schemas, features, and syntax, see [Amazon Web Services Systems Manager Documents]in the Amazon Web Services Systems Manager // User Guide. // -// [Amazon Web Services Systems Manager Documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html +// [Amazon Web Services Systems Manager Documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents.html func (c *Client) CreateDocument(ctx context.Context, params *CreateDocumentInput, optFns ...func(*Options)) (*CreateDocumentOutput, error) { if params == nil { params = &CreateDocumentInput{} diff --git a/service/ssm/api_op_CreatePatchBaseline.go b/service/ssm/api_op_CreatePatchBaseline.go index 88cd48a4332..ac0fabf2be6 100644 --- a/service/ssm/api_op_CreatePatchBaseline.go +++ b/service/ssm/api_op_CreatePatchBaseline.go @@ -43,9 +43,9 @@ type CreatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Defines the compliance level for approved patches. When an approved patch is @@ -74,9 +74,9 @@ type CreatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages diff --git a/service/ssm/api_op_CreateResourceDataSync.go b/service/ssm/api_op_CreateResourceDataSync.go index 020757414f7..c699a1c995b 100644 --- a/service/ssm/api_op_CreateResourceDataSync.go +++ b/service/ssm/api_op_CreateResourceDataSync.go @@ -18,7 +18,7 @@ import ( // You can configure Systems Manager Inventory to use the SyncToDestination type // to synchronize Inventory data from multiple Amazon Web Services Regions to a // single Amazon Simple Storage Service (Amazon S3) bucket. For more information, -// see [Configuring resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. +// see [Creatinga a resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. // // You can configure Systems Manager Explorer to use the SyncFromSource type to // synchronize operational work items (OpsItems) and operational data (OpsData) @@ -38,7 +38,7 @@ import ( // policy. // // [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]: https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html -// [Configuring resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html +// [Creatinga a resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-create-resource-data-sync.html func (c *Client) CreateResourceDataSync(ctx context.Context, params *CreateResourceDataSyncInput, optFns ...func(*Options)) (*CreateResourceDataSyncOutput, error) { if params == nil { params = &CreateResourceDataSyncInput{} diff --git a/service/ssm/api_op_DeleteInventory.go b/service/ssm/api_op_DeleteInventory.go index 0545461d443..0a96bac86d1 100644 --- a/service/ssm/api_op_DeleteInventory.go +++ b/service/ssm/api_op_DeleteInventory.go @@ -71,10 +71,10 @@ type DeleteInventoryOutput struct { // begin other operations. DeletionId *string - // A summary of the delete operation. For more information about this summary, see [Understanding the delete inventory summary] + // A summary of the delete operation. For more information about this summary, see [Deleting custom inventory] // in the Amazon Web Services Systems Manager User Guide. // - // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary + // [Deleting custom inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary DeletionSummary *types.InventoryDeletionSummary // The name of the inventory data type specified in the request. diff --git a/service/ssm/api_op_DescribeInstancePatches.go b/service/ssm/api_op_DescribeInstancePatches.go index d78eed397c1..a94e4557ac9 100644 --- a/service/ssm/api_op_DescribeInstancePatches.go +++ b/service/ssm/api_op_DescribeInstancePatches.go @@ -55,10 +55,10 @@ type DescribeInstancePatchesInput struct { // // Sample values: Installed | InstalledOther | InstalledPendingReboot // - // For lists of all State values, see [Understanding patch compliance state values]in the Amazon Web Services Systems Manager + // For lists of all State values, see [Patch compliance state values]in the Amazon Web Services Systems Manager // User Guide. // - // [Understanding patch compliance state values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html + // [Patch compliance state values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html Filters []types.PatchOrchestratorFilter // The maximum number of patches to return (per page). diff --git a/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go b/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go index 98026b19f14..c8f3978110b 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go @@ -43,7 +43,7 @@ type DescribeMaintenanceWindowExecutionsInput struct { // // - Values. An array of strings, each between 1 and 256 characters. Supported // values are date/time strings in a valid ISO 8601 date/time format, such as - // 2021-11-04T05:00:00Z . + // 2024-11-04T05:00:00Z . Filters []types.MaintenanceWindowFilter // The maximum number of items to return for this call. The call also returns a diff --git a/service/ssm/api_op_GetMaintenanceWindowTask.go b/service/ssm/api_op_GetMaintenanceWindowTask.go index 3fa362d8bb3..954c41abe40 100644 --- a/service/ssm/api_op_GetMaintenanceWindowTask.go +++ b/service/ssm/api_op_GetMaintenanceWindowTask.go @@ -108,10 +108,10 @@ type GetMaintenanceWindowTaskOutput struct { // 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]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets where the task should run. diff --git a/service/ssm/api_op_GetParameter.go b/service/ssm/api_op_GetParameter.go index a804b8c490f..167da9134ff 100644 --- a/service/ssm/api_op_GetParameter.go +++ b/service/ssm/api_op_GetParameter.go @@ -40,7 +40,7 @@ type GetParameterInput struct { // For more information about shared parameters, see [Working with shared parameters] in the Amazon Web Services // Systems Manager User Guide. // - // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sharing.html + // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html // // This member is required. Name *string diff --git a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go index 26646224aa6..65780101e0d 100644 --- a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go +++ b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go @@ -126,10 +126,10 @@ type RegisterTaskWithMaintenanceWindowInput struct { // 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]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or maintenance window targets). diff --git a/service/ssm/api_op_StartAutomationExecution.go b/service/ssm/api_op_StartAutomationExecution.go index a52c348ff03..c07e0ad6d79 100644 --- a/service/ssm/api_op_StartAutomationExecution.go +++ b/service/ssm/api_op_StartAutomationExecution.go @@ -52,6 +52,9 @@ type StartAutomationExecutionInput struct { // The maximum number of targets allowed to run this task in parallel. You can // specify a number, such as 10, or a percentage, such as 10%. The default value is // 10 . + // + // If both this parameter and the TargetLocation:TargetsMaxConcurrency are + // supplied, TargetLocation:TargetsMaxConcurrency takes precedence. MaxConcurrency *string // The number of errors that are allowed before the system stops running the @@ -68,6 +71,9 @@ type StartAutomationExecutionInput struct { // are allowed to complete, but some of these executions may fail as well. If you // need to ensure that there won't be more than max-errors failed executions, set // max-concurrency to 1 so the executions proceed one at a time. + // + // If this parameter and the TargetLocation:TargetsMaxErrors parameter are both + // supplied, TargetLocation:TargetsMaxErrors takes precedence. MaxErrors *string // The execution mode of the automation. Valid modes include the following: Auto @@ -94,12 +100,16 @@ type StartAutomationExecutionInput struct { // A location is a combination of Amazon Web Services Regions and/or Amazon Web // Services accounts where you want to run the automation. Use this operation to // start an automation in multiple Amazon Web Services Regions and multiple Amazon - // Web Services accounts. For more information, see [Running Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts]in the Amazon Web Services + // Web Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services // Systems Manager User Guide. // - // [Running Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html TargetLocations []types.TargetLocation + // Specify a publicly accessible URL for a file that contains the TargetLocations + // body. Currently, only files in presigned Amazon S3 buckets are supported. + TargetLocationsURL *string + // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]string @@ -110,6 +120,9 @@ type StartAutomationExecutionInput struct { // A key-value mapping to target resources. Required if you specify // TargetParameterName. + // + // If both this parameter and the TargetLocation:Targets parameter are supplied, + // TargetLocation:Targets takes precedence. Targets []types.Target noSmithyDocumentSerde diff --git a/service/ssm/api_op_UpdateMaintenanceWindowTask.go b/service/ssm/api_op_UpdateMaintenanceWindowTask.go index ba53633d638..7fd589cd1cb 100644 --- a/service/ssm/api_op_UpdateMaintenanceWindowTask.go +++ b/service/ssm/api_op_UpdateMaintenanceWindowTask.go @@ -158,10 +158,10 @@ type UpdateMaintenanceWindowTaskInput struct { // 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]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or tags) to modify. Managed nodes are @@ -253,10 +253,10 @@ type UpdateMaintenanceWindowTaskOutput struct { // 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]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The updated target values. diff --git a/service/ssm/api_op_UpdateManagedInstanceRole.go b/service/ssm/api_op_UpdateManagedInstanceRole.go index ce31afddedb..d56700a4d98 100644 --- a/service/ssm/api_op_UpdateManagedInstanceRole.go +++ b/service/ssm/api_op_UpdateManagedInstanceRole.go @@ -34,13 +34,13 @@ type UpdateManagedInstanceRoleInput struct { // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com - // . For more information, see [Create an IAM service role for a hybrid and multicloud environment]in the Amazon Web Services Systems Manager User + // . For more information, see [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager User // Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // - // [Create an IAM service role for a hybrid and multicloud environment]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html + // [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html // // This member is required. IamRole *string diff --git a/service/ssm/api_op_UpdateOpsItem.go b/service/ssm/api_op_UpdateOpsItem.go index ace113bb2b2..38d0dd79400 100644 --- a/service/ssm/api_op_UpdateOpsItem.go +++ b/service/ssm/api_op_UpdateOpsItem.go @@ -117,8 +117,8 @@ type UpdateOpsItemInput struct { // Specify a new severity for an OpsItem. Severity *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . For more - // information, see [Editing OpsItem details]in the Amazon Web Services Systems Manager User Guide. + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. // // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Status types.OpsItemStatus diff --git a/service/ssm/api_op_UpdatePatchBaseline.go b/service/ssm/api_op_UpdatePatchBaseline.go index f97a9b45192..5d8b1450b62 100644 --- a/service/ssm/api_op_UpdatePatchBaseline.go +++ b/service/ssm/api_op_UpdatePatchBaseline.go @@ -45,9 +45,9 @@ type UpdatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Assigns a new compliance severity level to an existing patch baseline. @@ -70,9 +70,9 @@ type UpdatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages diff --git a/service/ssm/deserializers.go b/service/ssm/deserializers.go index 96009460322..de5256e36d2 100644 --- a/service/ssm/deserializers.go +++ b/service/ssm/deserializers.go @@ -23424,6 +23424,15 @@ func awsAwsjson11_deserializeDocumentAutomationExecution(v **types.AutomationExe return err } + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + case "TargetMaps": if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { return err @@ -23763,6 +23772,15 @@ func awsAwsjson11_deserializeDocumentAutomationExecutionMetadata(v **types.Autom sv.Target = ptr.String(jtv) } + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + case "TargetMaps": if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { return err @@ -26998,6 +27016,42 @@ func awsAwsjson11_deserializeDocumentEffectivePatchList(v *[]types.EffectivePatc return nil } +func awsAwsjson11_deserializeDocumentExcludeAccounts(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 ExcludeAccount to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentFailedCreateAssociation(v **types.FailedCreateAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -41135,6 +41189,11 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va return err } + case "ExcludeAccounts": + if err := awsAwsjson11_deserializeDocumentExcludeAccounts(&sv.ExcludeAccounts, value); err != nil { + return err + } + case "ExecutionRoleName": if value != nil { jtv, ok := value.(string) @@ -41144,6 +41203,15 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va sv.ExecutionRoleName = ptr.String(jtv) } + case "IncludeChildOrganizationUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildOrganizationUnits = jtv + } + case "Regions": if err := awsAwsjson11_deserializeDocumentRegions(&sv.Regions, value); err != nil { return err @@ -41172,6 +41240,29 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va sv.TargetLocationMaxErrors = ptr.String(jtv) } + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TargetsMaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.TargetsMaxConcurrency = ptr.String(jtv) + } + + case "TargetsMaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.TargetsMaxErrors = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/service/ssm/serializers.go b/service/ssm/serializers.go index e5adf5a2151..d7fb760979f 100644 --- a/service/ssm/serializers.go +++ b/service/ssm/serializers.go @@ -8630,6 +8630,17 @@ func awsAwsjson11_serializeDocumentDocumentReviews(v *types.DocumentReviews, val return nil } +func awsAwsjson11_serializeDocumentExcludeAccounts(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_serializeDocumentInstanceAssociationOutputLocation(v *types.InstanceAssociationOutputLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10670,11 +10681,23 @@ func awsAwsjson11_serializeDocumentTargetLocation(v *types.TargetLocation, value } } + if v.ExcludeAccounts != nil { + ok := object.Key("ExcludeAccounts") + if err := awsAwsjson11_serializeDocumentExcludeAccounts(v.ExcludeAccounts, ok); err != nil { + return err + } + } + if v.ExecutionRoleName != nil { ok := object.Key("ExecutionRoleName") ok.String(*v.ExecutionRoleName) } + if v.IncludeChildOrganizationUnits { + ok := object.Key("IncludeChildOrganizationUnits") + ok.Boolean(v.IncludeChildOrganizationUnits) + } + if v.Regions != nil { ok := object.Key("Regions") if err := awsAwsjson11_serializeDocumentRegions(v.Regions, ok); err != nil { @@ -10699,6 +10722,23 @@ func awsAwsjson11_serializeDocumentTargetLocation(v *types.TargetLocation, value ok.String(*v.TargetLocationMaxErrors) } + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.TargetsMaxConcurrency != nil { + ok := object.Key("TargetsMaxConcurrency") + ok.String(*v.TargetsMaxConcurrency) + } + + if v.TargetsMaxErrors != nil { + ok := object.Key("TargetsMaxErrors") + ok.String(*v.TargetsMaxErrors) + } + return nil } @@ -14216,6 +14256,11 @@ func awsAwsjson11_serializeOpDocumentStartAutomationExecutionInput(v *StartAutom } } + if v.TargetLocationsURL != nil { + ok := object.Key("TargetLocationsURL") + ok.String(*v.TargetLocationsURL) + } + if v.TargetMaps != nil { ok := object.Key("TargetMaps") if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index f7d8d80fa09..77c2c19424d 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -3383,11 +3383,11 @@ func (e *TargetInUseException) ErrorCode() string { func (e *TargetInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified target managed node for the session isn't fully configured for -// use with Session Manager. For more information, see [Getting started with Session Manager]in the Amazon Web Services +// use with Session Manager. For more information, see [Setting up Session Manager]in the Amazon Web Services // Systems Manager User Guide. This error is also returned if you attempt to start // a session on a managed node that is located in a different account or Region // -// [Getting started with Session Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html +// [Setting up Session Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html type TargetNotConnected struct { Message *string diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index 7da3ad4c16b..bec5f3e186c 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -635,11 +635,11 @@ type AttachmentsSource struct { // // - For the key SourceUrl, the value is an S3 bucket location. For example: // - // "Values": [ "s3://doc-example-bucket/my-folder" ] + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix" ] // // - For the key S3FileUrl, the value is a file in an S3 bucket. For example: // - // "Values": [ "s3://doc-example-bucket/my-folder/my-file.py" ] + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix/my-file.py" ] // // - For the key AttachmentReference, the value is constructed from the name of // another SSM document in your account, a version number of that document, and a @@ -763,6 +763,10 @@ type AutomationExecution struct { // accounts where you want to run the Automation. TargetLocations []TargetLocation + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]string @@ -820,10 +824,10 @@ type AutomationExecutionMetadata struct { // Use this filter with DescribeAutomationExecutions. Specify either Local or CrossAccount. CrossAccount is an // Automation that runs in multiple Amazon Web Services Regions and Amazon Web - // Services accounts. For more information, see [Running Automation workflows in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services Systems + // Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services Systems // Manager User Guide. // - // [Running Automation workflows in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html AutomationType AutomationType // The name of the Change Manager change request. @@ -892,6 +896,10 @@ type AutomationExecutionMetadata struct { // The list of execution outputs as defined in the Automation runbook. Target *string + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]string @@ -916,9 +924,9 @@ type BaselineOverride struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Defines the compliance level for approved patches. When an approved patch is @@ -940,9 +948,9 @@ type BaselineOverride struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages @@ -1143,11 +1151,11 @@ type CommandFilter struct { // The filter value. Valid values for each filter key are as follows: // // - InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2021-07-07T00:00:00Z to see a list of command executions occurring + // specify 2024-07-07T00:00:00Z to see a list of command executions occurring // July 7, 2021, and later. // // - InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2021-07-07T00:00:00Z to see a list of command executions from before + // specify 2024-07-07T00:00:00Z to see a list of command executions from before // July 7, 2021. // // - Status: Specify a valid command status to see a list of all command @@ -1358,11 +1366,11 @@ type CommandPlugin struct { // This was requested when issuing the command. For example, in the following // response: // - // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript // - // doc-example-bucket is the name of the S3 bucket; + // amzn-s3-demo-bucket is the name of the S3 bucket; // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; + // my-prefix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // @@ -1373,11 +1381,11 @@ type CommandPlugin struct { // executions should be stored. This was requested when issuing the command. For // example, in the following response: // - // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript // - // doc-example-bucket is the name of the S3 bucket; + // amzn-s3-demo-bucket is the name of the S3 bucket; // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; + // my-prefix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // @@ -2433,13 +2441,13 @@ type InstanceInformation struct { // (VM) when it is activated as a Systems Manager managed node. The name is // specified as the DefaultInstanceName property using the CreateActivation command. It is applied // to the managed node by specifying the Activation Code and Activation ID when you - // install SSM Agent on the node, as explained in [Install SSM Agent for a hybrid and multicloud environment (Linux)]and [Install SSM Agent for a hybrid and multicloud environment (Windows)]. To retrieve the Name tag + // install SSM Agent on the node, as explained in [How to install SSM Agent on hybrid Linux nodes]and [How to install SSM Agent on hybrid Windows Server nodes]. To retrieve the Name tag // of an EC2 instance, use the Amazon EC2 DescribeInstances operation. For // information, see [DescribeInstances]in the Amazon EC2 API Reference or [describe-instances] in the Amazon Web Services // CLI Command Reference. // - // [Install SSM Agent for a hybrid and multicloud environment (Windows)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-win.html - // [Install SSM Agent for a hybrid and multicloud environment (Linux)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html + // [How to install SSM Agent on hybrid Linux nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-linux.html + // [How to install SSM Agent on hybrid Windows Server nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.html // [DescribeInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html // [describe-instances]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html Name *string @@ -2589,11 +2597,10 @@ type InstancePatchState struct { // AWS-RunPatchBaseline , overrides the patches specified by the default patch // baseline. // - // For more information about the InstallOverrideList parameter, see [About the AWS-RunPatchBaseline SSM document] - // AWS-RunPatchBaseline SSM document in the Amazon Web Services Systems Manager - // User Guide. + // For more information about the InstallOverrideList parameter, see [SSM Command document for patching: AWS-RunPatchBaseline] + // AWS-RunPatchBaseline in the Amazon Web Services Systems Manager User Guide. // - // [About the AWS-RunPatchBaseline SSM document]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html + // [SSM Command document for patching: AWS-RunPatchBaseline]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html InstallOverrideList *string // The number of patches from the patch baseline that are installed on the managed @@ -2873,7 +2880,7 @@ type InventoryDeletionStatusItem struct { // Information about the delete operation. For more information about this // summary, see [Understanding the delete inventory summary]in the Amazon Web Services Systems Manager User Guide. // - // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete + // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory DeletionSummary *InventoryDeletionSummary // The status of the operation. Possible values are InProgress and Complete. @@ -2943,7 +2950,7 @@ type InventoryFilter struct { // The Exists filter must be used with aggregators. For more information, see [Aggregating inventory data] in // the Amazon Web Services Systems Manager User Guide. // - // [Aggregating inventory data]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-aggregate.html + // [Aggregating inventory data]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-aggregate.html Type InventoryQueryOperatorType noSmithyDocumentSerde @@ -3450,10 +3457,10 @@ type MaintenanceWindowRunCommandParameters struct { // 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]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // If this time is reached and the command hasn't already started running, it @@ -3593,10 +3600,10 @@ type MaintenanceWindowTask struct { // 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]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or tags). Managed nodes are specified using @@ -3897,8 +3904,8 @@ type OpsItem struct { // resource is a subset of source. Source *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . For more - // information, see [Editing OpsItem details]in the Amazon Web Services Systems Manager User Guide. + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. // // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Status OpsItemStatus @@ -4140,7 +4147,7 @@ type OpsItemSummary struct { // The impacted Amazon Web Services resource. Source *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . + // The OpsItem status. Status OpsItemStatus // A short heading that describes the nature of the OpsItem and the impacted @@ -4605,7 +4612,7 @@ type PatchComplianceData struct { // For descriptions of each patch state, see [About patch compliance] in the Amazon Web Services Systems // Manager User Guide. // - // [About patch compliance]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch + // [About patch compliance]: https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch // // This member is required. State PatchComplianceDataState @@ -4719,21 +4726,37 @@ type PatchRule struct { // that the patch is marked as approved in the patch baseline. For example, a value // of 7 means that patches are approved seven days after they are released. // - // This parameter is marked as not required, but your request must include a value + // This parameter is marked as Required: No , but your request must include a value // for either ApproveAfterDays or ApproveUntilDate . // // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html ApproveAfterDays *int32 // The cutoff date for auto approval of released patches. Any patches released on // or before this date are installed automatically. // - // Enter dates in the format YYYY-MM-DD . For example, 2021-12-31 . + // Enter dates in the format YYYY-MM-DD . For example, 2024-12-31 . // - // This parameter is marked as not required, but your request must include a value + // This parameter is marked as Required: No , but your request must include a value // for either ApproveUntilDate or ApproveAfterDays . // // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html ApproveUntilDate *string // A compliance severity level for all approved patches in a patch baseline. @@ -5339,12 +5362,12 @@ type SessionFilter struct { // The filter value. Valid values for each filter key are as follows: // // - InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, and + // specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and // later. // // - InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started before August 29, - // 2018. + // specify 2024-08-29T00:00:00Z to see sessions that started before August 29, + // 2024. // // - Target: Specify a managed node to which session connections have been made. // @@ -5628,10 +5651,18 @@ type TargetLocation struct { // The Amazon Web Services accounts targeted by the current Automation execution. Accounts []string + // Amazon Web Services accounts or organizational units to exclude as expanded + // targets. + ExcludeAccounts []string + // The Automation execution role used by the currently running Automation. If not // specified, the default value is AWS-SystemsManager-AutomationExecutionRole . ExecutionRoleName *string + // Indicates whether to include child organizational units (OUs) that are children + // of the targeted OUs. The default is false . + IncludeChildOrganizationUnits bool + // The Amazon Web Services Regions targeted by the current Automation execution. Regions []string @@ -5647,6 +5678,24 @@ type TargetLocation struct { // additional Automation executions for the currently running Automation. TargetLocationMaxErrors *string + // A list of key-value mappings to target resources. If you specify values for + // this data type, you must also specify a value for TargetParameterName . + // + // This Targets parameter takes precedence over the + // StartAutomationExecution:Targets parameter if both are supplied. + Targets []Target + + // The maximum number of targets allowed to run this task in parallel. This + // TargetsMaxConcurrency takes precedence over the + // StartAutomationExecution:MaxConcurrency parameter if both are supplied. + TargetsMaxConcurrency *string + + // The maximum number of errors that are allowed before the system stops running + // the automation on additional targets. This TargetsMaxErrors parameter takes + // precedence over the StartAutomationExecution:MaxErrors parameter if both are + // supplied. + TargetsMaxErrors *string + noSmithyDocumentSerde }