From d5c4ad008ac68562397d65931315af7e4f1f5c73 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Mon, 17 Jun 2024 18:35:34 +0000 Subject: [PATCH] Regenerated Clients --- .../283c185a072d4f51a3575988f625ecd6.json | 8 + .../3d2c24c9759a42c7a2b2d77911d1e3a7.json | 8 + .../525f75a973de41a087f72277fbe56b27.json | 8 + .../59fa9cd3552642e7b69319e585c9b467.json | 8 + .../74c3cbdb7075461a8b060589d0b865bf.json | 8 + .../999b967bcce2443fa405e4551e56aadc.json | 8 + .../a4d4c263bebd451da5bbb4ef8af3764e.json | 8 + .../abf1816d909c4357827819cda4cef91a.json | 8 + .../c21f1ca0d60a443ab023bd3c7be7fee9.json | 8 + .../d6d61d1ab35b43b991162e58d7cb7b83.json | 8 + .../e0c88e62e943472dba88075d7c333fbb.json | 8 + .../api_op_CreateCertificateAuthority.go | 2 +- ...p_ImportCertificateAuthorityCertificate.go | 36 +- service/acmpca/types/types.go | 2 +- service/codebuild/api_op_CreateWebhook.go | 6 + service/codebuild/deserializers.go | 63 + service/codebuild/serializers.go | 29 + service/codebuild/types/enums.go | 19 + service/codebuild/types/types.go | 35 + service/codebuild/validators.go | 23 + service/glue/api_op_CreateUsageProfile.go | 151 ++ service/glue/api_op_DeleteUsageProfile.go | 134 ++ service/glue/api_op_GetJobRun.go | 3 +- service/glue/api_op_GetUsageProfile.go | 153 ++ service/glue/api_op_GetWorkflowRun.go | 3 +- service/glue/api_op_ListUsageProfiles.go | 230 +++ service/glue/api_op_UpdateUsageProfile.go | 148 ++ service/glue/deserializers.go | 1423 +++++++++++++++-- service/glue/generated.json | 5 + service/glue/serializers.go | 446 ++++++ .../api_op_CreateUsageProfile.go.snap | 36 + .../api_op_DeleteUsageProfile.go.snap | 36 + .../snapshot/api_op_GetUsageProfile.go.snap | 36 + .../snapshot/api_op_ListUsageProfiles.go.snap | 35 + .../api_op_UpdateUsageProfile.go.snap | 36 + service/glue/snapshot_test.go | 120 ++ service/glue/types/errors.go | 26 + service/glue/types/types.go | 59 + service/glue/validators.go | 162 ++ service/mediaconvert/deserializers.go | 76 +- service/mediaconvert/serializers.go | 30 + service/mediaconvert/types/types.go | 50 +- service/secretsmanager/api_op_CreateSecret.go | 5 +- service/secretsmanager/api_op_RotateSecret.go | 2 +- 44 files changed, 3581 insertions(+), 127 deletions(-) create mode 100644 .changelog/283c185a072d4f51a3575988f625ecd6.json create mode 100644 .changelog/3d2c24c9759a42c7a2b2d77911d1e3a7.json create mode 100644 .changelog/525f75a973de41a087f72277fbe56b27.json create mode 100644 .changelog/59fa9cd3552642e7b69319e585c9b467.json create mode 100644 .changelog/74c3cbdb7075461a8b060589d0b865bf.json create mode 100644 .changelog/999b967bcce2443fa405e4551e56aadc.json create mode 100644 .changelog/a4d4c263bebd451da5bbb4ef8af3764e.json create mode 100644 .changelog/abf1816d909c4357827819cda4cef91a.json create mode 100644 .changelog/c21f1ca0d60a443ab023bd3c7be7fee9.json create mode 100644 .changelog/d6d61d1ab35b43b991162e58d7cb7b83.json create mode 100644 .changelog/e0c88e62e943472dba88075d7c333fbb.json create mode 100644 service/glue/api_op_CreateUsageProfile.go create mode 100644 service/glue/api_op_DeleteUsageProfile.go create mode 100644 service/glue/api_op_GetUsageProfile.go create mode 100644 service/glue/api_op_ListUsageProfiles.go create mode 100644 service/glue/api_op_UpdateUsageProfile.go create mode 100644 service/glue/snapshot/api_op_CreateUsageProfile.go.snap create mode 100644 service/glue/snapshot/api_op_DeleteUsageProfile.go.snap create mode 100644 service/glue/snapshot/api_op_GetUsageProfile.go.snap create mode 100644 service/glue/snapshot/api_op_ListUsageProfiles.go.snap create mode 100644 service/glue/snapshot/api_op_UpdateUsageProfile.go.snap diff --git a/.changelog/283c185a072d4f51a3575988f625ecd6.json b/.changelog/283c185a072d4f51a3575988f625ecd6.json new file mode 100644 index 00000000000..220013f7abe --- /dev/null +++ b/.changelog/283c185a072d4f51a3575988f625ecd6.json @@ -0,0 +1,8 @@ +{ + "id": "283c185a-072d-4f51-a357-5988f625ecd6", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/efs" + ] +} \ No newline at end of file diff --git a/.changelog/3d2c24c9759a42c7a2b2d77911d1e3a7.json b/.changelog/3d2c24c9759a42c7a2b2d77911d1e3a7.json new file mode 100644 index 00000000000..59122783568 --- /dev/null +++ b/.changelog/3d2c24c9759a42c7a2b2d77911d1e3a7.json @@ -0,0 +1,8 @@ +{ + "id": "3d2c24c9-759a-42c7-a2b2-d77911d1e3a7", + "type": "feature", + "description": "This release includes support for creating I-frame only video segments for DASH trick play.", + "modules": [ + "service/mediaconvert" + ] +} \ No newline at end of file diff --git a/.changelog/525f75a973de41a087f72277fbe56b27.json b/.changelog/525f75a973de41a087f72277fbe56b27.json new file mode 100644 index 00000000000..109d92ca65e --- /dev/null +++ b/.changelog/525f75a973de41a087f72277fbe56b27.json @@ -0,0 +1,8 @@ +{ + "id": "525f75a9-73de-41a0-87f7-2277fbe56b27", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/waf" + ] +} \ No newline at end of file diff --git a/.changelog/59fa9cd3552642e7b69319e585c9b467.json b/.changelog/59fa9cd3552642e7b69319e585c9b467.json new file mode 100644 index 00000000000..d63863edcd7 --- /dev/null +++ b/.changelog/59fa9cd3552642e7b69319e585c9b467.json @@ -0,0 +1,8 @@ +{ + "id": "59fa9cd3-5526-42e7-b693-19e585c9b467", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/directoryservice" + ] +} \ No newline at end of file diff --git a/.changelog/74c3cbdb7075461a8b060589d0b865bf.json b/.changelog/74c3cbdb7075461a8b060589d0b865bf.json new file mode 100644 index 00000000000..9363089867b --- /dev/null +++ b/.changelog/74c3cbdb7075461a8b060589d0b865bf.json @@ -0,0 +1,8 @@ +{ + "id": "74c3cbdb-7075-461a-8b06-0589d0b865bf", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/cognitoidentityprovider" + ] +} \ No newline at end of file diff --git a/.changelog/999b967bcce2443fa405e4551e56aadc.json b/.changelog/999b967bcce2443fa405e4551e56aadc.json new file mode 100644 index 00000000000..71be58d9acb --- /dev/null +++ b/.changelog/999b967bcce2443fa405e4551e56aadc.json @@ -0,0 +1,8 @@ +{ + "id": "999b967b-cce2-443f-a405-e4551e56aadc", + "type": "documentation", + "description": "Doc-only update that adds name constraints as an allowed extension for ImportCertificateAuthorityCertificate.", + "modules": [ + "service/acmpca" + ] +} \ No newline at end of file diff --git a/.changelog/a4d4c263bebd451da5bbb4ef8af3764e.json b/.changelog/a4d4c263bebd451da5bbb4ef8af3764e.json new file mode 100644 index 00000000000..075210afd12 --- /dev/null +++ b/.changelog/a4d4c263bebd451da5bbb4ef8af3764e.json @@ -0,0 +1,8 @@ +{ + "id": "a4d4c263-bebd-451d-a5bb-b4ef8af3764e", + "type": "feature", + "description": "This release introduces a new feature, Usage profiles. Usage profiles allow the AWS Glue admin to create different profiles for various classes of users within the account, enforcing limits and defaults for jobs and sessions.", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/.changelog/abf1816d909c4357827819cda4cef91a.json b/.changelog/abf1816d909c4357827819cda4cef91a.json new file mode 100644 index 00000000000..e3ebd03bb34 --- /dev/null +++ b/.changelog/abf1816d909c4357827819cda4cef91a.json @@ -0,0 +1,8 @@ +{ + "id": "abf1816d-909c-4357-8278-19cda4cef91a", + "type": "feature", + "description": "AWS CodeBuild now supports global and organization GitHub webhooks", + "modules": [ + "service/codebuild" + ] +} \ No newline at end of file diff --git a/.changelog/c21f1ca0d60a443ab023bd3c7be7fee9.json b/.changelog/c21f1ca0d60a443ab023bd3c7be7fee9.json new file mode 100644 index 00000000000..8a6368502c5 --- /dev/null +++ b/.changelog/c21f1ca0d60a443ab023bd3c7be7fee9.json @@ -0,0 +1,8 @@ +{ + "id": "c21f1ca0-d60a-443a-b023-bd3c7be7fee9", + "type": "documentation", + "description": "Updating SDK example for KMS DeriveSharedSecret API.", + "modules": [ + "service/kms" + ] +} \ No newline at end of file diff --git a/.changelog/d6d61d1ab35b43b991162e58d7cb7b83.json b/.changelog/d6d61d1ab35b43b991162e58d7cb7b83.json new file mode 100644 index 00000000000..f7484dec71c --- /dev/null +++ b/.changelog/d6d61d1ab35b43b991162e58d7cb7b83.json @@ -0,0 +1,8 @@ +{ + "id": "d6d61d1a-b35b-43b9-9116-2e58d7cb7b83", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/batch" + ] +} \ No newline at end of file diff --git a/.changelog/e0c88e62e943472dba88075d7c333fbb.json b/.changelog/e0c88e62e943472dba88075d7c333fbb.json new file mode 100644 index 00000000000..08bca05b172 --- /dev/null +++ b/.changelog/e0c88e62e943472dba88075d7c333fbb.json @@ -0,0 +1,8 @@ +{ + "id": "e0c88e62-e943-472d-ba88-075d7c333fbb", + "type": "documentation", + "description": "Doc only update for Secrets Manager", + "modules": [ + "service/secretsmanager" + ] +} \ No newline at end of file diff --git a/service/acmpca/api_op_CreateCertificateAuthority.go b/service/acmpca/api_op_CreateCertificateAuthority.go index f9b67e31828..654ac85e9b4 100644 --- a/service/acmpca/api_op_CreateCertificateAuthority.go +++ b/service/acmpca/api_op_CreateCertificateAuthority.go @@ -33,7 +33,7 @@ import ( // protected with encryption. For more information, see [Encrypting Your CRLs]. // // [Access policies for CRLs in Amazon S3]: https://docs.aws.amazon.com/privateca/latest/userguide/crl-planning.html#s3-policies -// [Encrypting Your CRLs]: https://docs.aws.amazon.com/privateca/latest/userguide/PcaCreateCa.html#crl-encryption +// [Encrypting Your CRLs]: https://docs.aws.amazon.com/privateca/latest/userguide/crl-planning.html#crl-encryption func (c *Client) CreateCertificateAuthority(ctx context.Context, params *CreateCertificateAuthorityInput, optFns ...func(*Options)) (*CreateCertificateAuthorityOutput, error) { if params == nil { params = &CreateCertificateAuthorityInput{} diff --git a/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go b/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go index 7e905559f8c..0ae64ebf685 100644 --- a/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go +++ b/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go @@ -63,44 +63,46 @@ import ( // Amazon Web Services Private CA allows the following extensions to be marked // critical in the imported CA certificate or chain. // -// - Basic constraints (must be marked critical) +// - Authority key identifier // -// - Subject alternative names +// - Basic constraints (must be marked critical) // -// - Key usage +// - Certificate policies // // - Extended key usage // -// - Authority key identifier -// -// - Subject key identifier +// - Inhibit anyPolicy // // - Issuer alternative name // -// - Subject directory attributes -// -// - Subject information access +// - Key usage // -// - Certificate policies +// - Name constraints // // - Policy mappings // -// - Inhibit anyPolicy +// - Subject alternative name // -// Amazon Web Services Private CA rejects the following extensions when they are -// marked critical in an imported CA certificate or chain. +// - Subject directory attributes // -// - Name constraints +// - Subject key identifier // -// - Policy constraints +// - Subject information access // -// - CRL distribution points +// Amazon Web Services Private CA rejects the following extensions when they are +// marked critical in an imported CA certificate or chain. // // - Authority information access // +// - CRL distribution points +// // - Freshest CRL // -// - Any other extension +// - Policy constraints +// +// Amazon Web Services Private Certificate Authority will also reject any other +// extension marked as critical not contained on the preceding list of allowed +// extensions. // // [GetCertificateAuthorityCsr]: https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificateAuthorityCsr.html // [CreateCertificateAuthority]: https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html diff --git a/service/acmpca/types/types.go b/service/acmpca/types/types.go index e5d9a16cbe2..e001e7aece1 100644 --- a/service/acmpca/types/types.go +++ b/service/acmpca/types/types.go @@ -334,7 +334,7 @@ type CertificateAuthorityConfiguration struct { // Authority User Guide // // [Planning a certificate revocation list (CRL)]: https://docs.aws.amazon.com/privateca/latest/userguide/crl-planning.html -// [Encrypting Your CRLs]: https://docs.aws.amazon.com/privateca/latest/userguide/PcaCreateCa.html#crl-encryption +// [Encrypting Your CRLs]: https://docs.aws.amazon.com/privateca/latest/userguide/crl-planning.html#crl-encryption type CrlConfiguration struct { // Boolean value that specifies whether certificate revocation lists (CRLs) are diff --git a/service/codebuild/api_op_CreateWebhook.go b/service/codebuild/api_op_CreateWebhook.go index 9f9cea20110..b31a1c4d17a 100644 --- a/service/codebuild/api_op_CreateWebhook.go +++ b/service/codebuild/api_op_CreateWebhook.go @@ -72,6 +72,12 @@ type CreateWebhookInput struct { // manualCreation is only available for GitHub webhooks. ManualCreation *bool + // The scope configuration for global or organization webhooks. + // + // Global or organization webhooks are only available for GitHub and Github + // Enterprise webhooks. + ScopeConfiguration *types.ScopeConfiguration + noSmithyDocumentSerde } diff --git a/service/codebuild/deserializers.go b/service/codebuild/deserializers.go index 599a1b32448..73a321488fa 100644 --- a/service/codebuild/deserializers.go +++ b/service/codebuild/deserializers.go @@ -11281,6 +11281,64 @@ func awsAwsjson11_deserializeDocumentScalingConfigurationOutput(v **types.Scalin return nil } +func awsAwsjson11_deserializeDocumentScopeConfiguration(v **types.ScopeConfiguration, 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.ScopeConfiguration + if *v == nil { + sv = &types.ScopeConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Domain = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "scope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebhookScopeType to be of type string, got %T instead", value) + } + sv.Scope = types.WebhookScopeType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentSecurityGroupIds(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12033,6 +12091,11 @@ func awsAwsjson11_deserializeDocumentWebhook(v **types.Webhook, value interface{ sv.PayloadUrl = ptr.String(jtv) } + case "scopeConfiguration": + if err := awsAwsjson11_deserializeDocumentScopeConfiguration(&sv.ScopeConfiguration, value); err != nil { + return err + } + case "secret": if value != nil { jtv, ok := value.(string) diff --git a/service/codebuild/serializers.go b/service/codebuild/serializers.go index b693de6f3e1..438e7d631b2 100644 --- a/service/codebuild/serializers.go +++ b/service/codebuild/serializers.go @@ -3505,6 +3505,28 @@ func awsAwsjson11_serializeDocumentScalingConfigurationInput(v *types.ScalingCon return nil } +func awsAwsjson11_serializeDocumentScopeConfiguration(v *types.ScopeConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Domain != nil { + ok := object.Key("domain") + ok.String(*v.Domain) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Scope) > 0 { + ok := object.Key("scope") + ok.String(string(v.Scope)) + } + + return nil +} + func awsAwsjson11_serializeDocumentSecurityGroupIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4036,6 +4058,13 @@ func awsAwsjson11_serializeOpDocumentCreateWebhookInput(v *CreateWebhookInput, v ok.String(*v.ProjectName) } + if v.ScopeConfiguration != nil { + ok := object.Key("scopeConfiguration") + if err := awsAwsjson11_serializeDocumentScopeConfiguration(v.ScopeConfiguration, ok); err != nil { + return err + } + } + return nil } diff --git a/service/codebuild/types/enums.go b/service/codebuild/types/enums.go index 7da8376e997..d09b9d2d2d5 100644 --- a/service/codebuild/types/enums.go +++ b/service/codebuild/types/enums.go @@ -1000,3 +1000,22 @@ func (WebhookFilterType) Values() []WebhookFilterType { "RELEASE_NAME", } } + +type WebhookScopeType string + +// Enum values for WebhookScopeType +const ( + WebhookScopeTypeGithubOrganization WebhookScopeType = "GITHUB_ORGANIZATION" + WebhookScopeTypeGithubGlobal WebhookScopeType = "GITHUB_GLOBAL" +) + +// Values returns all known values for WebhookScopeType. 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 (WebhookScopeType) Values() []WebhookScopeType { + return []WebhookScopeType{ + "GITHUB_ORGANIZATION", + "GITHUB_GLOBAL", + } +} diff --git a/service/codebuild/types/types.go b/service/codebuild/types/types.go index d15bc6f162f..4e77b81444f 100644 --- a/service/codebuild/types/types.go +++ b/service/codebuild/types/types.go @@ -2304,6 +2304,28 @@ type ScalingConfigurationOutput struct { noSmithyDocumentSerde } +// Contains configuration information about the scope for a webhook. +type ScopeConfiguration struct { + + // The name of either the enterprise or organization that will send webhook events + // to CodeBuild, depending on if the webhook is a global or organization webhook + // respectively. + // + // This member is required. + Name *string + + // The type of scope for a GitHub webhook. + // + // This member is required. + Scope WebhookScopeType + + // The domain of the GitHub Enterprise organization. Note that this parameter is + // only required if your project's source type is GITHUB_ENTERPRISE + Domain *string + + noSmithyDocumentSerde +} + // Information about the authorization settings for CodeBuild to access the source // code to be built. // @@ -2510,6 +2532,12 @@ type Webhook struct { // The CodeBuild endpoint where webhook events are sent. PayloadUrl *string + // The scope configuration for global or organization webhooks. + // + // Global or organization webhooks are only available for GitHub and Github + // Enterprise webhooks. + ScopeConfiguration *ScopeConfiguration + // The secret token of the associated repository. // // A Bitbucket webhook does not support secret . @@ -2607,6 +2635,13 @@ type WebhookFilter struct { // // Works with RELEASED and PRERELEASED events only. // + // - REPOSITORY_NAME + // + // - A webhook triggers a build when the repository name matches the regular + // expression pattern. + // + // Works with GitHub global or organization webhooks only. + // // - WORKFLOW_NAME // // - A webhook triggers a build when the workflow name matches the regular diff --git a/service/codebuild/validators.go b/service/codebuild/validators.go index dc3662aefae..38dcddfe6e6 100644 --- a/service/codebuild/validators.go +++ b/service/codebuild/validators.go @@ -1207,6 +1207,24 @@ func validateS3LogsConfig(v *types.S3LogsConfig) error { } } +func validateScopeConfiguration(v *types.ScopeConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScopeConfiguration"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Scope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSourceAuth(v *types.SourceAuth) error { if v == nil { return nil @@ -1467,6 +1485,11 @@ func validateOpCreateWebhookInput(v *CreateWebhookInput) error { invalidParams.AddNested("FilterGroups", err.(smithy.InvalidParamsError)) } } + if v.ScopeConfiguration != nil { + if err := validateScopeConfiguration(v.ScopeConfiguration); err != nil { + invalidParams.AddNested("ScopeConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/glue/api_op_CreateUsageProfile.go b/service/glue/api_op_CreateUsageProfile.go new file mode 100644 index 00000000000..5ecf57db792 --- /dev/null +++ b/service/glue/api_op_CreateUsageProfile.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Glue usage profile. +func (c *Client) CreateUsageProfile(ctx context.Context, params *CreateUsageProfileInput, optFns ...func(*Options)) (*CreateUsageProfileOutput, error) { + if params == nil { + params = &CreateUsageProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateUsageProfile", params, optFns, c.addOperationCreateUsageProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateUsageProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateUsageProfileInput struct { + + // A ProfileConfiguration object specifying the job and session values for the + // profile. + // + // This member is required. + Configuration *types.ProfileConfiguration + + // The name of the usage profile. + // + // This member is required. + Name *string + + // A description of the usage profile. + Description *string + + // A list of tags applied to the usage profile. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateUsageProfileOutput struct { + + // The name of the usage profile that was created. + Name *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateUsageProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUsageProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUsageProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateUsageProfile"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addOpCreateUsageProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUsageProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateUsageProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateUsageProfile", + } +} diff --git a/service/glue/api_op_DeleteUsageProfile.go b/service/glue/api_op_DeleteUsageProfile.go new file mode 100644 index 00000000000..a2ff3f86895 --- /dev/null +++ b/service/glue/api_op_DeleteUsageProfile.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the Glue specified usage profile. +func (c *Client) DeleteUsageProfile(ctx context.Context, params *DeleteUsageProfileInput, optFns ...func(*Options)) (*DeleteUsageProfileOutput, error) { + if params == nil { + params = &DeleteUsageProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteUsageProfile", params, optFns, c.addOperationDeleteUsageProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteUsageProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteUsageProfileInput struct { + + // The name of the usage profile to delete. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteUsageProfileOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteUsageProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteUsageProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteUsageProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteUsageProfile"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addOpDeleteUsageProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUsageProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteUsageProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteUsageProfile", + } +} diff --git a/service/glue/api_op_GetJobRun.go b/service/glue/api_op_GetJobRun.go index 0bc1fa73d5f..05b74278f67 100644 --- a/service/glue/api_op_GetJobRun.go +++ b/service/glue/api_op_GetJobRun.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the metadata for a given job run. +// Retrieves the metadata for a given job run. Job run history is accessible for +// 90 days for your workflow and job run. func (c *Client) GetJobRun(ctx context.Context, params *GetJobRunInput, optFns ...func(*Options)) (*GetJobRunOutput, error) { if params == nil { params = &GetJobRunInput{} diff --git a/service/glue/api_op_GetUsageProfile.go b/service/glue/api_op_GetUsageProfile.go new file mode 100644 index 00000000000..8fe65797db1 --- /dev/null +++ b/service/glue/api_op_GetUsageProfile.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves information about the specified Glue usage profile. +func (c *Client) GetUsageProfile(ctx context.Context, params *GetUsageProfileInput, optFns ...func(*Options)) (*GetUsageProfileOutput, error) { + if params == nil { + params = &GetUsageProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetUsageProfile", params, optFns, c.addOperationGetUsageProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetUsageProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetUsageProfileInput struct { + + // The name of the usage profile to retrieve. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type GetUsageProfileOutput struct { + + // A ProfileConfiguration object specifying the job and session values for the + // profile. + Configuration *types.ProfileConfiguration + + // The date and time when the usage profile was created. + CreatedOn *time.Time + + // A description of the usage profile. + Description *string + + // The date and time when the usage profile was last modified. + LastModifiedOn *time.Time + + // The name of the usage profile. + Name *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetUsageProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetUsageProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetUsageProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetUsageProfile"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addOpGetUsageProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUsageProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetUsageProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetUsageProfile", + } +} diff --git a/service/glue/api_op_GetWorkflowRun.go b/service/glue/api_op_GetWorkflowRun.go index 6ed2be808a5..d08be2e6be8 100644 --- a/service/glue/api_op_GetWorkflowRun.go +++ b/service/glue/api_op_GetWorkflowRun.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Retrieves the metadata for a given workflow run. +// Retrieves the metadata for a given workflow run. Job run history is accessible +// for 90 days for your workflow and job run. func (c *Client) GetWorkflowRun(ctx context.Context, params *GetWorkflowRunInput, optFns ...func(*Options)) (*GetWorkflowRunOutput, error) { if params == nil { params = &GetWorkflowRunInput{} diff --git a/service/glue/api_op_ListUsageProfiles.go b/service/glue/api_op_ListUsageProfiles.go new file mode 100644 index 00000000000..da1a754a0ee --- /dev/null +++ b/service/glue/api_op_ListUsageProfiles.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all the Glue usage profiles. +func (c *Client) ListUsageProfiles(ctx context.Context, params *ListUsageProfilesInput, optFns ...func(*Options)) (*ListUsageProfilesOutput, error) { + if params == nil { + params = &ListUsageProfilesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListUsageProfiles", params, optFns, c.addOperationListUsageProfilesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListUsageProfilesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListUsageProfilesInput struct { + + // The maximum number of usage profiles to return in a single response. + MaxResults *int32 + + // A continuation token, included if this is a continuation call. + NextToken *string + + noSmithyDocumentSerde +} + +type ListUsageProfilesOutput struct { + + // A continuation token, present if the current list segment is not the last. + NextToken *string + + // A list of usage profile ( UsageProfileDefinition ) objects. + Profiles []types.UsageProfileDefinition + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListUsageProfilesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListUsageProfiles{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListUsageProfiles{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListUsageProfiles"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsageProfiles(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListUsageProfilesAPIClient is a client that implements the ListUsageProfiles +// operation. +type ListUsageProfilesAPIClient interface { + ListUsageProfiles(context.Context, *ListUsageProfilesInput, ...func(*Options)) (*ListUsageProfilesOutput, error) +} + +var _ ListUsageProfilesAPIClient = (*Client)(nil) + +// ListUsageProfilesPaginatorOptions is the paginator options for ListUsageProfiles +type ListUsageProfilesPaginatorOptions struct { + // The maximum number of usage profiles to return in a single response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListUsageProfilesPaginator is a paginator for ListUsageProfiles +type ListUsageProfilesPaginator struct { + options ListUsageProfilesPaginatorOptions + client ListUsageProfilesAPIClient + params *ListUsageProfilesInput + nextToken *string + firstPage bool +} + +// NewListUsageProfilesPaginator returns a new ListUsageProfilesPaginator +func NewListUsageProfilesPaginator(client ListUsageProfilesAPIClient, params *ListUsageProfilesInput, optFns ...func(*ListUsageProfilesPaginatorOptions)) *ListUsageProfilesPaginator { + if params == nil { + params = &ListUsageProfilesInput{} + } + + options := ListUsageProfilesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUsageProfilesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUsageProfilesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListUsageProfiles page. +func (p *ListUsageProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUsageProfilesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListUsageProfiles(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListUsageProfiles(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListUsageProfiles", + } +} diff --git a/service/glue/api_op_UpdateUsageProfile.go b/service/glue/api_op_UpdateUsageProfile.go new file mode 100644 index 00000000000..abcae22b879 --- /dev/null +++ b/service/glue/api_op_UpdateUsageProfile.go @@ -0,0 +1,148 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update an Glue usage profile. +func (c *Client) UpdateUsageProfile(ctx context.Context, params *UpdateUsageProfileInput, optFns ...func(*Options)) (*UpdateUsageProfileOutput, error) { + if params == nil { + params = &UpdateUsageProfileInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateUsageProfile", params, optFns, c.addOperationUpdateUsageProfileMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateUsageProfileOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateUsageProfileInput struct { + + // A ProfileConfiguration object specifying the job and session values for the + // profile. + // + // This member is required. + Configuration *types.ProfileConfiguration + + // The name of the usage profile. + // + // This member is required. + Name *string + + // A description of the usage profile. + Description *string + + noSmithyDocumentSerde +} + +type UpdateUsageProfileOutput struct { + + // The name of the usage profile that was updated. + Name *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateUsageProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateUsageProfile{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateUsageProfile{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateUsageProfile"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addOpUpdateUsageProfileValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUsageProfile(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateUsageProfile(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateUsageProfile", + } +} diff --git a/service/glue/deserializers.go b/service/glue/deserializers.go index 7198826b305..fc328ed6520 100644 --- a/service/glue/deserializers.go +++ b/service/glue/deserializers.go @@ -5025,6 +5025,128 @@ func awsAwsjson11_deserializeOpErrorCreateTrigger(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpCreateUsageProfile struct { +} + +func (*awsAwsjson11_deserializeOpCreateUsageProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateUsageProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateUsageProfile(response, &metadata) + } + output := &CreateUsageProfileOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateUsageProfileOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateUsageProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateUserDefinedFunction struct { } @@ -8071,6 +8193,122 @@ func awsAwsjson11_deserializeOpErrorDeleteTrigger(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpDeleteUsageProfile struct { +} + +func (*awsAwsjson11_deserializeOpDeleteUsageProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteUsageProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteUsageProfile(response, &metadata) + } + output := &DeleteUsageProfileOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteUsageProfileOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteUsageProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDeleteUserDefinedFunction struct { } @@ -15543,14 +15781,14 @@ func awsAwsjson11_deserializeOpErrorGetUnfilteredTableMetadata(response *smithyh } } -type awsAwsjson11_deserializeOpGetUserDefinedFunction struct { +type awsAwsjson11_deserializeOpGetUsageProfile struct { } -func (*awsAwsjson11_deserializeOpGetUserDefinedFunction) ID() string { +func (*awsAwsjson11_deserializeOpGetUsageProfile) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetUserDefinedFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUsageProfile) 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) @@ -15564,9 +15802,9 @@ func (m *awsAwsjson11_deserializeOpGetUserDefinedFunction) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetUserDefinedFunction(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUsageProfile(response, &metadata) } - output := &GetUserDefinedFunctionOutput{} + output := &GetUsageProfileOutput{} out.Result = output var buff [1024]byte @@ -15586,7 +15824,7 @@ func (m *awsAwsjson11_deserializeOpGetUserDefinedFunction) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetUserDefinedFunctionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUsageProfileOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15600,7 +15838,7 @@ func (m *awsAwsjson11_deserializeOpGetUserDefinedFunction) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetUserDefinedFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUsageProfile(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)} @@ -15640,15 +15878,15 @@ func awsAwsjson11_deserializeOpErrorGetUserDefinedFunction(response *smithyhttp. case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -15662,14 +15900,14 @@ func awsAwsjson11_deserializeOpErrorGetUserDefinedFunction(response *smithyhttp. } } -type awsAwsjson11_deserializeOpGetUserDefinedFunctions struct { +type awsAwsjson11_deserializeOpGetUserDefinedFunction struct { } -func (*awsAwsjson11_deserializeOpGetUserDefinedFunctions) ID() string { +func (*awsAwsjson11_deserializeOpGetUserDefinedFunction) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetUserDefinedFunctions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUserDefinedFunction) 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) @@ -15683,9 +15921,9 @@ func (m *awsAwsjson11_deserializeOpGetUserDefinedFunctions) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetUserDefinedFunctions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUserDefinedFunction(response, &metadata) } - output := &GetUserDefinedFunctionsOutput{} + output := &GetUserDefinedFunctionOutput{} out.Result = output var buff [1024]byte @@ -15705,7 +15943,7 @@ func (m *awsAwsjson11_deserializeOpGetUserDefinedFunctions) HandleDeserialize(ct return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetUserDefinedFunctionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUserDefinedFunctionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15719,7 +15957,7 @@ func (m *awsAwsjson11_deserializeOpGetUserDefinedFunctions) HandleDeserialize(ct return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetUserDefinedFunctions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUserDefinedFunction(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)} @@ -15781,14 +16019,14 @@ func awsAwsjson11_deserializeOpErrorGetUserDefinedFunctions(response *smithyhttp } } -type awsAwsjson11_deserializeOpGetWorkflow struct { +type awsAwsjson11_deserializeOpGetUserDefinedFunctions struct { } -func (*awsAwsjson11_deserializeOpGetWorkflow) ID() string { +func (*awsAwsjson11_deserializeOpGetUserDefinedFunctions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetUserDefinedFunctions) 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) @@ -15802,9 +16040,9 @@ func (m *awsAwsjson11_deserializeOpGetWorkflow) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetWorkflow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetUserDefinedFunctions(response, &metadata) } - output := &GetWorkflowOutput{} + output := &GetUserDefinedFunctionsOutput{} out.Result = output var buff [1024]byte @@ -15824,7 +16062,7 @@ func (m *awsAwsjson11_deserializeOpGetWorkflow) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetWorkflowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetUserDefinedFunctionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -15838,7 +16076,126 @@ func (m *awsAwsjson11_deserializeOpGetWorkflow) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetUserDefinedFunctions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetWorkflow struct { +} + +func (*awsAwsjson11_deserializeOpGetWorkflow) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetWorkflow(response, &metadata) + } + output := &GetWorkflowOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetWorkflowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetWorkflow(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)} @@ -18526,14 +18883,14 @@ func awsAwsjson11_deserializeOpErrorListTriggers(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListWorkflows struct { +type awsAwsjson11_deserializeOpListUsageProfiles struct { } -func (*awsAwsjson11_deserializeOpListWorkflows) ID() string { +func (*awsAwsjson11_deserializeOpListUsageProfiles) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListUsageProfiles) 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) @@ -18547,9 +18904,9 @@ func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListWorkflows(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListUsageProfiles(response, &metadata) } - output := &ListWorkflowsOutput{} + output := &ListUsageProfilesOutput{} out.Result = output var buff [1024]byte @@ -18569,7 +18926,7 @@ func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListWorkflowsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListUsageProfilesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18583,7 +18940,7 @@ func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListUsageProfiles(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)} @@ -18626,6 +18983,9 @@ func awsAwsjson11_deserializeOpErrorListWorkflows(response *smithyhttp.Response, case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -18639,14 +18999,14 @@ func awsAwsjson11_deserializeOpErrorListWorkflows(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings struct { +type awsAwsjson11_deserializeOpListWorkflows struct { } -func (*awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) ID() string { +func (*awsAwsjson11_deserializeOpListWorkflows) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListWorkflows) 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) @@ -18660,9 +19020,9 @@ func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListWorkflows(response, &metadata) } - output := &PutDataCatalogEncryptionSettingsOutput{} + output := &ListWorkflowsOutput{} out.Result = output var buff [1024]byte @@ -18682,7 +19042,7 @@ func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeser return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutDataCatalogEncryptionSettingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListWorkflowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18696,7 +19056,7 @@ func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeser return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListWorkflows(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)} @@ -18752,14 +19112,14 @@ func awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response *s } } -type awsAwsjson11_deserializeOpPutResourcePolicy struct { +type awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings struct { } -func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { +func (*awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) 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) @@ -18773,9 +19133,9 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response, &metadata) } - output := &PutResourcePolicyOutput{} + output := &PutDataCatalogEncryptionSettingsOutput{} out.Result = output var buff [1024]byte @@ -18795,7 +19155,7 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutDataCatalogEncryptionSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18809,7 +19169,7 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(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)} @@ -18846,12 +19206,6 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConditionCheckFailureException", errorCode): - return awsAwsjson11_deserializeErrorConditionCheckFailureException(response, errorBody) - - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -18871,14 +19225,14 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpPutSchemaVersionMetadata struct { +type awsAwsjson11_deserializeOpPutResourcePolicy struct { } -func (*awsAwsjson11_deserializeOpPutSchemaVersionMetadata) ID() string { +func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18892,9 +19246,9 @@ func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) } - output := &PutSchemaVersionMetadataOutput{} + output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -18914,7 +19268,7 @@ func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutSchemaVersionMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18928,7 +19282,7 @@ func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18965,20 +19319,20 @@ func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response *smithyhtt errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + case strings.EqualFold("ConditionCheckFailureException", errorCode): + return awsAwsjson11_deserializeErrorConditionCheckFailureException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -18990,14 +19344,14 @@ func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response *smithyhtt } } -type awsAwsjson11_deserializeOpPutWorkflowRunProperties struct { +type awsAwsjson11_deserializeOpPutSchemaVersionMetadata struct { } -func (*awsAwsjson11_deserializeOpPutWorkflowRunProperties) ID() string { +func (*awsAwsjson11_deserializeOpPutSchemaVersionMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) 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) @@ -19011,9 +19365,9 @@ func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response, &metadata) } - output := &PutWorkflowRunPropertiesOutput{} + output := &PutSchemaVersionMetadataOutput{} out.Result = output var buff [1024]byte @@ -19033,7 +19387,7 @@ func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutWorkflowRunPropertiesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutSchemaVersionMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19047,7 +19401,7 @@ func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(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)} @@ -19084,24 +19438,18 @@ func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response *smithyhtt errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("AlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) @@ -19115,14 +19463,14 @@ func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response *smithyhtt } } -type awsAwsjson11_deserializeOpQuerySchemaVersionMetadata struct { +type awsAwsjson11_deserializeOpPutWorkflowRunProperties struct { } -func (*awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) ID() string { +func (*awsAwsjson11_deserializeOpPutWorkflowRunProperties) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) 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) @@ -19136,9 +19484,9 @@ func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response, &metadata) } - output := &QuerySchemaVersionMetadataOutput{} + output := &PutWorkflowRunPropertiesOutput{} out.Result = output var buff [1024]byte @@ -19158,7 +19506,7 @@ func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentQuerySchemaVersionMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutWorkflowRunPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19172,7 +19520,7 @@ func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(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)} @@ -19209,15 +19557,27 @@ func awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response *smithyh errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19228,14 +19588,14 @@ func awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response *smithyh } } -type awsAwsjson11_deserializeOpRegisterSchemaVersion struct { +type awsAwsjson11_deserializeOpQuerySchemaVersionMetadata struct { } -func (*awsAwsjson11_deserializeOpRegisterSchemaVersion) ID() string { +func (*awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterSchemaVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) 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) @@ -19249,9 +19609,9 @@ func (m *awsAwsjson11_deserializeOpRegisterSchemaVersion) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response, &metadata) } - output := &RegisterSchemaVersionOutput{} + output := &QuerySchemaVersionMetadataOutput{} out.Result = output var buff [1024]byte @@ -19271,7 +19631,7 @@ func (m *awsAwsjson11_deserializeOpRegisterSchemaVersion) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRegisterSchemaVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentQuerySchemaVersionMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19285,7 +19645,120 @@ func (m *awsAwsjson11_deserializeOpRegisterSchemaVersion) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRegisterSchemaVersion struct { +} + +func (*awsAwsjson11_deserializeOpRegisterSchemaVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRegisterSchemaVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response, &metadata) + } + output := &RegisterSchemaVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRegisterSchemaVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(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)} @@ -24839,6 +25312,128 @@ func awsAwsjson11_deserializeOpErrorUpdateTrigger(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpUpdateUsageProfile struct { +} + +func (*awsAwsjson11_deserializeOpUpdateUsageProfile) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateUsageProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateUsageProfile(response, &metadata) + } + output := &UpdateUsageProfileOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateUsageProfileOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateUsageProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpUpdateUserDefinedFunction struct { } @@ -25987,6 +26582,41 @@ func awsAwsjson11_deserializeErrorNoScheduleException(response *smithyhttp.Respo return output } +func awsAwsjson11_deserializeErrorOperationNotSupportedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OperationNotSupportedException{} + err := awsAwsjson11_deserializeDocumentOperationNotSupportedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson11_deserializeErrorOperationTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -26627,6 +27257,42 @@ func awsAwsjson11_deserializeDocumentAggregateOperations(v *[]types.AggregateOpe return nil } +func awsAwsjson11_deserializeDocumentAllowedValuesStringList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigValueString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -31365,6 +32031,104 @@ func awsAwsjson11_deserializeDocumentConditionList(v *[]types.Condition, value i return nil } +func awsAwsjson11_deserializeDocumentConfigurationMap(v *map[string]types.ConfigurationObject, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.ConfigurationObject + if *v == nil { + mv = map[string]types.ConfigurationObject{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ConfigurationObject + mapVar := parsedVal + destAddr := &mapVar + if err := awsAwsjson11_deserializeDocumentConfigurationObject(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentConfigurationObject(v **types.ConfigurationObject, 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.ConfigurationObject + if *v == nil { + sv = &types.ConfigurationObject{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowedValues": + if err := awsAwsjson11_deserializeDocumentAllowedValuesStringList(&sv.AllowedValues, value); err != nil { + return err + } + + case "DefaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigValueString to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "MaxValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigValueString to be of type string, got %T instead", value) + } + sv.MaxValue = ptr.String(jtv) + } + + case "MinValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigValueString to be of type string, got %T instead", value) + } + sv.MinValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -40678,6 +41442,15 @@ func awsAwsjson11_deserializeDocumentJob(v **types.Job, value interface{}) error sv.NumberOfWorkers = ptr.Int32(int32(i64)) } + case "ProfileName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProfileName = ptr.String(jtv) + } + case "Role": if value != nil { jtv, ok := value.(string) @@ -41339,6 +42112,15 @@ func awsAwsjson11_deserializeDocumentJobRun(v **types.JobRun, value interface{}) sv.PreviousRunId = ptr.String(jtv) } + case "ProfileName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProfileName = ptr.String(jtv) + } + case "SecurityConfiguration": if value != nil { jtv, ok := value.(string) @@ -44538,6 +45320,46 @@ func awsAwsjson11_deserializeDocumentOneInput(v *[]string, value interface{}) er return nil } +func awsAwsjson11_deserializeDocumentOperationNotSupportedException(v **types.OperationNotSupportedException, 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.OperationNotSupportedException + if *v == nil { + sv = &types.OperationNotSupportedException{} + } 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 MessageString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentOperationTimeoutException(v **types.OperationTimeoutException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -46063,6 +46885,47 @@ func awsAwsjson11_deserializeDocumentPrincipalPermissionsList(v *[]types.Princip return nil } +func awsAwsjson11_deserializeDocumentProfileConfiguration(v **types.ProfileConfiguration, 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.ProfileConfiguration + if *v == nil { + sv = &types.ProfileConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "JobConfiguration": + if err := awsAwsjson11_deserializeDocumentConfigurationMap(&sv.JobConfiguration, value); err != nil { + return err + } + + case "SessionConfiguration": + if err := awsAwsjson11_deserializeDocumentConfigurationMap(&sv.SessionConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentPublicKeysList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -49808,6 +50671,15 @@ func awsAwsjson11_deserializeDocumentSession(v **types.Session, value interface{ sv.NumberOfWorkers = ptr.Int32(int32(i64)) } + case "ProfileName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProfileName = ptr.String(jtv) + } + case "Progress": if value != nil { switch jtv := value.(type) { @@ -53424,6 +54296,121 @@ func awsAwsjson11_deserializeDocumentUpsertRedshiftTargetOptions(v **types.Upser return nil } +func awsAwsjson11_deserializeDocumentUsageProfileDefinition(v **types.UsageProfileDefinition, 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.UsageProfileDefinition + if *v == nil { + sv = &types.UsageProfileDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreatedOn": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedOn = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimestampValue to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DescriptionString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LastModifiedOn": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedOn = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimestampValue to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUsageProfileDefinitionList(v *[]types.UsageProfileDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.UsageProfileDefinition + if *v == nil { + cv = []types.UsageProfileDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UsageProfileDefinition + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUsageProfileDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentUserDefinedFunction(v **types.UserDefinedFunction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -56506,6 +57493,46 @@ func awsAwsjson11_deserializeOpDocumentCreateTriggerOutput(v **CreateTriggerOutp return nil } +func awsAwsjson11_deserializeOpDocumentCreateUsageProfileOutput(v **CreateUsageProfileOutput, 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 *CreateUsageProfileOutput + if *v == nil { + sv = &CreateUsageProfileOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateUserDefinedFunctionOutput(v **CreateUserDefinedFunctionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -57434,6 +58461,37 @@ func awsAwsjson11_deserializeOpDocumentDeleteTriggerOutput(v **DeleteTriggerOutp return nil } +func awsAwsjson11_deserializeOpDocumentDeleteUsageProfileOutput(v **DeleteUsageProfileOutput, 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 *DeleteUsageProfileOutput + if *v == nil { + sv = &DeleteUsageProfileOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDeleteUserDefinedFunctionOutput(v **DeleteUserDefinedFunctionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -61191,6 +62249,92 @@ func awsAwsjson11_deserializeOpDocumentGetUnfilteredTableMetadataOutput(v **GetU return nil } +func awsAwsjson11_deserializeOpDocumentGetUsageProfileOutput(v **GetUsageProfileOutput, 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 *GetUsageProfileOutput + if *v == nil { + sv = &GetUsageProfileOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Configuration": + if err := awsAwsjson11_deserializeDocumentProfileConfiguration(&sv.Configuration, value); err != nil { + return err + } + + case "CreatedOn": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedOn = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimestampValue to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DescriptionString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "LastModifiedOn": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedOn = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimestampValue to be a JSON Number, got %T instead", value) + + } + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetUserDefinedFunctionOutput(v **GetUserDefinedFunctionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -62343,6 +63487,51 @@ func awsAwsjson11_deserializeOpDocumentListTriggersOutput(v **ListTriggersOutput return nil } +func awsAwsjson11_deserializeOpDocumentListUsageProfilesOutput(v **ListUsageProfilesOutput, 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 *ListUsageProfilesOutput + if *v == nil { + sv = &ListUsageProfilesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrchestrationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Profiles": + if err := awsAwsjson11_deserializeDocumentUsageProfileDefinitionList(&sv.Profiles, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListWorkflowsOutput(v **ListWorkflowsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -64510,6 +65699,46 @@ func awsAwsjson11_deserializeOpDocumentUpdateTriggerOutput(v **UpdateTriggerOutp return nil } +func awsAwsjson11_deserializeOpDocumentUpdateUsageProfileOutput(v **UpdateUsageProfileOutput, 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 *UpdateUsageProfileOutput + if *v == nil { + sv = &UpdateUsageProfileOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateUserDefinedFunctionOutput(v **UpdateUserDefinedFunctionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/glue/generated.json b/service/glue/generated.json index 6a79354a070..f98bc24ba55 100644 --- a/service/glue/generated.json +++ b/service/glue/generated.json @@ -50,6 +50,7 @@ "api_op_CreateTable.go", "api_op_CreateTableOptimizer.go", "api_op_CreateTrigger.go", + "api_op_CreateUsageProfile.go", "api_op_CreateUserDefinedFunction.go", "api_op_CreateWorkflow.go", "api_op_DeleteBlueprint.go", @@ -76,6 +77,7 @@ "api_op_DeleteTableOptimizer.go", "api_op_DeleteTableVersion.go", "api_op_DeleteTrigger.go", + "api_op_DeleteUsageProfile.go", "api_op_DeleteUserDefinedFunction.go", "api_op_DeleteWorkflow.go", "api_op_GetBlueprint.go", @@ -140,6 +142,7 @@ "api_op_GetUnfilteredPartitionMetadata.go", "api_op_GetUnfilteredPartitionsMetadata.go", "api_op_GetUnfilteredTableMetadata.go", + "api_op_GetUsageProfile.go", "api_op_GetUserDefinedFunction.go", "api_op_GetUserDefinedFunctions.go", "api_op_GetWorkflow.go", @@ -166,6 +169,7 @@ "api_op_ListStatements.go", "api_op_ListTableOptimizerRuns.go", "api_op_ListTriggers.go", + "api_op_ListUsageProfiles.go", "api_op_ListWorkflows.go", "api_op_PutDataCatalogEncryptionSettings.go", "api_op_PutResourcePolicy.go", @@ -219,6 +223,7 @@ "api_op_UpdateTable.go", "api_op_UpdateTableOptimizer.go", "api_op_UpdateTrigger.go", + "api_op_UpdateUsageProfile.go", "api_op_UpdateUserDefinedFunction.go", "api_op_UpdateWorkflow.go", "auth.go", diff --git a/service/glue/serializers.go b/service/glue/serializers.go index 70f6471f3d4..816161f9ae3 100644 --- a/service/glue/serializers.go +++ b/service/glue/serializers.go @@ -2327,6 +2327,61 @@ func (m *awsAwsjson11_serializeOpCreateTrigger) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateUsageProfile struct { +} + +func (*awsAwsjson11_serializeOpCreateUsageProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateUsageProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateUsageProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.CreateUsageProfile") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateUsageProfileInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateUserDefinedFunction struct { } @@ -3757,6 +3812,61 @@ func (m *awsAwsjson11_serializeOpDeleteTrigger) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteUsageProfile struct { +} + +func (*awsAwsjson11_serializeOpDeleteUsageProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteUsageProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteUsageProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.DeleteUsageProfile") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteUsageProfileInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteUserDefinedFunction struct { } @@ -7277,6 +7387,61 @@ func (m *awsAwsjson11_serializeOpGetUnfilteredTableMetadata) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetUsageProfile struct { +} + +func (*awsAwsjson11_serializeOpGetUsageProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetUsageProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetUsageProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.GetUsageProfile") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetUsageProfileInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpGetUserDefinedFunction struct { } @@ -8707,6 +8872,61 @@ func (m *awsAwsjson11_serializeOpListTriggers) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListUsageProfiles struct { +} + +func (*awsAwsjson11_serializeOpListUsageProfiles) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListUsageProfiles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListUsageProfilesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.ListUsageProfiles") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListUsageProfilesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListWorkflows struct { } @@ -11622,6 +11842,61 @@ func (m *awsAwsjson11_serializeOpUpdateTrigger) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateUsageProfile struct { +} + +func (*awsAwsjson11_serializeOpUpdateUsageProfile) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateUsageProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateUsageProfileInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.UpdateUsageProfile") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateUsageProfileInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpUpdateUserDefinedFunction struct { } @@ -11883,6 +12158,17 @@ func awsAwsjson11_serializeDocumentAggregateOperations(v []types.AggregateOperat return nil } +func awsAwsjson11_serializeDocumentAllowedValuesStringList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentAmazonRedshiftAdvancedOption(v *types.AmazonRedshiftAdvancedOption, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -13622,6 +13908,49 @@ func awsAwsjson11_serializeDocumentConditionList(v []types.Condition, value smit return nil } +func awsAwsjson11_serializeDocumentConfigurationMap(v map[string]types.ConfigurationObject, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsAwsjson11_serializeDocumentConfigurationObject(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentConfigurationObject(v *types.ConfigurationObject, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedValues != nil { + ok := object.Key("AllowedValues") + if err := awsAwsjson11_serializeDocumentAllowedValuesStringList(v.AllowedValues, ok); err != nil { + return err + } + } + + if v.DefaultValue != nil { + ok := object.Key("DefaultValue") + ok.String(*v.DefaultValue) + } + + if v.MaxValue != nil { + ok := object.Key("MaxValue") + ok.String(*v.MaxValue) + } + + if v.MinValue != nil { + ok := object.Key("MinValue") + ok.String(*v.MinValue) + } + + return nil +} + func awsAwsjson11_serializeDocumentConnectionInput(v *types.ConnectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -17675,6 +18004,27 @@ func awsAwsjson11_serializeDocumentPrincipalPermissionsList(v []types.PrincipalP return nil } +func awsAwsjson11_serializeDocumentProfileConfiguration(v *types.ProfileConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.JobConfiguration != nil { + ok := object.Key("JobConfiguration") + if err := awsAwsjson11_serializeDocumentConfigurationMap(v.JobConfiguration, ok); err != nil { + return err + } + } + + if v.SessionConfiguration != nil { + ok := object.Key("SessionConfiguration") + if err := awsAwsjson11_serializeDocumentConfigurationMap(v.SessionConfiguration, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentPropertyPredicate(v *types.PropertyPredicate, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -22090,6 +22440,37 @@ func awsAwsjson11_serializeOpDocumentCreateTriggerInput(v *CreateTriggerInput, v return nil } +func awsAwsjson11_serializeOpDocumentCreateUsageProfileInput(v *CreateUsageProfileInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Configuration != nil { + ok := object.Key("Configuration") + if err := awsAwsjson11_serializeDocumentProfileConfiguration(v.Configuration, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagsMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateUserDefinedFunctionInput(v *CreateUserDefinedFunctionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -22583,6 +22964,18 @@ func awsAwsjson11_serializeOpDocumentDeleteTriggerInput(v *DeleteTriggerInput, v return nil } +func awsAwsjson11_serializeOpDocumentDeleteUsageProfileInput(v *DeleteUsageProfileInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteUserDefinedFunctionInput(v *DeleteUserDefinedFunctionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -24071,6 +24464,18 @@ func awsAwsjson11_serializeOpDocumentGetUnfilteredTableMetadataInput(v *GetUnfil return nil } +func awsAwsjson11_serializeOpDocumentGetUsageProfileInput(v *GetUsageProfileInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetUserDefinedFunctionInput(v *GetUserDefinedFunctionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -24709,6 +25114,23 @@ func awsAwsjson11_serializeOpDocumentListTriggersInput(v *ListTriggersInput, val return nil } +func awsAwsjson11_serializeOpDocumentListUsageProfilesInput(v *ListUsageProfilesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListWorkflowsInput(v *ListWorkflowsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -26281,6 +26703,30 @@ func awsAwsjson11_serializeOpDocumentUpdateTriggerInput(v *UpdateTriggerInput, v return nil } +func awsAwsjson11_serializeOpDocumentUpdateUsageProfileInput(v *UpdateUsageProfileInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Configuration != nil { + ok := object.Key("Configuration") + if err := awsAwsjson11_serializeDocumentProfileConfiguration(v.Configuration, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateUserDefinedFunctionInput(v *UpdateUserDefinedFunctionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/glue/snapshot/api_op_CreateUsageProfile.go.snap b/service/glue/snapshot/api_op_CreateUsageProfile.go.snap new file mode 100644 index 00000000000..b6cc4b6c736 --- /dev/null +++ b/service/glue/snapshot/api_op_CreateUsageProfile.go.snap @@ -0,0 +1,36 @@ +CreateUsageProfile + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/glue/snapshot/api_op_DeleteUsageProfile.go.snap b/service/glue/snapshot/api_op_DeleteUsageProfile.go.snap new file mode 100644 index 00000000000..7aed2bb558c --- /dev/null +++ b/service/glue/snapshot/api_op_DeleteUsageProfile.go.snap @@ -0,0 +1,36 @@ +DeleteUsageProfile + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/glue/snapshot/api_op_GetUsageProfile.go.snap b/service/glue/snapshot/api_op_GetUsageProfile.go.snap new file mode 100644 index 00000000000..59ccbe71445 --- /dev/null +++ b/service/glue/snapshot/api_op_GetUsageProfile.go.snap @@ -0,0 +1,36 @@ +GetUsageProfile + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/glue/snapshot/api_op_ListUsageProfiles.go.snap b/service/glue/snapshot/api_op_ListUsageProfiles.go.snap new file mode 100644 index 00000000000..bef675c7bed --- /dev/null +++ b/service/glue/snapshot/api_op_ListUsageProfiles.go.snap @@ -0,0 +1,35 @@ +ListUsageProfiles + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/glue/snapshot/api_op_UpdateUsageProfile.go.snap b/service/glue/snapshot/api_op_UpdateUsageProfile.go.snap new file mode 100644 index 00000000000..169c7f4ff98 --- /dev/null +++ b/service/glue/snapshot/api_op_UpdateUsageProfile.go.snap @@ -0,0 +1,36 @@ +UpdateUsageProfile + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/glue/snapshot_test.go b/service/glue/snapshot_test.go index dae7184aff3..79c7e9fd14a 100644 --- a/service/glue/snapshot_test.go +++ b/service/glue/snapshot_test.go @@ -566,6 +566,18 @@ func TestCheckSnapshot_CreateTrigger(t *testing.T) { } } +func TestCheckSnapshot_CreateUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.CreateUserDefinedFunction(context.Background(), nil, func(o *Options) { @@ -878,6 +890,18 @@ func TestCheckSnapshot_DeleteTrigger(t *testing.T) { } } +func TestCheckSnapshot_DeleteUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteUserDefinedFunction(context.Background(), nil, func(o *Options) { @@ -1646,6 +1670,18 @@ func TestCheckSnapshot_GetUnfilteredTableMetadata(t *testing.T) { } } +func TestCheckSnapshot_GetUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_GetUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.GetUserDefinedFunction(context.Background(), nil, func(o *Options) { @@ -1958,6 +1994,18 @@ func TestCheckSnapshot_ListTriggers(t *testing.T) { } } +func TestCheckSnapshot_ListUsageProfiles(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListUsageProfiles(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListUsageProfiles") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListWorkflows(t *testing.T) { svc := New(Options{}) _, err := svc.ListWorkflows(context.Background(), nil, func(o *Options) { @@ -2594,6 +2642,18 @@ func TestCheckSnapshot_UpdateTrigger(t *testing.T) { } } +func TestCheckSnapshot_UpdateUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateUserDefinedFunction(context.Background(), nil, func(o *Options) { @@ -3121,6 +3181,18 @@ func TestUpdateSnapshot_CreateTrigger(t *testing.T) { } } +func TestUpdateSnapshot_CreateUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.CreateUserDefinedFunction(context.Background(), nil, func(o *Options) { @@ -3433,6 +3505,18 @@ func TestUpdateSnapshot_DeleteTrigger(t *testing.T) { } } +func TestUpdateSnapshot_DeleteUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteUserDefinedFunction(context.Background(), nil, func(o *Options) { @@ -4201,6 +4285,18 @@ func TestUpdateSnapshot_GetUnfilteredTableMetadata(t *testing.T) { } } +func TestUpdateSnapshot_GetUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_GetUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.GetUserDefinedFunction(context.Background(), nil, func(o *Options) { @@ -4513,6 +4609,18 @@ func TestUpdateSnapshot_ListTriggers(t *testing.T) { } } +func TestUpdateSnapshot_ListUsageProfiles(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListUsageProfiles(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListUsageProfiles") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListWorkflows(t *testing.T) { svc := New(Options{}) _, err := svc.ListWorkflows(context.Background(), nil, func(o *Options) { @@ -5149,6 +5257,18 @@ func TestUpdateSnapshot_UpdateTrigger(t *testing.T) { } } +func TestUpdateSnapshot_UpdateUsageProfile(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateUsageProfile(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateUsageProfile") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateUserDefinedFunction(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateUserDefinedFunction(context.Background(), nil, func(o *Options) { diff --git a/service/glue/types/errors.go b/service/glue/types/errors.go index 13aaf6dc02b..5a43bf94c7c 100644 --- a/service/glue/types/errors.go +++ b/service/glue/types/errors.go @@ -705,6 +705,32 @@ func (e *NoScheduleException) ErrorCode() string { } func (e *NoScheduleException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The operation is not available in the region. +type OperationNotSupportedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OperationNotSupportedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OperationNotSupportedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OperationNotSupportedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OperationNotSupportedException" + } + return *e.ErrorCodeOverride +} +func (e *OperationNotSupportedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The operation timed out. type OperationTimeoutException struct { Message *string diff --git a/service/glue/types/types.go b/service/glue/types/types.go index c70d33e765d..c2762a42759 100644 --- a/service/glue/types/types.go +++ b/service/glue/types/types.go @@ -1466,6 +1466,25 @@ type Condition struct { noSmithyDocumentSerde } +// Specifies the values that an admin sets for each job or session parameter +// configured in a Glue usage profile. +type ConfigurationObject struct { + + // A list of allowed values for the parameter. + AllowedValues []string + + // A default value for the parameter. + DefaultValue *string + + // A maximum allowed value for the parameter. + MaxValue *string + + // A minimum allowed value for the parameter. + MinValue *string + + noSmithyDocumentSerde +} + // The confusion matrix shows you what your transform is predicting accurately and // what types of errors it is making. // @@ -4425,6 +4444,9 @@ type Job struct { // runs. NumberOfWorkers *int32 + // The name of an Glue usage profile associated with the job. + ProfileName *string + // The name or Amazon Resource Name (ARN) of the IAM role associated with this job. Role *string @@ -4737,6 +4759,9 @@ type JobRun struct { // the StartJobRun action. PreviousRunId *string + // The name of an Glue usage profile associated with the job run. + ProfileName *string + // The name of the SecurityConfiguration structure to be used with this job run. SecurityConfiguration *string @@ -6348,6 +6373,19 @@ type PrincipalPermissions struct { noSmithyDocumentSerde } +// Specifies the job and session values that an admin configures in an Glue usage +// profile. +type ProfileConfiguration struct { + + // A key-value map of configuration parameters for Glue jobs. + JobConfiguration map[string]ConfigurationObject + + // A key-value map of configuration parameters for Glue sessions. + SessionConfiguration map[string]ConfigurationObject + + noSmithyDocumentSerde +} + // Defines a property predicate. type PropertyPredicate struct { @@ -7603,6 +7641,9 @@ type Session struct { // The number of workers of a defined WorkerType to use for the session. NumberOfWorkers *int32 + // The name of an Glue usage profile associated with the session. + ProfileName *string + // The code execution progress of the session. Progress float64 @@ -8927,6 +8968,24 @@ type UpsertRedshiftTargetOptions struct { noSmithyDocumentSerde } +// Describes an Glue usage profile. +type UsageProfileDefinition struct { + + // The date and time when the usage profile was created. + CreatedOn *time.Time + + // A description of the usage profile. + Description *string + + // The date and time when the usage profile was last modified. + LastModifiedOn *time.Time + + // The name of the usage profile. + Name *string + + noSmithyDocumentSerde +} + // Represents the equivalent of a Hive user-defined function ( UDF ) definition. type UserDefinedFunction struct { diff --git a/service/glue/validators.go b/service/glue/validators.go index 5b36b6ee5b7..31329e61508 100644 --- a/service/glue/validators.go +++ b/service/glue/validators.go @@ -850,6 +850,26 @@ func (m *validateOpCreateTrigger) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpCreateUsageProfile struct { +} + +func (*validateOpCreateUsageProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateUsageProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateUsageProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateUsageProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateUserDefinedFunction struct { } @@ -1350,6 +1370,26 @@ func (m *validateOpDeleteTrigger) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpDeleteUsageProfile struct { +} + +func (*validateOpDeleteUsageProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteUsageProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteUsageProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteUsageProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteUserDefinedFunction struct { } @@ -2330,6 +2370,26 @@ func (m *validateOpGetUnfilteredTableMetadata) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpGetUsageProfile struct { +} + +func (*validateOpGetUsageProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetUsageProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetUsageProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetUsageProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetUserDefinedFunction struct { } @@ -3590,6 +3650,26 @@ func (m *validateOpUpdateTrigger) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateUsageProfile struct { +} + +func (*validateOpUpdateUsageProfile) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateUsageProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateUsageProfileInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateUsageProfileInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateUserDefinedFunction struct { } @@ -3798,6 +3878,10 @@ func addOpCreateTriggerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTrigger{}, middleware.After) } +func addOpCreateUsageProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateUsageProfile{}, middleware.After) +} + func addOpCreateUserDefinedFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateUserDefinedFunction{}, middleware.After) } @@ -3898,6 +3982,10 @@ func addOpDeleteTriggerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTrigger{}, middleware.After) } +func addOpDeleteUsageProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteUsageProfile{}, middleware.After) +} + func addOpDeleteUserDefinedFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteUserDefinedFunction{}, middleware.After) } @@ -4094,6 +4182,10 @@ func addOpGetUnfilteredTableMetadataValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpGetUnfilteredTableMetadata{}, middleware.After) } +func addOpGetUsageProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetUsageProfile{}, middleware.After) +} + func addOpGetUserDefinedFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetUserDefinedFunction{}, middleware.After) } @@ -4346,6 +4438,10 @@ func addOpUpdateTriggerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTrigger{}, middleware.After) } +func addOpUpdateUsageProfileValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateUsageProfile{}, middleware.After) +} + func addOpUpdateUserDefinedFunctionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateUserDefinedFunction{}, middleware.After) } @@ -8844,6 +8940,24 @@ func validateOpCreateTriggerInput(v *CreateTriggerInput) error { } } +func validateOpCreateUsageProfileInput(v *CreateUsageProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateUsageProfileInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Configuration == nil { + invalidParams.Add(smithy.NewErrParamRequired("Configuration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateUserDefinedFunctionInput(v *CreateUserDefinedFunctionInput) error { if v == nil { return nil @@ -9270,6 +9384,21 @@ func validateOpDeleteTriggerInput(v *DeleteTriggerInput) error { } } +func validateOpDeleteUsageProfileInput(v *DeleteUsageProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteUsageProfileInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteUserDefinedFunctionInput(v *DeleteUserDefinedFunctionInput) error { if v == nil { return nil @@ -10155,6 +10284,21 @@ func validateOpGetUnfilteredTableMetadataInput(v *GetUnfilteredTableMetadataInpu } } +func validateOpGetUsageProfileInput(v *GetUsageProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetUsageProfileInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetUserDefinedFunctionInput(v *GetUserDefinedFunctionInput) error { if v == nil { return nil @@ -11318,6 +11462,24 @@ func validateOpUpdateTriggerInput(v *UpdateTriggerInput) error { } } +func validateOpUpdateUsageProfileInput(v *UpdateUsageProfileInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateUsageProfileInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Configuration == nil { + invalidParams.Add(smithy.NewErrParamRequired("Configuration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateUserDefinedFunctionInput(v *UpdateUserDefinedFunctionInput) error { if v == nil { return nil diff --git a/service/mediaconvert/deserializers.go b/service/mediaconvert/deserializers.go index c1c918b6b97..b8c7bfab419 100644 --- a/service/mediaconvert/deserializers.go +++ b/service/mediaconvert/deserializers.go @@ -8970,6 +8970,15 @@ func awsRestjson1_deserializeDocumentCmafGroupSettings(v **types.CmafGroupSettin sv.CodecSpecification = types.CmafCodecSpecification(jtv) } + case "dashIFrameTrickPlayNameModifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max256 to be of type string, got %T instead", value) + } + sv.DashIFrameTrickPlayNameModifier = ptr.String(jtv) + } + case "dashManifestStyle": if value != nil { jtv, ok := value.(string) @@ -9979,6 +9988,15 @@ func awsRestjson1_deserializeDocumentDashIsoGroupSettings(v **types.DashIsoGroup sv.BaseUrl = ptr.String(jtv) } + case "dashIFrameTrickPlayNameModifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max256 to be of type string, got %T instead", value) + } + sv.DashIFrameTrickPlayNameModifier = ptr.String(jtv) + } + case "dashManifestStyle": if value != nil { jtv, ok := value.(string) @@ -15196,7 +15214,7 @@ func awsRestjson1_deserializeDocumentInputClipping(v **types.InputClipping, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __stringPattern010920405090509092 to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringPattern010920405090509092090909 to be of type string, got %T instead", value) } sv.EndTimecode = ptr.String(jtv) } @@ -15205,7 +15223,7 @@ func awsRestjson1_deserializeDocumentInputClipping(v **types.InputClipping, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __stringPattern010920405090509092 to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringPattern010920405090509092090909 to be of type string, got %T instead", value) } sv.StartTimecode = ptr.String(jtv) } @@ -15496,6 +15514,19 @@ func awsRestjson1_deserializeDocumentInputVideoGenerator(v **types.InputVideoGen for key, value := range shape { switch key { + case "channels": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max32 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Channels = ptr.Int32(int32(i64)) + } + case "duration": if value != nil { jtv, ok := value.(json.Number) @@ -15509,6 +15540,45 @@ func awsRestjson1_deserializeDocumentInputVideoGenerator(v **types.InputVideoGen sv.Duration = ptr.Int32(int32(i64)) } + case "framerateDenominator": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max1001 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FramerateDenominator = ptr.Int32(int32(i64)) + } + + case "framerateNumerator": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max60000 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FramerateNumerator = ptr.Int32(int32(i64)) + } + + case "sampleRate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin32000Max48000 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SampleRate = ptr.Int32(int32(i64)) + } + default: _, _ = key, value @@ -19552,7 +19622,7 @@ func awsRestjson1_deserializeDocumentOutput(v **types.Output, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __stringMin1 to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMin1Max256 to be of type string, got %T instead", value) } sv.NameModifier = ptr.String(jtv) } diff --git a/service/mediaconvert/serializers.go b/service/mediaconvert/serializers.go index f9bf9061400..fb6bd208b3b 100644 --- a/service/mediaconvert/serializers.go +++ b/service/mediaconvert/serializers.go @@ -4203,6 +4203,11 @@ func awsRestjson1_serializeDocumentCmafGroupSettings(v *types.CmafGroupSettings, ok.String(string(v.CodecSpecification)) } + if v.DashIFrameTrickPlayNameModifier != nil { + ok := object.Key("dashIFrameTrickPlayNameModifier") + ok.String(*v.DashIFrameTrickPlayNameModifier) + } + if len(v.DashManifestStyle) > 0 { ok := object.Key("dashManifestStyle") ok.String(string(v.DashManifestStyle)) @@ -4692,6 +4697,11 @@ func awsRestjson1_serializeDocumentDashIsoGroupSettings(v *types.DashIsoGroupSet ok.String(*v.BaseUrl) } + if v.DashIFrameTrickPlayNameModifier != nil { + ok := object.Key("dashIFrameTrickPlayNameModifier") + ok.String(*v.DashIFrameTrickPlayNameModifier) + } + if len(v.DashManifestStyle) > 0 { ok := object.Key("dashManifestStyle") ok.String(string(v.DashManifestStyle)) @@ -7169,11 +7179,31 @@ func awsRestjson1_serializeDocumentInputVideoGenerator(v *types.InputVideoGenera object := value.Object() defer object.Close() + if v.Channels != nil { + ok := object.Key("channels") + ok.Integer(*v.Channels) + } + if v.Duration != nil { ok := object.Key("duration") ok.Integer(*v.Duration) } + if v.FramerateDenominator != nil { + ok := object.Key("framerateDenominator") + ok.Integer(*v.FramerateDenominator) + } + + if v.FramerateNumerator != nil { + ok := object.Key("framerateNumerator") + ok.Integer(*v.FramerateNumerator) + } + + if v.SampleRate != nil { + ok := object.Key("sampleRate") + ok.Integer(*v.SampleRate) + } + return nil } diff --git a/service/mediaconvert/types/types.go b/service/mediaconvert/types/types.go index 539865b103b..1593f20e222 100644 --- a/service/mediaconvert/types/types.go +++ b/service/mediaconvert/types/types.go @@ -1501,6 +1501,18 @@ type CmafGroupSettings struct { // generation. CodecSpecification CmafCodecSpecification + // Specify whether MediaConvert generates I-frame only video segments for DASH + // trick play, also known as trick mode. When specified, the I-frame only video + // segments are included within an additional AdaptationSet in your DASH output + // manifest. To generate I-frame only video segments: Enter a name as a text + // string, up to 256 character long. This name is appended to the end of this + // output group's base filename, that you specify as part of your destination URI, + // and used for the I-frame only video segment files. You may also include format + // identifiers. For more information, see: + // https://docs.aws.amazon.com/mediaconvert/latest/ug/using-variables-in-your-job-settings.html#using-settings-variables-with-streaming-outputs + // To not generate I-frame only video segments: Leave blank. + DashIFrameTrickPlayNameModifier *string + // Specify how MediaConvert writes SegmentTimeline in your output DASH manifest. // To write a SegmentTimeline in each video Representation: Keep the default value, // Basic. To write a common SegmentTimeline in the video AdaptationSet: Choose @@ -2064,6 +2076,18 @@ type DashIsoGroupSettings struct { // than the manifest file. BaseUrl *string + // Specify whether MediaConvert generates I-frame only video segments for DASH + // trick play, also known as trick mode. When specified, the I-frame only video + // segments are included within an additional AdaptationSet in your DASH output + // manifest. To generate I-frame only video segments: Enter a name as a text + // string, up to 256 character long. This name is appended to the end of this + // output group's base filename, that you specify as part of your destination URI, + // and used for the I-frame only video segment files. You may also include format + // identifiers. For more information, see: + // https://docs.aws.amazon.com/mediaconvert/latest/ug/using-variables-in-your-job-settings.html#using-settings-variables-with-streaming-outputs + // To not generate I-frame only video segments: Leave blank. + DashIFrameTrickPlayNameModifier *string + // Specify how MediaConvert writes SegmentTimeline in your output DASH manifest. // To write a SegmentTimeline in each video Representation: Keep the default value, // Basic. To write a common SegmentTimeline in the video AdaptationSet: Choose @@ -4845,11 +4869,31 @@ type InputTemplate struct { // https://docs.aws.amazon.com/mediaconvert/latest/ug/video-generator.html type InputVideoGenerator struct { - // Specify an integer value for Black video duration from 50 to 86400000 to - // generate a black video input for that many milliseconds. Required when you - // include Video generator. + // Specify the number of audio channels to include in your video generator input. + // MediaConvert creates these audio channels as silent audio within a single audio + // track. Enter an integer from 1 to 32. + Channels *int32 + + // Specify the duration, in milliseconds, for your video generator input. Enter an + // integer from 50 to 86400000. Duration *int32 + // Specify the denominator of the fraction that represents the frame rate for your + // video generator input. When you do, you must also specify a value for Frame rate + // numerator. MediaConvert uses a default frame rate of 29.97 when you leave Frame + // rate numerator and Frame rate denominator blank. + FramerateDenominator *int32 + + // Specify the numerator of the fraction that represents the frame rate for your + // video generator input. When you do, you must also specify a value for Frame rate + // denominator. MediaConvert uses a default frame rate of 29.97 when you leave + // Frame rate numerator and Frame rate denominator blank. + FramerateNumerator *int32 + + // Specify the audio sample rate, in Hz, for the silent audio in your video + // generator input. Enter an integer from 32000 to 48000. + SampleRate *int32 + noSmithyDocumentSerde } diff --git a/service/secretsmanager/api_op_CreateSecret.go b/service/secretsmanager/api_op_CreateSecret.go index d8817a73a67..72e588431ba 100644 --- a/service/secretsmanager/api_op_CreateSecret.go +++ b/service/secretsmanager/api_op_CreateSecret.go @@ -48,8 +48,9 @@ import ( // SecretString because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail]. // // Required permissions: secretsmanager:CreateSecret . If you include tags in the -// secret, you also need secretsmanager:TagResource . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. +// secret, you also need secretsmanager:TagResource . To add replica Regions, you +// must also have secretsmanager:ReplicateSecretToRegions . For more information, +// see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. // // To encrypt the secret with a KMS key other than aws/secretsmanager , you need // kms:GenerateDataKey and kms:Decrypt permission to the key. diff --git a/service/secretsmanager/api_op_RotateSecret.go b/service/secretsmanager/api_op_RotateSecret.go index f776aed1b46..eb684f0e35f 100644 --- a/service/secretsmanager/api_op_RotateSecret.go +++ b/service/secretsmanager/api_op_RotateSecret.go @@ -98,7 +98,7 @@ type RotateSecretInput struct { // // By default, Secrets Manager rotates the secret immediately. // - // [testSecret step]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html + // [testSecret step]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_lambda-functions.html#rotate-secrets_lambda-functions-code RotateImmediately *bool // For secrets that use a Lambda rotation function to rotate, the ARN of the