From 03c35535f7e52ce38e54249b3267a1b9aa4e1ab4 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 26 Sep 2024 18:31:09 +0000 Subject: [PATCH] Regenerated Clients --- .../14940b18138c4374b92c2ff4f079ad54.json | 8 + .../1cc6c1f550bb440481d2870256d1445b.json | 8 + .../41cb1ab80a6a4f1da1aab8920c4f75b1.json | 8 + .../b5c46302d91a42e3a057b8385064da08.json | 8 + .../ddb18ee3969f4ef1a8b63c3b3332aaf3.json | 8 + .../fad30d0f3a9f4451af3b619355c44118.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- .../protocoltest/awsrestjson/api_client.go | 4 +- internal/protocoltest/ec2query/api_client.go | 4 +- internal/protocoltest/jsonrpc/api_client.go | 4 +- internal/protocoltest/jsonrpc10/api_client.go | 4 +- internal/protocoltest/query/api_client.go | 4 +- internal/protocoltest/restxml/api_client.go | 4 +- .../restxmlwithnamespace/api_client.go | 4 +- .../smithyrpcv2cbor/api_client.go | 4 +- service/chatbot/deserializers.go | 90 + service/chatbot/types/types.go | 45 + .../internal/endpoints/endpoints.go | 6 + service/lambda/api_op_AddPermission.go | 18 +- service/lambda/api_op_CreateFunction.go | 18 +- service/lambda/api_op_DeleteFunction.go | 2 +- service/lambda/api_op_DeleteResourcePolicy.go | 165 -- .../api_op_GetPublicAccessBlockConfig.go | 162 -- service/lambda/api_op_GetResourcePolicy.go | 167 -- service/lambda/api_op_ListTags.go | 2 +- .../api_op_PutPublicAccessBlockConfig.go | 188 -- service/lambda/api_op_PutResourcePolicy.go | 192 -- service/lambda/api_op_RemovePermission.go | 2 +- .../api_op_UpdateFunctionConfiguration.go | 2 +- service/lambda/deserializers.go | 2484 +++++------------ service/lambda/generated.json | 5 - service/lambda/serializers.go | 429 --- service/lambda/snapshot_test.go | 120 - service/lambda/types/errors.go | 31 - service/lambda/types/types.go | 18 - service/lambda/validators.go | 201 -- service/organizations/api_op_AttachPolicy.go | 9 +- service/organizations/api_op_CreatePolicy.go | 9 +- .../api_op_DescribeEffectivePolicy.go | 7 +- .../organizations/api_op_DisablePolicyType.go | 9 +- .../organizations/api_op_EnablePolicyType.go | 9 +- service/organizations/api_op_ListPolicies.go | 9 +- .../api_op_ListPoliciesForTarget.go | 9 +- service/organizations/types/enums.go | 4 + service/pcs/api_op_CreateComputeNodeGroup.go | 13 +- service/pcs/api_op_UpdateComputeNodeGroup.go | 11 +- service/pcs/types/types.go | 34 +- service/rdsdata/api_op_BeginTransaction.go | 6 +- service/rdsdata/api_op_ExecuteSql.go | 6 +- service/rdsdata/doc.go | 4 +- service/sagemaker/api_op_CreateDomain.go | 4 + service/sagemaker/api_op_DescribeDomain.go | 3 + service/sagemaker/api_op_UpdateDomain.go | 4 + service/sagemaker/deserializers.go | 9 + service/sagemaker/serializers.go | 10 + service/sagemaker/types/enums.go | 19 + 56 files changed, 1154 insertions(+), 3463 deletions(-) create mode 100644 .changelog/14940b18138c4374b92c2ff4f079ad54.json create mode 100644 .changelog/1cc6c1f550bb440481d2870256d1445b.json create mode 100644 .changelog/41cb1ab80a6a4f1da1aab8920c4f75b1.json create mode 100644 .changelog/b5c46302d91a42e3a057b8385064da08.json create mode 100644 .changelog/ddb18ee3969f4ef1a8b63c3b3332aaf3.json create mode 100644 .changelog/fad30d0f3a9f4451af3b619355c44118.json delete mode 100644 service/lambda/api_op_DeleteResourcePolicy.go delete mode 100644 service/lambda/api_op_GetPublicAccessBlockConfig.go delete mode 100644 service/lambda/api_op_GetResourcePolicy.go delete mode 100644 service/lambda/api_op_PutPublicAccessBlockConfig.go delete mode 100644 service/lambda/api_op_PutResourcePolicy.go diff --git a/.changelog/14940b18138c4374b92c2ff4f079ad54.json b/.changelog/14940b18138c4374b92c2ff4f079ad54.json new file mode 100644 index 00000000000..6f1dd92cee0 --- /dev/null +++ b/.changelog/14940b18138c4374b92c2ff4f079ad54.json @@ -0,0 +1,8 @@ +{ + "id": "14940b18-138c-4374-b92c-2ff4f079ad54", + "type": "feature", + "description": "Adding `TagPropagation` attribute to Sagemaker API", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/1cc6c1f550bb440481d2870256d1445b.json b/.changelog/1cc6c1f550bb440481d2870256d1445b.json new file mode 100644 index 00000000000..5370c5bf85e --- /dev/null +++ b/.changelog/1cc6c1f550bb440481d2870256d1445b.json @@ -0,0 +1,8 @@ +{ + "id": "1cc6c1f5-50bb-4404-81d2-870256d1445b", + "type": "documentation", + "description": "AWS PCS API documentation - Edited the description of the iamInstanceProfileArn parameter of the CreateComputeNodeGroup and UpdateComputeNodeGroup actions; edited the description of the SlurmCustomSetting data type to list the supported parameters for clusters and compute node groups.", + "modules": [ + "service/pcs" + ] +} \ No newline at end of file diff --git a/.changelog/41cb1ab80a6a4f1da1aab8920c4f75b1.json b/.changelog/41cb1ab80a6a4f1da1aab8920c4f75b1.json new file mode 100644 index 00000000000..565f5caaee0 --- /dev/null +++ b/.changelog/41cb1ab80a6a4f1da1aab8920c4f75b1.json @@ -0,0 +1,8 @@ +{ + "id": "41cb1ab8-0a6a-4f1d-a1aa-b8920c4f75b1", + "type": "documentation", + "description": "Documentation update for RDS Data API to reflect support for Aurora MySQL Serverless v2 and Provisioned DB clusters.", + "modules": [ + "service/rdsdata" + ] +} \ No newline at end of file diff --git a/.changelog/b5c46302d91a42e3a057b8385064da08.json b/.changelog/b5c46302d91a42e3a057b8385064da08.json new file mode 100644 index 00000000000..417d8340fff --- /dev/null +++ b/.changelog/b5c46302d91a42e3a057b8385064da08.json @@ -0,0 +1,8 @@ +{ + "id": "b5c46302-d91a-42e3-a057-b8385064da08", + "type": "feature", + "description": "Add support for policy operations on the CHATBOT_POLICY policy type.", + "modules": [ + "service/organizations" + ] +} \ No newline at end of file diff --git a/.changelog/ddb18ee3969f4ef1a8b63c3b3332aaf3.json b/.changelog/ddb18ee3969f4ef1a8b63c3b3332aaf3.json new file mode 100644 index 00000000000..654130ffe95 --- /dev/null +++ b/.changelog/ddb18ee3969f4ef1a8b63c3b3332aaf3.json @@ -0,0 +1,8 @@ +{ + "id": "ddb18ee3-969f-4ef1-a8b6-3c3b3332aaf3", + "type": "feature", + "description": "Reverting Lambda resource-based policy and block public access APIs.", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/fad30d0f3a9f4451af3b619355c44118.json b/.changelog/fad30d0f3a9f4451af3b619355c44118.json new file mode 100644 index 00000000000..c97ba6bf956 --- /dev/null +++ b/.changelog/fad30d0f3a9f4451af3b619355c44118.json @@ -0,0 +1,8 @@ +{ + "id": "fad30d0f-3a9f-4451-af3b-619355c44118", + "type": "feature", + "description": "Return State and StateReason fields for Chatbot Channel Configurations.", + "modules": [ + "service/chatbot" + ] +} \ 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 ce4728b5022..66d22202ee8 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.21" +const goModuleVersion = "1.15.7" diff --git a/internal/protocoltest/awsrestjson/api_client.go b/internal/protocoltest/awsrestjson/api_client.go index 4c62ec0a7ab..76ba010e677 100644 --- a/internal/protocoltest/awsrestjson/api_client.go +++ b/internal/protocoltest/awsrestjson/api_client.go @@ -190,10 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/internal/protocoltest/ec2query/api_client.go b/internal/protocoltest/ec2query/api_client.go index 493e0ebf1a5..00d38b44420 100644 --- a/internal/protocoltest/ec2query/api_client.go +++ b/internal/protocoltest/ec2query/api_client.go @@ -190,10 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/internal/protocoltest/jsonrpc/api_client.go b/internal/protocoltest/jsonrpc/api_client.go index 784a612eb39..da055389f7d 100644 --- a/internal/protocoltest/jsonrpc/api_client.go +++ b/internal/protocoltest/jsonrpc/api_client.go @@ -186,10 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/internal/protocoltest/jsonrpc10/api_client.go b/internal/protocoltest/jsonrpc10/api_client.go index 9c5a429114a..ef529308e91 100644 --- a/internal/protocoltest/jsonrpc10/api_client.go +++ b/internal/protocoltest/jsonrpc10/api_client.go @@ -186,10 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/internal/protocoltest/query/api_client.go b/internal/protocoltest/query/api_client.go index 767aadd156b..5cb36b09f77 100644 --- a/internal/protocoltest/query/api_client.go +++ b/internal/protocoltest/query/api_client.go @@ -190,10 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/internal/protocoltest/restxml/api_client.go b/internal/protocoltest/restxml/api_client.go index ed99b56c19a..097b0d8cf88 100644 --- a/internal/protocoltest/restxml/api_client.go +++ b/internal/protocoltest/restxml/api_client.go @@ -190,10 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/internal/protocoltest/restxmlwithnamespace/api_client.go b/internal/protocoltest/restxmlwithnamespace/api_client.go index 08be214d175..50321ddc4f6 100644 --- a/internal/protocoltest/restxmlwithnamespace/api_client.go +++ b/internal/protocoltest/restxmlwithnamespace/api_client.go @@ -186,10 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/internal/protocoltest/smithyrpcv2cbor/api_client.go b/internal/protocoltest/smithyrpcv2cbor/api_client.go index 4eb326ee343..a9c14e64adf 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_client.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_client.go @@ -181,10 +181,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) - resolveTracerProvider(&options) - resolveMeterProvider(&options) + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { diff --git a/service/chatbot/deserializers.go b/service/chatbot/deserializers.go index 2cbb344d237..c3be23b26ae 100644 --- a/service/chatbot/deserializers.go +++ b/service/chatbot/deserializers.go @@ -4882,6 +4882,24 @@ func awsRestjson1_deserializeDocumentChimeWebhookConfiguration(v **types.ChimeWe return err } + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + case "Tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err @@ -4961,6 +4979,24 @@ func awsRestjson1_deserializeDocumentConfiguredTeam(v **types.ConfiguredTeam, va for key, value := range shape { switch key { + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + case "TeamId": if value != nil { jtv, ok := value.(string) @@ -6211,6 +6247,24 @@ func awsRestjson1_deserializeDocumentSlackChannelConfiguration(v **types.SlackCh return err } + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + case "Tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err @@ -6418,6 +6472,24 @@ func awsRestjson1_deserializeDocumentSlackWorkspace(v **types.SlackWorkspace, va sv.SlackTeamName = ptr.String(jtv) } + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + default: _, _ = key, value @@ -6734,6 +6806,24 @@ func awsRestjson1_deserializeDocumentTeamsChannelConfiguration(v **types.TeamsCh return err } + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceState to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + case "Tags": if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err diff --git a/service/chatbot/types/types.go b/service/chatbot/types/types.go index a7322f74632..6e8c9485c6f 100644 --- a/service/chatbot/types/types.go +++ b/service/chatbot/types/types.go @@ -67,6 +67,15 @@ type ChimeWebhookConfiguration struct { // Logging levels include ERROR , INFO , or NONE . LoggingLevel *string + // Either ENABLED or DISABLED . The resource returns DISABLED if the + // organization's AWS Chatbot policy has explicitly denied that configuration. For + // example, if Amazon Chime is disabled. + State *string + + // Provided if State is DISABLED . Provides context as to why the resource is + // disabled. + StateReason *string + // A map of tags assigned to a resource. A tag is a string-to-string map of // key-value pairs. Tags []Tag @@ -94,6 +103,15 @@ type ConfiguredTeam struct { // This member is required. TenantId *string + // Either ENABLED or DISABLED . The resource returns DISABLED if the + // organization's AWS Chatbot policy has explicitly denied that configuration. For + // example, if Amazon Chime is disabled. + State *string + + // Provided if State is DISABLED . Provides context as to why the resource is + // disabled. + StateReason *string + // The name of the Microsoft Teams Team. TeamName *string @@ -157,6 +175,15 @@ type SlackChannelConfiguration struct { // Logging levels include ERROR , INFO , or NONE . LoggingLevel *string + // Either ENABLED or DISABLED . The resource returns DISABLED if the + // organization's AWS Chatbot policy has explicitly denied that configuration. For + // example, if Amazon Chime is disabled. + State *string + + // Provided if State is DISABLED . Provides context as to why the resource is + // disabled. + StateReason *string + // A map of tags assigned to a resource. A tag is a string-to-string map of // key-value pairs. Tags []Tag @@ -215,6 +242,15 @@ type SlackWorkspace struct { // This member is required. SlackTeamName *string + // Either ENABLED or DISABLED . The resource returns DISABLED if the + // organization's AWS Chatbot policy has explicitly denied that configuration. For + // example, if Amazon Chime is disabled. + State *string + + // Provided if State is DISABLED . Provides context as to why the resource is + // disabled. + StateReason *string + noSmithyDocumentSerde } @@ -301,6 +337,15 @@ type TeamsChannelConfiguration struct { // Logging levels include ERROR , INFO , or NONE . LoggingLevel *string + // Either ENABLED or DISABLED . The resource returns DISABLED if the + // organization's AWS Chatbot policy has explicitly denied that configuration. For + // example, if Amazon Chime is disabled. + State *string + + // Provided if State is DISABLED . Provides context as to why the resource is + // disabled. + StateReason *string + // A map of tags assigned to a resource. A tag is a string-to-string map of // key-value pairs. Tags []Tag diff --git a/service/healthlake/internal/endpoints/endpoints.go b/service/healthlake/internal/endpoints/endpoints.go index d1a6953563b..372bb77814d 100644 --- a/service/healthlake/internal/endpoints/endpoints.go +++ b/service/healthlake/internal/endpoints/endpoints.go @@ -142,6 +142,12 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, diff --git a/service/lambda/api_op_AddPermission.go b/service/lambda/api_op_AddPermission.go index 129572dfe15..aa9d8e88e36 100644 --- a/service/lambda/api_op_AddPermission.go +++ b/service/lambda/api_op_AddPermission.go @@ -19,13 +19,13 @@ import ( // // To grant permission to another account, specify the account ID as the Principal // . To grant permission to an organization defined in Organizations, specify the -// organization ID as the PrincipalOrgID . For Amazon Web Servicesservices, the +// organization ID as the PrincipalOrgID . For Amazon Web Services services, the // principal is a domain-style identifier that the service defines, such as -// s3.amazonaws.com or sns.amazonaws.com . For Amazon Web Servicesservices, you can -// also specify the ARN of the associated resource as the SourceArn . If you grant -// permission to a service principal without specifying the source, other accounts -// could potentially configure resources in their account to invoke your Lambda -// function. +// s3.amazonaws.com or sns.amazonaws.com . For Amazon Web Services services, you +// can also specify the ARN of the associated resource as the SourceArn . If you +// grant permission to a service principal without specifying the source, other +// accounts could potentially configure resources in their account to invoke your +// Lambda function. // // This operation adds a statement to a resource-based permissions policy for the // function. For more information about function policies, see [Using resource-based policies for Lambda]. @@ -72,7 +72,7 @@ type AddPermissionInput struct { // This member is required. FunctionName *string - // The Amazon Web Servicesservice, Amazon Web Services account, IAM user, or IAM + // The Amazon Web Services service, Amazon Web Services account, IAM user, or IAM // role that invokes the function. If you specify a service, use SourceArn or // SourceAccount to limit who can invoke the function through that service. // @@ -108,13 +108,13 @@ type AddPermissionInput struct { // this option to avoid modifying a policy that has changed since you last read it. RevisionId *string - // For Amazon Web Servicesservice, the ID of the Amazon Web Services account that + // For Amazon Web Services service, the ID of the Amazon Web Services account that // owns the resource. Use this together with SourceArn to ensure that the // specified account owns the resource. It is possible for an Amazon S3 bucket to // be deleted by its owner and recreated by another account. SourceAccount *string - // For Amazon Web Servicesservices, the ARN of the Amazon Web Services resource + // For Amazon Web Services services, the ARN of the Amazon Web Services resource // that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic. // // Note that Lambda configures the comparison using the StringLike operator. diff --git a/service/lambda/api_op_CreateFunction.go b/service/lambda/api_op_CreateFunction.go index f8e98d7fa30..918cc2624c1 100644 --- a/service/lambda/api_op_CreateFunction.go +++ b/service/lambda/api_op_CreateFunction.go @@ -14,8 +14,8 @@ import ( // Creates a Lambda function. To create a function, you need a [deployment package] and an [execution role]. The // deployment package is a .zip file archive or container image that contains your // function code. The execution role grants the function permission to use Amazon -// Web Servicesservices, such as Amazon CloudWatch Logs for log streaming and X-Ray -// for request tracing. +// Web Services services, such as Amazon CloudWatch Logs for log streaming and +// X-Ray for request tracing. // // If the deployment package is a [container image], then you set the package type to Image . For a // container image, the code property must include the URI of a container image in @@ -54,15 +54,15 @@ import ( // code-signing configuration includes set of signing profiles, which define the // trusted publishers for this function. // -// If another Amazon Web Services account or an Amazon Web Servicesservice invokes -// your function, use AddPermissionto grant permission by creating a resource-based Identity -// and Access Management (IAM) policy. You can grant permissions at the function -// level, on a version, or on an alias. +// If another Amazon Web Services account or an Amazon Web Services service +// invokes your function, use AddPermissionto grant permission by creating a resource-based +// Identity and Access Management (IAM) policy. You can grant permissions at the +// function level, on a version, or on an alias. // // To invoke your function directly, use Invoke. To invoke your function in response to -// events in other Amazon Web Servicesservices, create an event source mapping (CreateEventSourceMapping ), -// or configure a function trigger in the other service. For more information, see [Invoking Lambda functions] -// . +// events in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping +// ), or configure a function trigger in the other service. For more information, +// see [Invoking Lambda functions]. // // [Invoking Lambda functions]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html // [Lambda function states]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html diff --git a/service/lambda/api_op_DeleteFunction.go b/service/lambda/api_op_DeleteFunction.go index 512c0dc87b1..ce30b53f668 100644 --- a/service/lambda/api_op_DeleteFunction.go +++ b/service/lambda/api_op_DeleteFunction.go @@ -15,7 +15,7 @@ import ( // doesn't require the user to have explicit permissions for DeleteAlias. // // To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon -// Web Servicesservices and resources that invoke your function directly, delete +// Web Services services and resources that invoke your function directly, delete // the trigger in the service where you originally configured it. func (c *Client) DeleteFunction(ctx context.Context, params *DeleteFunctionInput, optFns ...func(*Options)) (*DeleteFunctionOutput, error) { if params == nil { diff --git a/service/lambda/api_op_DeleteResourcePolicy.go b/service/lambda/api_op_DeleteResourcePolicy.go deleted file mode 100644 index a74b3b6107a..00000000000 --- a/service/lambda/api_op_DeleteResourcePolicy.go +++ /dev/null @@ -1,165 +0,0 @@ -// 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" -) - -// The option to create and modify full JSON resource-based policies, and to use -// the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't -// be available in all Amazon Web Services Regions until September 30, 2024. -// -// 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 = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = 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 - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_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 deleted file mode 100644 index 81f943cb812..00000000000 --- a/service/lambda/api_op_GetPublicAccessBlockConfig.go +++ /dev/null @@ -1,162 +0,0 @@ -// 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" -) - -// The option to configure public-access settings, and to use the -// PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be available in all -// Amazon Web Services Regions until September 30, 2024. -// -// 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 = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = 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 - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_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 deleted file mode 100644 index 0776d0a3409..00000000000 --- a/service/lambda/api_op_GetResourcePolicy.go +++ /dev/null @@ -1,167 +0,0 @@ -// 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" -) - -// The option to create and modify full JSON resource-based policies, and to use -// the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't -// be available in all Amazon Web Services Regions until September 30, 2024. -// -// 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 = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = 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 - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetResourcePolicy", - } -} diff --git a/service/lambda/api_op_ListTags.go b/service/lambda/api_op_ListTags.go index 937b2a29837..36ef9f6dca2 100644 --- a/service/lambda/api_op_ListTags.go +++ b/service/lambda/api_op_ListTags.go @@ -11,7 +11,7 @@ import ( ) // Returns a function, event source mapping, or code signing configuration's [tags]. You -// can also view funciton tags with GetFunction. +// can also view function tags with GetFunction. // // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ...func(*Options)) (*ListTagsOutput, error) { diff --git a/service/lambda/api_op_PutPublicAccessBlockConfig.go b/service/lambda/api_op_PutPublicAccessBlockConfig.go deleted file mode 100644 index 8a61645b774..00000000000 --- a/service/lambda/api_op_PutPublicAccessBlockConfig.go +++ /dev/null @@ -1,188 +0,0 @@ -// 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" -) - -// The option to configure public-access settings, and to use the -// PutPublicAccessBlock and GetPublicAccessBlock APIs, won't be available in all -// Amazon Web Services Regions until September 30, 2024. -// -// 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 = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = 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 - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_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 deleted file mode 100644 index db7c65b0d0b..00000000000 --- a/service/lambda/api_op_PutResourcePolicy.go +++ /dev/null @@ -1,192 +0,0 @@ -// 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" -) - -// The option to create and modify full JSON resource-based policies, and to use -// the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won't -// be available in all Amazon Web Services Regions until September 30, 2024. -// -// 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 = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = 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 - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutResourcePolicy", - } -} diff --git a/service/lambda/api_op_RemovePermission.go b/service/lambda/api_op_RemovePermission.go index d045cff8b56..2aa97662fe2 100644 --- a/service/lambda/api_op_RemovePermission.go +++ b/service/lambda/api_op_RemovePermission.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Revokes function-use permission from an Amazon Web Servicesservice or another +// Revokes function-use permission from an Amazon Web Services service or another // Amazon Web Services account. You can get the ID of the statement from the output // of GetPolicy. func (c *Client) RemovePermission(ctx context.Context, params *RemovePermissionInput, optFns ...func(*Options)) (*RemovePermissionOutput, error) { diff --git a/service/lambda/api_op_UpdateFunctionConfiguration.go b/service/lambda/api_op_UpdateFunctionConfiguration.go index e9433d724c7..0afa8430eee 100644 --- a/service/lambda/api_op_UpdateFunctionConfiguration.go +++ b/service/lambda/api_op_UpdateFunctionConfiguration.go @@ -26,7 +26,7 @@ import ( // only the unpublished version. // // To configure function concurrency, use PutFunctionConcurrency. To grant invoke permissions to an -// Amazon Web Services account or Amazon Web Servicesservice, use AddPermission. +// Amazon Web Services account or Amazon Web Services service, use AddPermission. // // [Lambda function states]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html func (c *Client) UpdateFunctionConfiguration(ctx context.Context, params *UpdateFunctionConfigurationInput, optFns ...func(*Options)) (*UpdateFunctionConfigurationOutput, error) { diff --git a/service/lambda/deserializers.go b/service/lambda/deserializers.go index 4e11ff715d0..ded498a1b22 100644 --- a/service/lambda/deserializers.go +++ b/service/lambda/deserializers.go @@ -328,9 +328,6 @@ func awsRestjson1_deserializeOpErrorAddPermission(response *smithyhttp.Response, 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) @@ -3199,115 +3196,6 @@ 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, 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), - } - } - - span.End() - 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 { } @@ -6834,14 +6722,14 @@ func awsRestjson1_deserializeOpDocumentGetProvisionedConcurrencyConfigOutput(v * return nil } -type awsRestjson1_deserializeOpGetPublicAccessBlockConfig struct { +type awsRestjson1_deserializeOpGetRuntimeManagementConfig struct { } -func (*awsRestjson1_deserializeOpGetPublicAccessBlockConfig) ID() string { +func (*awsRestjson1_deserializeOpGetRuntimeManagementConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetPublicAccessBlockConfig) 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) @@ -6859,9 +6747,9 @@ func (m *awsRestjson1_deserializeOpGetPublicAccessBlockConfig) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPublicAccessBlockConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response, &metadata) } - output := &GetPublicAccessBlockConfigOutput{} + output := &GetRuntimeManagementConfigOutput{} out.Result = output var buff [1024]byte @@ -6882,7 +6770,7 @@ func (m *awsRestjson1_deserializeOpGetPublicAccessBlockConfig) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetPublicAccessBlockConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6896,7 +6784,7 @@ func (m *awsRestjson1_deserializeOpGetPublicAccessBlockConfig) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetPublicAccessBlockConfig(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)} @@ -6959,7 +6847,7 @@ func awsRestjson1_deserializeOpErrorGetPublicAccessBlockConfig(response *smithyh } } -func awsRestjson1_deserializeOpDocumentGetPublicAccessBlockConfigOutput(v **GetPublicAccessBlockConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetRuntimeManagementConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6972,18 +6860,40 @@ func awsRestjson1_deserializeOpDocumentGetPublicAccessBlockConfigOutput(v **GetP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetPublicAccessBlockConfigOutput + var sv *GetRuntimeManagementConfigOutput if *v == nil { - sv = &GetPublicAccessBlockConfigOutput{} + sv = &GetRuntimeManagementConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "PublicAccessBlockConfig": - if err := awsRestjson1_deserializeDocumentPublicAccessBlockConfig(&sv.PublicAccessBlockConfig, value); err != nil { - return err + 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: @@ -6995,14 +6905,14 @@ func awsRestjson1_deserializeOpDocumentGetPublicAccessBlockConfigOutput(v **GetP return nil } -type awsRestjson1_deserializeOpGetResourcePolicy struct { +type awsRestjson1_deserializeOpInvoke struct { } -func (*awsRestjson1_deserializeOpGetResourcePolicy) ID() string { +func (*awsRestjson1_deserializeOpInvoke) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetResourcePolicy) 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) @@ -7020,44 +6930,26 @@ func (m *awsRestjson1_deserializeOpGetResourcePolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicy(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorInvoke(response, &metadata) } - output := &GetResourcePolicyOutput{} + output := &InvokeOutput{} 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_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_deserializeOpDocumentGetResourcePolicyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentInvokeOutput(output, response.Body, response.ContentLength) 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 deserialize response payload, %w", err)} } span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetResourcePolicy(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)} @@ -7098,18 +6990,96 @@ func awsRestjson1_deserializeOpErrorGetResourcePolicy(response *smithyhttp.Respo } 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, @@ -7120,63 +7090,60 @@ func awsRestjson1_deserializeOpErrorGetResourcePolicy(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, value interface{}) error { +func awsRestjson1_deserializeOpHttpBindingsInvokeOutput(v *InvokeOutput, response *smithyhttp.Response) error { if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) + return fmt.Errorf("unsupported deserialization for nil %T", v) } - if value == nil { - return nil + + if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ExecutedVersion = 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-Function-Error"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.FunctionError = ptr.String(headerValues[0]) } - var sv *GetResourcePolicyOutput - if *v == nil { - sv = &GetResourcePolicyOutput{} - } else { - sv = *v + if headerValues := response.Header.Values("X-Amz-Log-Result"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.LogResult = ptr.String(headerValues[0]) } - 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) - } + v.StatusCode = int32(response.StatusCode) - 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) - } + 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) + } - default: - _, _ = key, value + 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() } - *v = sv return nil } -type awsRestjson1_deserializeOpGetRuntimeManagementConfig struct { +type awsRestjson1_deserializeOpInvokeAsync struct { } -func (*awsRestjson1_deserializeOpGetRuntimeManagementConfig) ID() string { +func (*awsRestjson1_deserializeOpInvokeAsync) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) 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) @@ -7194,44 +7161,21 @@ func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorInvokeAsync(response, &metadata) } - output := &GetRuntimeManagementConfigOutput{} + 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_deserializeOpDocumentGetRuntimeManagementConfigOutput(&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)} } span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(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)} @@ -7272,8 +7216,14 @@ func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response *smithyh } 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) @@ -7281,9 +7231,6 @@ func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response *smithyh 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, @@ -7294,72 +7241,24 @@ func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response *smithyh } } -func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetRuntimeManagementConfigOutput, 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 *GetRuntimeManagementConfigOutput - if *v == nil { - sv = &GetRuntimeManagementConfigOutput{} - } else { - sv = *v + return fmt.Errorf("unsupported deserialization for nil %T", 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.Status = int32(response.StatusCode) - } - } - *v = sv return nil } -type awsRestjson1_deserializeOpInvoke struct { +type awsRestjson1_deserializeOpInvokeWithResponseStream struct { } -func (*awsRestjson1_deserializeOpInvoke) ID() string { +func (*awsRestjson1_deserializeOpInvokeWithResponseStream) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpInvoke) 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) @@ -7377,26 +7276,21 @@ 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_deserializeOpErrorInvokeWithResponseStream(response, &metadata) } - output := &InvokeOutput{} + output := &InvokeWithResponseStreamOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsInvokeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(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)} - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorInvoke(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)} @@ -7537,7 +7431,7 @@ func awsRestjson1_deserializeOpErrorInvoke(response *smithyhttp.Response, metada } } -func awsRestjson1_deserializeOpHttpBindingsInvokeOutput(v *InvokeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *InvokeWithResponseStreamOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -7547,50 +7441,24 @@ func awsRestjson1_deserializeOpHttpBindingsInvokeOutput(v *InvokeOutput, respons v.ExecutedVersion = ptr.String(headerValues[0]) } - if headerValues := response.Header.Values("X-Amz-Function-Error"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.FunctionError = ptr.String(headerValues[0]) - } - - if headerValues := response.Header.Values("X-Amz-Log-Result"); len(headerValues) != 0 { + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.LogResult = ptr.String(headerValues[0]) + v.ResponseStreamContentType = 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) - } - - 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 -} -type awsRestjson1_deserializeOpInvokeAsync struct { +type awsRestjson1_deserializeOpListAliases struct { } -func (*awsRestjson1_deserializeOpInvokeAsync) ID() string { +func (*awsRestjson1_deserializeOpListAliases) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpInvokeAsync) 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) @@ -7608,21 +7476,44 @@ 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_deserializeOpErrorListAliases(response, &metadata) } - output := &InvokeAsyncOutput{} + output := &ListAliasesOutput{} 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_deserializeOpDocumentListAliasesOutput(&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(), + } } span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorInvokeAsync(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)} @@ -7663,14 +7554,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) @@ -7678,6 +7563,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, @@ -7688,24 +7576,59 @@ func awsRestjson1_deserializeOpErrorInvokeAsync(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(v *InvokeAsyncOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, 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 *ListAliasesOutput + if *v == nil { + sv = &ListAliasesOutput{} + } else { + sv = *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 = sv return nil } -type awsRestjson1_deserializeOpInvokeWithResponseStream struct { +type awsRestjson1_deserializeOpListCodeSigningConfigs struct { } -func (*awsRestjson1_deserializeOpInvokeWithResponseStream) ID() string { +func (*awsRestjson1_deserializeOpListCodeSigningConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) 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) @@ -7723,21 +7646,44 @@ func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response, &metadata) } - output := &InvokeWithResponseStreamOutput{} + output := &ListCodeSigningConfigsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(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_deserializeOpDocumentListCodeSigningConfigsOutput(&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(), + } } span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(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)} @@ -7778,96 +7724,12 @@ func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response *smithyhtt } 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, @@ -7878,34 +7740,59 @@ func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response *smithyhtt } } -func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *InvokeWithResponseStreamOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCodeSigningConfigsOutput, 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 } - if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ExecutedVersion = 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("Content-Type"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ResponseStreamContentType = ptr.String(headerValues[0]) + var sv *ListCodeSigningConfigsOutput + if *v == nil { + sv = &ListCodeSigningConfigsOutput{} + } else { + sv = *v } - v.StatusCode = int32(response.StatusCode) + 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 = sv return nil } -type awsRestjson1_deserializeOpListAliases struct { +type awsRestjson1_deserializeOpListEventSourceMappings struct { } -func (*awsRestjson1_deserializeOpListAliases) ID() string { +func (*awsRestjson1_deserializeOpListEventSourceMappings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAliases) 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) @@ -7923,9 +7810,9 @@ 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_deserializeOpErrorListEventSourceMappings(response, &metadata) } - output := &ListAliasesOutput{} + output := &ListEventSourceMappingsOutput{} out.Result = output var buff [1024]byte @@ -7946,7 +7833,7 @@ func (m *awsRestjson1_deserializeOpListAliases) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAliasesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7960,7 +7847,7 @@ func (m *awsRestjson1_deserializeOpListAliases) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAliases(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)} @@ -8023,7 +7910,7 @@ func awsRestjson1_deserializeOpErrorListAliases(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEventSourceMappingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8036,17 +7923,17 @@ func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAliasesOutput + var sv *ListEventSourceMappingsOutput if *v == nil { - sv = &ListAliasesOutput{} + sv = &ListEventSourceMappingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Aliases": - if err := awsRestjson1_deserializeDocumentAliasList(&sv.Aliases, value); err != nil { + case "EventSourceMappings": + if err := awsRestjson1_deserializeDocumentEventSourceMappingsList(&sv.EventSourceMappings, value); err != nil { return err } @@ -8068,14 +7955,14 @@ func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, return nil } -type awsRestjson1_deserializeOpListCodeSigningConfigs struct { +type awsRestjson1_deserializeOpListFunctionEventInvokeConfigs struct { } -func (*awsRestjson1_deserializeOpListCodeSigningConfigs) ID() string { +func (*awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) 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) @@ -8093,9 +7980,9 @@ func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response, &metadata) } - output := &ListCodeSigningConfigsOutput{} + output := &ListFunctionEventInvokeConfigsOutput{} out.Result = output var buff [1024]byte @@ -8116,7 +8003,7 @@ func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8130,7 +8017,7 @@ func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(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)} @@ -8174,9 +8061,15 @@ func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(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) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8187,7 +8080,7 @@ func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCodeSigningConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v **ListFunctionEventInvokeConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8200,17 +8093,17 @@ func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCode return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListCodeSigningConfigsOutput + var sv *ListFunctionEventInvokeConfigsOutput if *v == nil { - sv = &ListCodeSigningConfigsOutput{} + sv = &ListFunctionEventInvokeConfigsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CodeSigningConfigs": - if err := awsRestjson1_deserializeDocumentCodeSigningConfigList(&sv.CodeSigningConfigs, value); err != nil { + case "FunctionEventInvokeConfigs": + if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(&sv.FunctionEventInvokeConfigs, value); err != nil { return err } @@ -8232,14 +8125,14 @@ func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCode return nil } -type awsRestjson1_deserializeOpListEventSourceMappings struct { +type awsRestjson1_deserializeOpListFunctions struct { } -func (*awsRestjson1_deserializeOpListEventSourceMappings) ID() string { +func (*awsRestjson1_deserializeOpListFunctions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEventSourceMappings) 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) @@ -8257,9 +8150,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_deserializeOpErrorListFunctions(response, &metadata) } - output := &ListEventSourceMappingsOutput{} + output := &ListFunctionsOutput{} out.Result = output var buff [1024]byte @@ -8280,7 +8173,7 @@ func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8294,7 +8187,7 @@ func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEventSourceMappings(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)} @@ -8338,9 +8231,6 @@ func awsRestjson1_deserializeOpErrorListEventSourceMappings(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) @@ -8357,7 +8247,7 @@ func awsRestjson1_deserializeOpErrorListEventSourceMappings(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEventSourceMappingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8370,17 +8260,17 @@ func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEve return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEventSourceMappingsOutput + var sv *ListFunctionsOutput if *v == nil { - sv = &ListEventSourceMappingsOutput{} + sv = &ListFunctionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "EventSourceMappings": - if err := awsRestjson1_deserializeDocumentEventSourceMappingsList(&sv.EventSourceMappings, value); err != nil { + case "Functions": + if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Functions, value); err != nil { return err } @@ -8402,14 +8292,14 @@ func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEve return nil } -type awsRestjson1_deserializeOpListFunctionEventInvokeConfigs struct { +type awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig struct { } -func (*awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) ID() string { +func (*awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) 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) @@ -8427,9 +8317,9 @@ func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response, &metadata) } - output := &ListFunctionEventInvokeConfigsOutput{} + output := &ListFunctionsByCodeSigningConfigOutput{} out.Result = output var buff [1024]byte @@ -8450,7 +8340,7 @@ func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8464,7 +8354,7 @@ func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(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)} @@ -8514,9 +8404,6 @@ func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response *smi 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, @@ -8527,7 +8414,7 @@ func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response *smi } } -func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v **ListFunctionEventInvokeConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v **ListFunctionsByCodeSigningConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8540,17 +8427,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionEventInvokeConfigsOutput + var sv *ListFunctionsByCodeSigningConfigOutput if *v == nil { - sv = &ListFunctionEventInvokeConfigsOutput{} + sv = &ListFunctionsByCodeSigningConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionEventInvokeConfigs": - if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(&sv.FunctionEventInvokeConfigs, value); err != nil { + case "FunctionArns": + if err := awsRestjson1_deserializeDocumentFunctionArnList(&sv.FunctionArns, value); err != nil { return err } @@ -8572,14 +8459,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v ** return nil } -type awsRestjson1_deserializeOpListFunctions struct { +type awsRestjson1_deserializeOpListFunctionUrlConfigs struct { } -func (*awsRestjson1_deserializeOpListFunctions) ID() string { +func (*awsRestjson1_deserializeOpListFunctionUrlConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctions) 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) @@ -8597,9 +8484,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_deserializeOpErrorListFunctionUrlConfigs(response, &metadata) } - output := &ListFunctionsOutput{} + output := &ListFunctionUrlConfigsOutput{} out.Result = output var buff [1024]byte @@ -8620,7 +8507,7 @@ func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8634,7 +8521,7 @@ func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctions(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)} @@ -8678,6 +8565,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) @@ -8694,7 +8584,7 @@ func awsRestjson1_deserializeOpErrorListFunctions(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunctionUrlConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8707,17 +8597,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionsOutput + var sv *ListFunctionUrlConfigsOutput if *v == nil { - sv = &ListFunctionsOutput{} + sv = &ListFunctionUrlConfigsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Functions": - if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Functions, value); err != nil { + case "FunctionUrlConfigs": + if err := awsRestjson1_deserializeDocumentFunctionUrlConfigList(&sv.FunctionUrlConfigs, value); err != nil { return err } @@ -8739,14 +8629,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutp return nil } -type awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig struct { +type awsRestjson1_deserializeOpListLayers struct { } -func (*awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) ID() string { +func (*awsRestjson1_deserializeOpListLayers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) 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) @@ -8764,9 +8654,9 @@ func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLayers(response, &metadata) } - output := &ListFunctionsByCodeSigningConfigOutput{} + output := &ListLayersOutput{} out.Result = output var buff [1024]byte @@ -8787,7 +8677,7 @@ func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8801,7 +8691,7 @@ func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(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)} @@ -8845,12 +8735,12 @@ func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response *s 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, @@ -8861,7 +8751,7 @@ func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response *s } } -func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v **ListFunctionsByCodeSigningConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8874,17 +8764,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionsByCodeSigningConfigOutput + var sv *ListLayersOutput if *v == nil { - sv = &ListFunctionsByCodeSigningConfigOutput{} + sv = &ListLayersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionArns": - if err := awsRestjson1_deserializeDocumentFunctionArnList(&sv.FunctionArns, value); err != nil { + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersList(&sv.Layers, value); err != nil { return err } @@ -8906,14 +8796,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v return nil } -type awsRestjson1_deserializeOpListFunctionUrlConfigs struct { +type awsRestjson1_deserializeOpListLayerVersions struct { } -func (*awsRestjson1_deserializeOpListFunctionUrlConfigs) ID() string { +func (*awsRestjson1_deserializeOpListLayerVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) 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) @@ -8931,9 +8821,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_deserializeOpErrorListLayerVersions(response, &metadata) } - output := &ListFunctionUrlConfigsOutput{} + output := &ListLayerVersionsOutput{} out.Result = output var buff [1024]byte @@ -8954,7 +8844,7 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8968,7 +8858,7 @@ func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(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)} @@ -9031,7 +8921,7 @@ func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunctionUrlConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9044,17 +8934,17 @@ func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFunctionUrlConfigsOutput + var sv *ListLayerVersionsOutput if *v == nil { - sv = &ListFunctionUrlConfigsOutput{} + sv = &ListLayerVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "FunctionUrlConfigs": - if err := awsRestjson1_deserializeDocumentFunctionUrlConfigList(&sv.FunctionUrlConfigs, value); err != nil { + case "LayerVersions": + if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil { return err } @@ -9076,14 +8966,14 @@ func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunc return nil } -type awsRestjson1_deserializeOpListLayers struct { +type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct { } -func (*awsRestjson1_deserializeOpListLayers) ID() string { +func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLayers) 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) @@ -9101,9 +8991,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_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata) } - output := &ListLayersOutput{} + output := &ListProvisionedConcurrencyConfigsOutput{} out.Result = output var buff [1024]byte @@ -9124,7 +9014,7 @@ func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9138,7 +9028,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_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)} @@ -9182,6 +9072,9 @@ 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) @@ -9198,7 +9091,7 @@ func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v **ListProvisionedConcurrencyConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9211,20 +9104,15 @@ func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLayersOutput + var sv *ListProvisionedConcurrencyConfigsOutput if *v == nil { - sv = &ListLayersOutput{} + sv = &ListProvisionedConcurrencyConfigsOutput{} } 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) @@ -9234,6 +9122,11 @@ func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, va sv.NextMarker = ptr.String(jtv) } + case "ProvisionedConcurrencyConfigs": + if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(&sv.ProvisionedConcurrencyConfigs, value); err != nil { + return err + } + default: _, _ = key, value @@ -9243,14 +9136,14 @@ func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, va return nil } -type awsRestjson1_deserializeOpListLayerVersions struct { +type awsRestjson1_deserializeOpListTags struct { } -func (*awsRestjson1_deserializeOpListLayerVersions) ID() string { +func (*awsRestjson1_deserializeOpListTags) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLayerVersions) 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) @@ -9268,9 +9161,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_deserializeOpErrorListTags(response, &metadata) } - output := &ListLayerVersionsOutput{} + output := &ListTagsOutput{} out.Result = output var buff [1024]byte @@ -9291,7 +9184,7 @@ func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9305,7 +9198,7 @@ func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLayerVersions(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)} @@ -9368,7 +9261,7 @@ func awsRestjson1_deserializeOpErrorListLayerVersions(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9381,29 +9274,20 @@ func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVers return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLayerVersionsOutput + var sv *ListTagsOutput if *v == nil { - sv = &ListLayerVersionsOutput{} + sv = &ListTagsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LayerVersions": - if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil { + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, 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 @@ -9413,14 +9297,14 @@ func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVers return nil } -type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct { +type awsRestjson1_deserializeOpListVersionsByFunction struct { } -func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string { +func (*awsRestjson1_deserializeOpListVersionsByFunction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -9438,9 +9322,9 @@ func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListVersionsByFunction(response, &metadata) } - output := &ListProvisionedConcurrencyConfigsOutput{} + output := &ListVersionsByFunctionOutput{} out.Result = output var buff [1024]byte @@ -9461,7 +9345,7 @@ func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9475,7 +9359,7 @@ func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -9538,7 +9422,7 @@ func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response * } } -func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v **ListProvisionedConcurrencyConfigsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVersionsByFunctionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9551,9 +9435,9 @@ func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProvisionedConcurrencyConfigsOutput + var sv *ListVersionsByFunctionOutput if *v == nil { - sv = &ListProvisionedConcurrencyConfigsOutput{} + sv = &ListVersionsByFunctionOutput{} } else { sv = *v } @@ -9569,8 +9453,8 @@ func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v sv.NextMarker = ptr.String(jtv) } - case "ProvisionedConcurrencyConfigs": - if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(&sv.ProvisionedConcurrencyConfigs, value); err != nil { + case "Versions": + if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Versions, value); err != nil { return err } @@ -9583,14 +9467,14 @@ func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v return nil } -type awsRestjson1_deserializeOpListTags struct { +type awsRestjson1_deserializeOpPublishLayerVersion struct { } -func (*awsRestjson1_deserializeOpListTags) ID() string { +func (*awsRestjson1_deserializeOpPublishLayerVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTags) 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) @@ -9608,9 +9492,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_deserializeOpErrorPublishLayerVersion(response, &metadata) } - output := &ListTagsOutput{} + output := &PublishLayerVersionOutput{} out.Result = output var buff [1024]byte @@ -9631,7 +9515,7 @@ func (m *awsRestjson1_deserializeOpListTags) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9645,7 +9529,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_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)} @@ -9686,6 +9570,9 @@ func awsRestjson1_deserializeOpErrorListTags(response *smithyhttp.Response, meta } switch { + case strings.EqualFold("CodeStorageExceededException", errorCode): + return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -9708,7 +9595,7 @@ func awsRestjson1_deserializeOpErrorListTags(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLayerVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9721,188 +9608,86 @@ func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsOutput + var sv *PublishLayerVersionOutput if *v == nil { - sv = &ListTagsOutput{} + sv = &PublishLayerVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + case "CompatibleArchitectures": + if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { return err } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListVersionsByFunction struct { -} - -func (*awsRestjson1_deserializeOpListVersionsByFunction) ID() string { - return "OperationDeserializer" -} - -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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, 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(), - } - } - - span.End() - 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) + case "CompatibleRuntimes": + if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { + return err + } - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError + 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 Timestamp to be of type string, got %T instead", value) + } + sv.CreatedDate = ptr.String(jtv) + } -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 - } + 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) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + 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) + } - var sv *ListVersionsByFunctionOutput - if *v == nil { - sv = &ListVersionsByFunctionOutput{} - } else { - sv = *v - } + 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) + } - for key, value := range shape { - switch key { - case "NextMarker": + case "LicenseInfo": 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 LicenseInfo to be of type string, got %T instead", value) } - sv.NextMarker = ptr.String(jtv) + sv.LicenseInfo = ptr.String(jtv) } - case "Versions": - if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Versions, value); err != nil { - return err + 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: @@ -9914,14 +9699,14 @@ func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVers return nil } -type awsRestjson1_deserializeOpPublishLayerVersion struct { +type awsRestjson1_deserializeOpPublishVersion struct { } -func (*awsRestjson1_deserializeOpPublishLayerVersion) ID() string { +func (*awsRestjson1_deserializeOpPublishVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -9939,9 +9724,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_deserializeOpErrorPublishVersion(response, &metadata) } - output := &PublishLayerVersionOutput{} + output := &PublishVersionOutput{} out.Result = output var buff [1024]byte @@ -9962,7 +9747,7 @@ func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPublishVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9976,7 +9761,7 @@ func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -10023,6 +9808,12 @@ func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Res 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) @@ -10042,7 +9833,7 @@ func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLayerVersionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10055,255 +9846,17 @@ func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLaye return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PublishLayerVersionOutput + var sv *PublishVersionOutput if *v == nil { - sv = &PublishLayerVersionOutput{} + sv = &PublishVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CompatibleArchitectures": - if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { - return err - } - - 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 Timestamp to be of type string, got %T instead", value) - } - sv.CreatedDate = ptr.String(jtv) - } - - 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, 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(), - } - } - - span.End() - 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 { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { return err } @@ -10503,443 +10056,91 @@ func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOu sv.Runtime = types.Runtime(jtv) } - 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, 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(), - } - } - - span.End() - 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 - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, 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(), - } - } - - span.End() - 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 "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(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) + } - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError + 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 + } -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 "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) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + 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) + } - var sv *PutFunctionConcurrencyOutput - if *v == nil { - sv = &PutFunctionConcurrencyOutput{} - } else { - sv = *v - } + 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) + } - for key, value := range shape { - switch key { - case "ReservedConcurrentExecutions": + case "Timeout": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) + return fmt.Errorf("expected Timeout to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) + 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: @@ -10951,14 +10152,14 @@ func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunct return nil } -type awsRestjson1_deserializeOpPutFunctionEventInvokeConfig struct { +type awsRestjson1_deserializeOpPutFunctionCodeSigningConfig struct { } -func (*awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) ID() string { +func (*awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -10976,9 +10177,9 @@ func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response, &metadata) } - output := &PutFunctionEventInvokeConfigOutput{} + output := &PutFunctionCodeSigningConfigOutput{} out.Result = output var buff [1024]byte @@ -10999,7 +10200,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11013,7 +10214,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -11054,6 +10255,9 @@ func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response *smith } switch { + case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) @@ -11079,7 +10283,7 @@ func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response *smith } } -func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **PutFunctionEventInvokeConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(v **PutFunctionCodeSigningConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11092,69 +10296,31 @@ func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **Pu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutFunctionEventInvokeConfigOutput + var sv *PutFunctionCodeSigningConfigOutput if *v == nil { - sv = &PutFunctionEventInvokeConfigOutput{} + sv = &PutFunctionCodeSigningConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DestinationConfig": - if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { - return err - } - - case "FunctionArn": + case "CodeSigningConfigArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) - } - sv.FunctionArn = ptr.String(jtv) - } - - 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) - - } - } - - case "MaximumEventAgeInSeconds": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value) } - sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) + sv.CodeSigningConfigArn = ptr.String(jtv) } - case "MaximumRetryAttempts": + case "FunctionName": 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) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected FunctionName to be of type string, got %T instead", value) } - sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + sv.FunctionName = ptr.String(jtv) } default: @@ -11166,14 +10332,14 @@ func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **Pu return nil } -type awsRestjson1_deserializeOpPutFunctionRecursionConfig struct { +type awsRestjson1_deserializeOpPutFunctionConcurrency struct { } -func (*awsRestjson1_deserializeOpPutFunctionRecursionConfig) ID() string { +func (*awsRestjson1_deserializeOpPutFunctionConcurrency) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -11191,9 +10357,9 @@ func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response, &metadata) } - output := &PutFunctionRecursionConfigOutput{} + output := &PutFunctionConcurrencyOutput{} out.Result = output var buff [1024]byte @@ -11214,7 +10380,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11228,7 +10394,7 @@ func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -11294,7 +10460,7 @@ func awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response *smithyh } } -func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutFunctionRecursionConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunctionConcurrencyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11307,22 +10473,26 @@ func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutF return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutFunctionRecursionConfigOutput + var sv *PutFunctionConcurrencyOutput if *v == nil { - sv = &PutFunctionRecursionConfigOutput{} + sv = &PutFunctionConcurrencyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RecursiveLoop": + case "ReservedConcurrentExecutions": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected RecursiveLoop to be of type string, got %T instead", value) + return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) } - sv.RecursiveLoop = types.RecursiveLoop(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) } default: @@ -11334,14 +10504,14 @@ func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutF return nil } -type awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig struct { +type awsRestjson1_deserializeOpPutFunctionEventInvokeConfig struct { } -func (*awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) ID() string { +func (*awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) 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) @@ -11359,9 +10529,9 @@ func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response, &metadata) } - output := &PutProvisionedConcurrencyConfigOutput{} + output := &PutFunctionEventInvokeConfigOutput{} out.Result = output var buff [1024]byte @@ -11382,7 +10552,7 @@ func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11396,7 +10566,7 @@ func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(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)} @@ -11462,7 +10632,7 @@ func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response *sm } } -func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v **PutProvisionedConcurrencyConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **PutFunctionEventInvokeConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11475,79 +10645,69 @@ func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutProvisionedConcurrencyConfigOutput + var sv *PutFunctionEventInvokeConfigOutput if *v == nil { - sv = &PutProvisionedConcurrencyConfigOutput{} + sv = &PutFunctionEventInvokeConfigOutput{} } 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 "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err } - case "AvailableProvisionedConcurrentExecutions": + case "FunctionArn": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) } - sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + sv.FunctionArn = ptr.String(jtv) } 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) + 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) + } - sv.LastModified = ptr.String(jtv) } - case "RequestedProvisionedConcurrentExecutions": + case "MaximumEventAgeInSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) } - case "Status": + case "MaximumRetryAttempts": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value) + return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value) } - 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) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.StatusReason = ptr.String(jtv) + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) } default: @@ -11559,14 +10719,14 @@ func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v * return nil } -type awsRestjson1_deserializeOpPutPublicAccessBlockConfig struct { +type awsRestjson1_deserializeOpPutFunctionRecursionConfig struct { } -func (*awsRestjson1_deserializeOpPutPublicAccessBlockConfig) ID() string { +func (*awsRestjson1_deserializeOpPutFunctionRecursionConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutPublicAccessBlockConfig) 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) @@ -11584,9 +10744,9 @@ func (m *awsRestjson1_deserializeOpPutPublicAccessBlockConfig) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutPublicAccessBlockConfig(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response, &metadata) } - output := &PutPublicAccessBlockConfigOutput{} + output := &PutFunctionRecursionConfigOutput{} out.Result = output var buff [1024]byte @@ -11607,7 +10767,7 @@ func (m *awsRestjson1_deserializeOpPutPublicAccessBlockConfig) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutPublicAccessBlockConfigOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11621,7 +10781,7 @@ func (m *awsRestjson1_deserializeOpPutPublicAccessBlockConfig) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutPublicAccessBlockConfig(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)} @@ -11687,7 +10847,7 @@ func awsRestjson1_deserializeOpErrorPutPublicAccessBlockConfig(response *smithyh } } -func awsRestjson1_deserializeOpDocumentPutPublicAccessBlockConfigOutput(v **PutPublicAccessBlockConfigOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutFunctionRecursionConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11700,18 +10860,22 @@ func awsRestjson1_deserializeOpDocumentPutPublicAccessBlockConfigOutput(v **PutP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutPublicAccessBlockConfigOutput + var sv *PutFunctionRecursionConfigOutput if *v == nil { - sv = &PutPublicAccessBlockConfigOutput{} + sv = &PutFunctionRecursionConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "PublicAccessBlockConfig": - if err := awsRestjson1_deserializeDocumentPublicAccessBlockConfig(&sv.PublicAccessBlockConfig, value); err != nil { - return err + 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) } default: @@ -11723,14 +10887,14 @@ func awsRestjson1_deserializeOpDocumentPutPublicAccessBlockConfigOutput(v **PutP return nil } -type awsRestjson1_deserializeOpPutResourcePolicy struct { +type awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig struct { } -func (*awsRestjson1_deserializeOpPutResourcePolicy) ID() string { +func (*awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutResourcePolicy) 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) @@ -11748,9 +10912,9 @@ func (m *awsRestjson1_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutResourcePolicy(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response, &metadata) } - output := &PutResourcePolicyOutput{} + output := &PutProvisionedConcurrencyConfigOutput{} out.Result = output var buff [1024]byte @@ -11771,7 +10935,7 @@ func (m *awsRestjson1_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11785,7 +10949,7 @@ func (m *awsRestjson1_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutResourcePolicy(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)} @@ -11829,15 +10993,6 @@ func awsRestjson1_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo 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) @@ -11860,7 +11015,7 @@ func awsRestjson1_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v **PutProvisionedConcurrencyConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11873,31 +11028,79 @@ func awsRestjson1_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutResourcePolicyOutput + var sv *PutProvisionedConcurrencyConfigOutput if *v == nil { - sv = &PutResourcePolicyOutput{} + sv = &PutProvisionedConcurrencyConfigOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Policy": + 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 ResourcePolicy to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } - sv.Policy = ptr.String(jtv) + sv.LastModified = ptr.String(jtv) } - case "RevisionId": + 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": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RevisionId to be of type string, got %T instead", value) + return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value) } - sv.RevisionId = ptr.String(jtv) + 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.StatusReason = ptr.String(jtv) } default: @@ -12288,9 +11491,6 @@ func awsRestjson1_deserializeOpErrorRemovePermission(response *smithyhttp.Respon case strings.EqualFold("PreconditionFailedException", errorCode): return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) - case strings.EqualFold("PublicPolicyException", errorCode): - return awsRestjson1_deserializeErrorPublicPolicyException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -15766,42 +14966,6 @@ 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 @@ -20940,104 +20104,6 @@ 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 16b008fe7d5..42f7f193c80 100644 --- a/service/lambda/generated.json +++ b/service/lambda/generated.json @@ -27,7 +27,6 @@ "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", @@ -44,8 +43,6 @@ "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", @@ -69,8 +66,6 @@ "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 28542c0b2ab..defa7e2ee84 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -1791,81 +1791,6 @@ 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, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*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 - - endTimer() - span.End() - 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 { } @@ -3035,148 +2960,6 @@ 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, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*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 - - endTimer() - span.End() - 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, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*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 - - endTimer() - span.End() - 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 { } @@ -5193,201 +4976,6 @@ 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, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*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 - - endTimer() - span.End() - 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, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*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 - - endTimer() - span.End() - 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 { } @@ -7342,23 +6930,6 @@ 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_test.go b/service/lambda/snapshot_test.go index 68edd3b2355..032a01ea21e 100644 --- a/service/lambda/snapshot_test.go +++ b/service/lambda/snapshot_test.go @@ -266,18 +266,6 @@ 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) { @@ -470,30 +458,6 @@ 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) { @@ -770,30 +734,6 @@ 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) { @@ -1141,18 +1081,6 @@ 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) { @@ -1345,30 +1273,6 @@ 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) { @@ -1645,30 +1549,6 @@ 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 b329619fb75..92dd0d56a22 100644 --- a/service/lambda/types/errors.go +++ b/service/lambda/types/errors.go @@ -742,37 +742,6 @@ 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 e10d881abd6..49e0b085d54 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -1127,24 +1127,6 @@ 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 4550af31989..c4c103d7baf 100644 --- a/service/lambda/validators.go +++ b/service/lambda/validators.go @@ -350,26 +350,6 @@ 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 { } @@ -670,46 +650,6 @@ 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 { } @@ -1090,46 +1030,6 @@ 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 { } @@ -1438,10 +1338,6 @@ 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) } @@ -1502,14 +1398,6 @@ 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) } @@ -1586,14 +1474,6 @@ 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) } @@ -2021,21 +1901,6 @@ 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 @@ -2273,36 +2138,6 @@ 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 @@ -2609,42 +2444,6 @@ 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/organizations/api_op_AttachPolicy.go b/service/organizations/api_op_AttachPolicy.go index b2939feb6f2..b4ed4136894 100644 --- a/service/organizations/api_op_AttachPolicy.go +++ b/service/organizations/api_op_AttachPolicy.go @@ -14,14 +14,16 @@ import ( // account. How the policy affects accounts depends on the type of policy. Refer to // the Organizations User Guide for information about each policy type: // -// [AISERVICES_OPT_OUT_POLICY] +// [SERVICE_CONTROL_POLICY] // // [BACKUP_POLICY] // -// [SERVICE_CONTROL_POLICY] -// // [TAG_POLICY] // +// [CHATBOT_POLICY] +// +// [AISERVICES_OPT_OUT_POLICY] +// // This operation can be called only from the organization's management account or // by a member account that is a delegated administrator for an Amazon Web Services // service. @@ -29,6 +31,7 @@ import ( // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html +// [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html func (c *Client) AttachPolicy(ctx context.Context, params *AttachPolicyInput, optFns ...func(*Options)) (*AttachPolicyOutput, error) { if params == nil { diff --git a/service/organizations/api_op_CreatePolicy.go b/service/organizations/api_op_CreatePolicy.go index cd2fb790a73..73cddd66624 100644 --- a/service/organizations/api_op_CreatePolicy.go +++ b/service/organizations/api_op_CreatePolicy.go @@ -69,17 +69,20 @@ type CreatePolicyInput struct { // The type of policy to create. You can specify one of the following values: // - // [AISERVICES_OPT_OUT_POLICY] + // [SERVICE_CONTROL_POLICY] // // [BACKUP_POLICY] // - // [SERVICE_CONTROL_POLICY] - // // [TAG_POLICY] // + // [CHATBOT_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY] + // // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. diff --git a/service/organizations/api_op_DescribeEffectivePolicy.go b/service/organizations/api_op_DescribeEffectivePolicy.go index 82750b14b21..7d00e4c3cfc 100644 --- a/service/organizations/api_op_DescribeEffectivePolicy.go +++ b/service/organizations/api_op_DescribeEffectivePolicy.go @@ -45,14 +45,17 @@ type DescribeEffectivePolicyInput struct { // The type of policy that you want information about. You can specify one of the // following values: // - // [AISERVICES_OPT_OUT_POLICY] - // // [BACKUP_POLICY] // // [TAG_POLICY] // + // [CHATBOT_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY] + // // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html + // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. diff --git a/service/organizations/api_op_DisablePolicyType.go b/service/organizations/api_op_DisablePolicyType.go index 946a6b3067c..537f003fb6d 100644 --- a/service/organizations/api_op_DisablePolicyType.go +++ b/service/organizations/api_op_DisablePolicyType.go @@ -50,17 +50,20 @@ type DisablePolicyTypeInput struct { // The policy type that you want to disable in this root. You can specify one of // the following values: // - // [AISERVICES_OPT_OUT_POLICY] + // [SERVICE_CONTROL_POLICY] // // [BACKUP_POLICY] // - // [SERVICE_CONTROL_POLICY] - // // [TAG_POLICY] // + // [CHATBOT_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY] + // // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. diff --git a/service/organizations/api_op_EnablePolicyType.go b/service/organizations/api_op_EnablePolicyType.go index fae828d29e7..43972172e65 100644 --- a/service/organizations/api_op_EnablePolicyType.go +++ b/service/organizations/api_op_EnablePolicyType.go @@ -46,17 +46,20 @@ type EnablePolicyTypeInput struct { // The policy type that you want to enable. You can specify one of the following // values: // - // [AISERVICES_OPT_OUT_POLICY] + // [SERVICE_CONTROL_POLICY] // // [BACKUP_POLICY] // - // [SERVICE_CONTROL_POLICY] - // // [TAG_POLICY] // + // [CHATBOT_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY] + // // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. diff --git a/service/organizations/api_op_ListPolicies.go b/service/organizations/api_op_ListPolicies.go index d36388e6f39..e0d5ff986e6 100644 --- a/service/organizations/api_op_ListPolicies.go +++ b/service/organizations/api_op_ListPolicies.go @@ -41,17 +41,20 @@ type ListPoliciesInput struct { // Specifies the type of policy that you want to include in the response. You must // specify one of the following values: // - // [AISERVICES_OPT_OUT_POLICY] + // [SERVICE_CONTROL_POLICY] // // [BACKUP_POLICY] // - // [SERVICE_CONTROL_POLICY] - // // [TAG_POLICY] // + // [CHATBOT_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY] + // // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. diff --git a/service/organizations/api_op_ListPoliciesForTarget.go b/service/organizations/api_op_ListPoliciesForTarget.go index 96d3ddb026e..b3fb236f490 100644 --- a/service/organizations/api_op_ListPoliciesForTarget.go +++ b/service/organizations/api_op_ListPoliciesForTarget.go @@ -43,17 +43,20 @@ type ListPoliciesForTargetInput struct { // The type of policy that you want to include in the returned list. You must // specify one of the following values: // - // [AISERVICES_OPT_OUT_POLICY] + // [SERVICE_CONTROL_POLICY] // // [BACKUP_POLICY] // - // [SERVICE_CONTROL_POLICY] - // // [TAG_POLICY] // + // [CHATBOT_POLICY] + // + // [AISERVICES_OPT_OUT_POLICY] + // // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html + // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html // // This member is required. diff --git a/service/organizations/types/enums.go b/service/organizations/types/enums.go index b74717e3bfe..748434de691 100644 --- a/service/organizations/types/enums.go +++ b/service/organizations/types/enums.go @@ -261,6 +261,7 @@ const ( EffectivePolicyTypeTagPolicy EffectivePolicyType = "TAG_POLICY" EffectivePolicyTypeBackupPolicy EffectivePolicyType = "BACKUP_POLICY" EffectivePolicyTypeAiservicesOptOutPolicy EffectivePolicyType = "AISERVICES_OPT_OUT_POLICY" + EffectivePolicyTypeChatbotPolicy EffectivePolicyType = "CHATBOT_POLICY" ) // Values returns all known values for EffectivePolicyType. Note that this can be @@ -272,6 +273,7 @@ func (EffectivePolicyType) Values() []EffectivePolicyType { "TAG_POLICY", "BACKUP_POLICY", "AISERVICES_OPT_OUT_POLICY", + "CHATBOT_POLICY", } } @@ -526,6 +528,7 @@ const ( PolicyTypeTagPolicy PolicyType = "TAG_POLICY" PolicyTypeBackupPolicy PolicyType = "BACKUP_POLICY" PolicyTypeAiservicesOptOutPolicy PolicyType = "AISERVICES_OPT_OUT_POLICY" + PolicyTypeChatbotPolicy PolicyType = "CHATBOT_POLICY" ) // Values returns all known values for PolicyType. Note that this can be expanded @@ -538,6 +541,7 @@ func (PolicyType) Values() []PolicyType { "TAG_POLICY", "BACKUP_POLICY", "AISERVICES_OPT_OUT_POLICY", + "CHATBOT_POLICY", } } diff --git a/service/pcs/api_op_CreateComputeNodeGroup.go b/service/pcs/api_op_CreateComputeNodeGroup.go index 550d90f5a17..cb071cf4895 100644 --- a/service/pcs/api_op_CreateComputeNodeGroup.go +++ b/service/pcs/api_op_CreateComputeNodeGroup.go @@ -58,10 +58,15 @@ type CreateComputeNodeGroupInput struct { // The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM // role when launching EC2 instances. The role contained in your instance profile - // must have pcs:RegisterComputeNodeGroupInstance permissions attached in order to - // provision instances correctly. The resource identifier of the ARN must start - // with AWSPCS . For example, - // arn:aws:iam:123456789012:instance-profile/AWSPCSMyComputeNodeInstanceProfile . + // must have the pcs:RegisterComputeNodeGroupInstance permission. The resource + // identifier of the ARN must start with AWSPCS or it must have /aws-pcs/ in its + // path. + // + // Examples + // + // - arn:aws:iam::111122223333:instance-profile/AWSPCS-example-role-1 + // + // - arn:aws:iam::111122223333:instance-profile/aws-pcs/example-role-2 // // This member is required. IamInstanceProfileArn *string diff --git a/service/pcs/api_op_UpdateComputeNodeGroup.go b/service/pcs/api_op_UpdateComputeNodeGroup.go index 7860d5f4704..aabf4595737 100644 --- a/service/pcs/api_op_UpdateComputeNodeGroup.go +++ b/service/pcs/api_op_UpdateComputeNodeGroup.go @@ -60,8 +60,15 @@ type UpdateComputeNodeGroupInput struct { // The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM // role when launching EC2 instances. The role contained in your instance profile - // must have pcs:RegisterComputeNodeGroupInstance permissions attached to - // provision instances correctly. + // must have the pcs:RegisterComputeNodeGroupInstance permission. The resource + // identifier of the ARN must start with AWSPCS or it must have /aws-pcs/ in its + // path. + // + // Examples + // + // - arn:aws:iam::111122223333:instance-profile/AWSPCS-example-role-1 + // + // - arn:aws:iam::111122223333:instance-profile/aws-pcs/example-role-2 IamInstanceProfileArn *string // Specifies how EC2 instances are purchased on your behalf. Amazon Web Services diff --git a/service/pcs/types/types.go b/service/pcs/types/types.go index ad52c5b6e59..ff5eee7291b 100644 --- a/service/pcs/types/types.go +++ b/service/pcs/types/types.go @@ -166,8 +166,15 @@ type ComputeNodeGroup struct { // The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM // role when launching EC2 instances. The role contained in your instance profile - // must have pcs:RegisterComputeNodeGroupInstance permissions attached to - // provision instances correctly. + // must have the pcs:RegisterComputeNodeGroupInstance permission. The resource + // identifier of the ARN must start with AWSPCS or it must have /aws-pcs/ in its + // path. + // + // Examples + // + // - arn:aws:iam::111122223333:instance-profile/AWSPCS-example-role-1 + // + // - arn:aws:iam::111122223333:instance-profile/aws-pcs/example-role-2 // // This member is required. IamInstanceProfileArn *string @@ -629,11 +636,32 @@ type SlurmAuthKey struct { type SlurmCustomSetting struct { // Amazon Web Services PCS supports configuration of the following Slurm - // parameters: [Prolog]Prolog , [Epilog]Epilog , and [SelectTypeParameters]SelectTypeParameters . + // parameters: + // + // - For clusters + // + // [Prolog] + // - Prolog + // + // [Epilog] + // - Epilog + // + // [SelectTypeParameters] + // - SelectTypeParameters + // + // - For compute node groups + // + // [Weight] + // - Weight + // + // [RealMemory] + // - RealMemory // // [SelectTypeParameters]: https://slurm.schedmd.com/slurm.conf.html#OPT_SelectTypeParameters // [Prolog]: https://slurm.schedmd.com/slurm.conf.html#OPT_Prolog_1 // [Epilog]: https://slurm.schedmd.com/slurm.conf.html#OPT_Epilog_1 + // [Weight]: https://slurm.schedmd.com/slurm.conf.html#OPT_Weight + // [RealMemory]: https://slurm.schedmd.com/slurm.conf.html#OPT_Weight // // This member is required. ParameterName *string diff --git a/service/rdsdata/api_op_BeginTransaction.go b/service/rdsdata/api_op_BeginTransaction.go index a8740d96ce2..2675d1b56ef 100644 --- a/service/rdsdata/api_op_BeginTransaction.go +++ b/service/rdsdata/api_op_BeginTransaction.go @@ -18,9 +18,9 @@ import ( // A transaction times out if no calls use its transaction ID in three minutes. If // a transaction times out before it's committed, it's rolled back automatically. // -// DDL statements inside a transaction cause an implicit commit. We recommend that -// you run each DDL statement in a separate ExecuteStatement call with -// continueAfterTimeout enabled. +// For Aurora MySQL, DDL statements inside a transaction cause an implicit commit. +// We recommend that you run each MySQL DDL statement in a separate +// ExecuteStatement call with continueAfterTimeout enabled. func (c *Client) BeginTransaction(ctx context.Context, params *BeginTransactionInput, optFns ...func(*Options)) (*BeginTransactionOutput, error) { if params == nil { params = &BeginTransactionInput{} diff --git a/service/rdsdata/api_op_ExecuteSql.go b/service/rdsdata/api_op_ExecuteSql.go index 2ecf53b87d9..2c52c5a1d59 100644 --- a/service/rdsdata/api_op_ExecuteSql.go +++ b/service/rdsdata/api_op_ExecuteSql.go @@ -13,9 +13,9 @@ import ( // Runs one or more SQL statements. // -// This operation isn't supported for Aurora PostgreSQL Serverless v2 and -// provisioned DB clusters, and for Aurora Serverless v1 DB clusters, the operation -// is deprecated. Use the BatchExecuteStatement or ExecuteStatement operation. +// This operation isn't supported for Aurora Serverless v2 and provisioned DB +// clusters. For Aurora Serverless v1 DB clusters, the operation is deprecated. Use +// the BatchExecuteStatement or ExecuteStatement operation. // // Deprecated: The ExecuteSql API is deprecated, please use the ExecuteStatement // API. diff --git a/service/rdsdata/doc.go b/service/rdsdata/doc.go index 191faf91de9..83e536356c6 100644 --- a/service/rdsdata/doc.go +++ b/service/rdsdata/doc.go @@ -10,9 +10,9 @@ // // Data API is available with the following types of Aurora databases: // -// - Aurora PostgreSQL - Serverless v2, Serverless v1, and provisioned +// - Aurora PostgreSQL - Serverless v2, provisioned, and Serverless v1 // -// - Aurora MySQL - Serverless v1 only +// - Aurora MySQL - Serverless v2, provisioned, and Serverless v1 // // For more information about the Data API, see [Using RDS Data API] in the Amazon Aurora User Guide. // diff --git a/service/sagemaker/api_op_CreateDomain.go b/service/sagemaker/api_op_CreateDomain.go index 8cfedfa5b96..c0f7b47811c 100644 --- a/service/sagemaker/api_op_CreateDomain.go +++ b/service/sagemaker/api_op_CreateDomain.go @@ -136,6 +136,10 @@ type CreateDomainInput struct { // control, specify a customer managed key. KmsKeyId *string + // Indicates whether custom tag propagation is supported for the domain. Defaults + // to DISABLED . + TagPropagation types.TagPropagation + // Tags to associated with the Domain. Each tag consists of a key and an optional // value. Tag keys must be unique per resource. Tags are searchable using the // Search API. diff --git a/service/sagemaker/api_op_DescribeDomain.go b/service/sagemaker/api_op_DescribeDomain.go index 2f406d7c8a6..93d4c217d5a 100644 --- a/service/sagemaker/api_op_DescribeDomain.go +++ b/service/sagemaker/api_op_DescribeDomain.go @@ -115,6 +115,9 @@ type DescribeDomainOutput struct { // The VPC subnets that the domain uses for communication. SubnetIds []string + // Indicates whether custom tag propagation is supported for the domain. + TagPropagation types.TagPropagation + // The domain's URL. Url *string diff --git a/service/sagemaker/api_op_UpdateDomain.go b/service/sagemaker/api_op_UpdateDomain.go index e5369675233..bb787c99aa8 100644 --- a/service/sagemaker/api_op_UpdateDomain.go +++ b/service/sagemaker/api_op_UpdateDomain.go @@ -71,6 +71,10 @@ type UpdateDomainInput struct { // Deleting state. SubnetIds []string + // Indicates whether custom tag propagation is supported for the domain. Defaults + // to DISABLED . + TagPropagation types.TagPropagation + noSmithyDocumentSerde } diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index e55b19141c4..7b133aa2c37 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -88790,6 +88790,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeDomainOutput(v **DescribeDomainOu return err } + case "TagPropagation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagPropagation to be of type string, got %T instead", value) + } + sv.TagPropagation = types.TagPropagation(jtv) + } + case "Url": if value != nil { jtv, ok := value.(string) diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index b57d1a91c39..9598571d538 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -32748,6 +32748,11 @@ func awsAwsjson11_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val } } + if len(v.TagPropagation) > 0 { + ok := object.Key("TagPropagation") + ok.String(string(v.TagPropagation)) + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { @@ -41492,6 +41497,11 @@ func awsAwsjson11_serializeOpDocumentUpdateDomainInput(v *UpdateDomainInput, val } } + if len(v.TagPropagation) > 0 { + ok := object.Key("TagPropagation") + ok.String(string(v.TagPropagation)) + } + return nil } diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 5e817614c8c..9cfcd14c4c5 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -6995,6 +6995,25 @@ func (TableFormat) Values() []TableFormat { } } +type TagPropagation string + +// Enum values for TagPropagation +const ( + TagPropagationEnabled TagPropagation = "ENABLED" + TagPropagationDisabled TagPropagation = "DISABLED" +) + +// Values returns all known values for TagPropagation. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TagPropagation) Values() []TagPropagation { + return []TagPropagation{ + "ENABLED", + "DISABLED", + } +} + type TargetDevice string // Enum values for TargetDevice