From c863429153eccf73a2afa12d92596d8b9a9a0e19 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 22 Feb 2023 19:13:59 +0000 Subject: [PATCH] Regenerated Clients --- .../4a8ce32a48f64825be812ee6e569c2a8.json | 8 + .../7ec16f966abd4bff9f77a30d784c20f6.json | 8 + .../a3cdd36a051c450087c0ce436dbec899.json | 8 + .../e5d9a7da60d74c4cab3f3e91da71ddfe.json | 8 + .../ecc762d4fdf54534b14dd9ec8043caaa.json | 8 + .../ef13e510fcc846d28ba97a227fefdbb5.json | 8 + service/chimesdkvoice/deserializers.go | 9 + service/chimesdkvoice/serializers.go | 5 + service/chimesdkvoice/types/types.go | 2 + .../cloudfront/api_op_CreateCachePolicy.go | 12 +- service/cloudfront/types/enums.go | 6 + service/cloudfront/types/types.go | 204 ++-- service/opensearch/api_op_CreateDomain.go | 10 + .../opensearch/api_op_ListScheduledActions.go | 228 ++++ .../api_op_StartServiceSoftwareUpdate.go | 23 + .../opensearch/api_op_UpdateDomainConfig.go | 10 +- .../api_op_UpdateScheduledAction.go | 163 +++ service/opensearch/deserializers.go | 1060 +++++++++++++++-- service/opensearch/generated.json | 2 + service/opensearch/serializers.go | 272 +++++ service/opensearch/types/enums.go | 104 ++ service/opensearch/types/errors.go | 37 +- service/opensearch/types/types.go | 184 ++- service/opensearch/validators.go | 143 +++ .../api_op_BatchCreateRumMetricDefinitions.go | 54 +- .../rum/api_op_PutRumMetricsDestination.go | 5 +- service/rum/deserializers.go | 18 + service/rum/serializers.go | 5 + service/rum/types/types.go | 151 ++- service/ssm/api_op_CreateAssociation.go | 16 +- service/ssm/api_op_CreateDocument.go | 13 +- service/ssm/api_op_GetServiceSetting.go | 5 +- .../ssm/api_op_ModifyDocumentPermission.go | 17 +- service/ssm/api_op_PutParameter.go | 36 +- service/ssm/api_op_UpdateAssociation.go | 17 +- service/ssm/api_op_UpdateServiceSetting.go | 3 + service/ssm/types/errors.go | 12 +- service/ssm/types/types.go | 24 +- 38 files changed, 2589 insertions(+), 309 deletions(-) create mode 100644 .changelog/4a8ce32a48f64825be812ee6e569c2a8.json create mode 100644 .changelog/7ec16f966abd4bff9f77a30d784c20f6.json create mode 100644 .changelog/a3cdd36a051c450087c0ce436dbec899.json create mode 100644 .changelog/e5d9a7da60d74c4cab3f3e91da71ddfe.json create mode 100644 .changelog/ecc762d4fdf54534b14dd9ec8043caaa.json create mode 100644 .changelog/ef13e510fcc846d28ba97a227fefdbb5.json create mode 100644 service/opensearch/api_op_ListScheduledActions.go create mode 100644 service/opensearch/api_op_UpdateScheduledAction.go diff --git a/.changelog/4a8ce32a48f64825be812ee6e569c2a8.json b/.changelog/4a8ce32a48f64825be812ee6e569c2a8.json new file mode 100644 index 00000000000..8dd91a3d301 --- /dev/null +++ b/.changelog/4a8ce32a48f64825be812ee6e569c2a8.json @@ -0,0 +1,8 @@ +{ + "id": "4a8ce32a-48f6-4825-be81-2ee6e569c2a8", + "type": "feature", + "description": "AWS DataSync has relaxed the minimum length constraint of AccessKey for Object Storage locations to 1.", + "modules": [ + "service/datasync" + ] +} \ No newline at end of file diff --git a/.changelog/7ec16f966abd4bff9f77a30d784c20f6.json b/.changelog/7ec16f966abd4bff9f77a30d784c20f6.json new file mode 100644 index 00000000000..9207d7ba35b --- /dev/null +++ b/.changelog/7ec16f966abd4bff9f77a30d784c20f6.json @@ -0,0 +1,8 @@ +{ + "id": "7ec16f96-6abd-4bff-9f77-a30d784c20f6", + "type": "feature", + "description": "This release introduces support for Voice Connector media metrics in the Amazon Chime SDK Voice namespace", + "modules": [ + "service/chimesdkvoice" + ] +} \ No newline at end of file diff --git a/.changelog/a3cdd36a051c450087c0ce436dbec899.json b/.changelog/a3cdd36a051c450087c0ce436dbec899.json new file mode 100644 index 00000000000..5d2a9380974 --- /dev/null +++ b/.changelog/a3cdd36a051c450087c0ce436dbec899.json @@ -0,0 +1,8 @@ +{ + "id": "a3cdd36a-051c-4500-87c0-ce436dbec899", + "type": "feature", + "description": "CloudWatch RUM now supports CloudWatch Custom Metrics", + "modules": [ + "service/rum" + ] +} \ No newline at end of file diff --git a/.changelog/e5d9a7da60d74c4cab3f3e91da71ddfe.json b/.changelog/e5d9a7da60d74c4cab3f3e91da71ddfe.json new file mode 100644 index 00000000000..2cd576b2c11 --- /dev/null +++ b/.changelog/e5d9a7da60d74c4cab3f3e91da71ddfe.json @@ -0,0 +1,8 @@ +{ + "id": "e5d9a7da-60d7-4c4c-ab3f-3e91da71ddfe", + "type": "feature", + "description": "This release lets customers configure Off-peak window and software update related properties for a new/existing domain. It enhances the capabilities of StartServiceSoftwareUpdate API; adds 2 new APIs - ListScheduledActions \u0026 UpdateScheduledAction; and allows Auto-tune to make use of Off-peak window.", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/ecc762d4fdf54534b14dd9ec8043caaa.json b/.changelog/ecc762d4fdf54534b14dd9ec8043caaa.json new file mode 100644 index 00000000000..0d841dd3269 --- /dev/null +++ b/.changelog/ecc762d4fdf54534b14dd9ec8043caaa.json @@ -0,0 +1,8 @@ +{ + "id": "ecc762d4-fdf5-4534-b14d-d9ec8043caaa", + "type": "documentation", + "description": "Document only update for Feb 2023", + "modules": [ + "service/ssm" + ] +} \ No newline at end of file diff --git a/.changelog/ef13e510fcc846d28ba97a227fefdbb5.json b/.changelog/ef13e510fcc846d28ba97a227fefdbb5.json new file mode 100644 index 00000000000..1b62fa6d21a --- /dev/null +++ b/.changelog/ef13e510fcc846d28ba97a227fefdbb5.json @@ -0,0 +1,8 @@ +{ + "id": "ef13e510-fcc8-46d2-8ba9-7a227fefdbb5", + "type": "feature", + "description": "CloudFront now supports block lists in origin request policies so that you can forward all headers, cookies, or query string from viewer requests to the origin *except* for those specified in the block list.", + "modules": [ + "service/cloudfront" + ] +} \ No newline at end of file diff --git a/service/chimesdkvoice/deserializers.go b/service/chimesdkvoice/deserializers.go index e5b2a358029..d93491e38b4 100644 --- a/service/chimesdkvoice/deserializers.go +++ b/service/chimesdkvoice/deserializers.go @@ -12663,6 +12663,15 @@ func awsRestjson1_deserializeDocumentLoggingConfiguration(v **types.LoggingConfi for key, value := range shape { switch key { + case "EnableMediaMetricLogs": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnableMediaMetricLogs = ptr.Bool(jtv) + } + case "EnableSIPLogs": if value != nil { jtv, ok := value.(bool) diff --git a/service/chimesdkvoice/serializers.go b/service/chimesdkvoice/serializers.go index 2ccb77ba77e..8106d8ffc94 100644 --- a/service/chimesdkvoice/serializers.go +++ b/service/chimesdkvoice/serializers.go @@ -5378,6 +5378,11 @@ func awsRestjson1_serializeDocumentLoggingConfiguration(v *types.LoggingConfigur object := value.Object() defer object.Close() + if v.EnableMediaMetricLogs != nil { + ok := object.Key("EnableMediaMetricLogs") + ok.Boolean(*v.EnableMediaMetricLogs) + } + if v.EnableSIPLogs != nil { ok := object.Key("EnableSIPLogs") ok.Boolean(*v.EnableSIPLogs) diff --git a/service/chimesdkvoice/types/types.go b/service/chimesdkvoice/types/types.go index 14c330aab35..109d85f0a99 100644 --- a/service/chimesdkvoice/types/types.go +++ b/service/chimesdkvoice/types/types.go @@ -88,6 +88,8 @@ type GeoMatchParams struct { } type LoggingConfiguration struct { + EnableMediaMetricLogs *bool + EnableSIPLogs *bool noSmithyDocumentSerde diff --git a/service/cloudfront/api_op_CreateCachePolicy.go b/service/cloudfront/api_op_CreateCachePolicy.go index 3c00d1f9dd4..91aa501fa61 100644 --- a/service/cloudfront/api_op_CreateCachePolicy.go +++ b/service/cloudfront/api_op_CreateCachePolicy.go @@ -24,12 +24,12 @@ import ( // (TTL) values that you want objects to stay in the CloudFront cache. // // The -// headers, cookies, and query strings that are included in the cache key are -// automatically included in requests that CloudFront sends to the origin. -// CloudFront sends a request when it can't find an object in its cache that -// matches the request's cache key. If you want to send values to the origin but -// not include them in the cache key, use OriginRequestPolicy. For more information -// about cache policies, see Controlling the cache key +// headers, cookies, and query strings that are included in the cache key are also +// included in requests that CloudFront sends to the origin. CloudFront sends a +// request when it can't find an object in its cache that matches the request's +// cache key. If you want to send values to the origin but not include them in the +// cache key, use OriginRequestPolicy. For more information about cache policies, +// see Controlling the cache key // (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html) // in the Amazon CloudFront Developer Guide. func (c *Client) CreateCachePolicy(ctx context.Context, params *CreateCachePolicyInput, optFns ...func(*Options)) (*CreateCachePolicyOutput, error) { diff --git a/service/cloudfront/types/enums.go b/service/cloudfront/types/enums.go index dfb41f87e95..2859fd0548b 100644 --- a/service/cloudfront/types/enums.go +++ b/service/cloudfront/types/enums.go @@ -434,6 +434,7 @@ const ( OriginRequestPolicyCookieBehaviorNone OriginRequestPolicyCookieBehavior = "none" OriginRequestPolicyCookieBehaviorWhitelist OriginRequestPolicyCookieBehavior = "whitelist" OriginRequestPolicyCookieBehaviorAll OriginRequestPolicyCookieBehavior = "all" + OriginRequestPolicyCookieBehaviorAllExcept OriginRequestPolicyCookieBehavior = "allExcept" ) // Values returns all known values for OriginRequestPolicyCookieBehavior. Note that @@ -445,6 +446,7 @@ func (OriginRequestPolicyCookieBehavior) Values() []OriginRequestPolicyCookieBeh "none", "whitelist", "all", + "allExcept", } } @@ -456,6 +458,7 @@ const ( OriginRequestPolicyHeaderBehaviorWhitelist OriginRequestPolicyHeaderBehavior = "whitelist" OriginRequestPolicyHeaderBehaviorAllViewer OriginRequestPolicyHeaderBehavior = "allViewer" OriginRequestPolicyHeaderBehaviorAllViewerAndWhitelistCloudFront OriginRequestPolicyHeaderBehavior = "allViewerAndWhitelistCloudFront" + OriginRequestPolicyHeaderBehaviorAllExcept OriginRequestPolicyHeaderBehavior = "allExcept" ) // Values returns all known values for OriginRequestPolicyHeaderBehavior. Note that @@ -468,6 +471,7 @@ func (OriginRequestPolicyHeaderBehavior) Values() []OriginRequestPolicyHeaderBeh "whitelist", "allViewer", "allViewerAndWhitelistCloudFront", + "allExcept", } } @@ -478,6 +482,7 @@ const ( OriginRequestPolicyQueryStringBehaviorNone OriginRequestPolicyQueryStringBehavior = "none" OriginRequestPolicyQueryStringBehaviorWhitelist OriginRequestPolicyQueryStringBehavior = "whitelist" OriginRequestPolicyQueryStringBehaviorAll OriginRequestPolicyQueryStringBehavior = "all" + OriginRequestPolicyQueryStringBehaviorAllExcept OriginRequestPolicyQueryStringBehavior = "allExcept" ) // Values returns all known values for OriginRequestPolicyQueryStringBehavior. Note @@ -489,6 +494,7 @@ func (OriginRequestPolicyQueryStringBehavior) Values() []OriginRequestPolicyQuer "none", "whitelist", "all", + "allExcept", } } diff --git a/service/cloudfront/types/types.go b/service/cloudfront/types/types.go index e392d6cad46..eebf0c9d728 100644 --- a/service/cloudfront/types/types.go +++ b/service/cloudfront/types/types.go @@ -469,11 +469,11 @@ type CachedMethods struct { // that you want objects to stay in the CloudFront cache. // // The headers, cookies, -// and query strings that are included in the cache key are automatically included -// in requests that CloudFront sends to the origin. CloudFront sends a request when -// it can't find a valid object in its cache that matches the request's cache key. -// If you want to send values to the origin but not include them in the cache key, -// use OriginRequestPolicy. +// and query strings that are included in the cache key are also included in +// requests that CloudFront sends to the origin. CloudFront sends a request when it +// can't find a valid object in its cache that matches the request's cache key. If +// you want to send values to the origin but not include them in the cache key, use +// OriginRequestPolicy. type CachePolicy struct { // The cache policy configuration. @@ -506,8 +506,8 @@ type CachePolicy struct { // the CloudFront cache. // // The headers, cookies, and query strings that are included -// in the cache key are automatically included in requests that CloudFront sends to -// the origin. CloudFront sends a request when it can't find a valid object in its +// in the cache key are also included in requests that CloudFront sends to the +// origin. CloudFront sends a request when it can't find a valid object in its // cache that matches the request's cache key. If you want to send values to the // origin but not include them in the cache key, use OriginRequestPolicy. type CachePolicyConfig struct { @@ -556,7 +556,7 @@ type CachePolicyConfig struct { MaxTTL *int64 // The HTTP headers, cookies, and URL query strings to include in the cache key. - // The values included in the cache key are automatically included in requests that + // The values included in the cache key are also included in requests that // CloudFront sends to the origin. ParametersInCacheKeyAndForwardedToOrigin *ParametersInCacheKeyAndForwardedToOrigin @@ -564,31 +564,30 @@ type CachePolicyConfig struct { } // An object that determines whether any cookies in viewer requests (and if so, -// which cookies) are included in the cache key and automatically included in -// requests that CloudFront sends to the origin. +// which cookies) are included in the cache key and in requests that CloudFront +// sends to the origin. type CachePolicyCookiesConfig struct { // Determines whether any cookies in viewer requests are included in the cache key - // and automatically included in requests that CloudFront sends to the origin. - // Valid values are: + // and in requests that CloudFront sends to the origin. Valid values are: // - // * none – Cookies in viewer requests are not included in the - // cache key and are not automatically included in requests that CloudFront sends - // to the origin. Even when this field is set to none, any cookies that are listed - // in an OriginRequestPolicy are included in origin requests. + // * none – + // No cookies in viewer requests are included in the cache key or in requests that + // CloudFront sends to the origin. Even when this field is set to none, any cookies + // that are listed in an OriginRequestPolicy are included in origin requests. // - // * whitelist – The - // cookies in viewer requests that are listed in the CookieNames type are included - // in the cache key and automatically included in requests that CloudFront sends to - // the origin. + // * + // whitelist – Only the cookies in viewer requests that are listed in the + // CookieNames type are included in the cache key and in requests that CloudFront + // sends to the origin. // - // * allExcept – All cookies in viewer requests that are not listed in - // the CookieNames type are included in the cache key and automatically included in - // requests that CloudFront sends to the origin. + // * allExcept – All cookies in viewer requests are included + // in the cache key and in requests that CloudFront sends to the origin, except for + // those that are listed in the CookieNames type, which are not included. // - // * all – All cookies in viewer - // requests are included in the cache key and are automatically included in - // requests that CloudFront sends to the origin. + // * all – + // All cookies in viewer requests are included in the cache key and in requests + // that CloudFront sends to the origin. // // This member is required. CookieBehavior CachePolicyCookieBehavior @@ -600,22 +599,21 @@ type CachePolicyCookiesConfig struct { } // An object that determines whether any HTTP headers (and if so, which headers) -// are included in the cache key and automatically included in requests that -// CloudFront sends to the origin. +// are included in the cache key and in requests that CloudFront sends to the +// origin. type CachePolicyHeadersConfig struct { - // Determines whether any HTTP headers are included in the cache key and - // automatically included in requests that CloudFront sends to the origin. Valid - // values are: + // Determines whether any HTTP headers are included in the cache key and in + // requests that CloudFront sends to the origin. Valid values are: // - // * none – HTTP headers are not included in the cache key and are not - // automatically included in requests that CloudFront sends to the origin. Even - // when this field is set to none, any headers that are listed in an - // OriginRequestPolicy are included in origin requests. + // * none – No + // HTTP headers are included in the cache key or in requests that CloudFront sends + // to the origin. Even when this field is set to none, any headers that are listed + // in an OriginRequestPolicy are included in origin requests. // - // * whitelist – The HTTP - // headers that are listed in the Headers type are included in the cache key and - // are automatically included in requests that CloudFront sends to the origin. + // * whitelist – Only + // the HTTP headers that are listed in the Headers type are included in the cache + // key and in requests that CloudFront sends to the origin. // // This member is required. HeaderBehavior CachePolicyHeaderBehavior @@ -651,42 +649,41 @@ type CachePolicyList struct { } // An object that determines whether any URL query strings in viewer requests (and -// if so, which query strings) are included in the cache key and automatically -// included in requests that CloudFront sends to the origin. +// if so, which query strings) are included in the cache key and in requests that +// CloudFront sends to the origin. type CachePolicyQueryStringsConfig struct { // Determines whether any URL query strings in viewer requests are included in the - // cache key and automatically included in requests that CloudFront sends to the - // origin. Valid values are: + // cache key and in requests that CloudFront sends to the origin. Valid values + // are: // - // * none – Query strings in viewer requests are not - // included in the cache key and are not automatically included in requests that - // CloudFront sends to the origin. Even when this field is set to none, any query - // strings that are listed in an OriginRequestPolicy are included in origin - // requests. + // * none – No query strings in viewer requests are included in the cache key + // or in requests that CloudFront sends to the origin. Even when this field is set + // to none, any query strings that are listed in an OriginRequestPolicy are + // included in origin requests. // - // * whitelist – The query strings in viewer requests that are listed in - // the QueryStringNames type are included in the cache key and automatically - // included in requests that CloudFront sends to the origin. + // * whitelist – Only the query strings in viewer + // requests that are listed in the QueryStringNames type are included in the cache + // key and in requests that CloudFront sends to the origin. // // * allExcept – All - // query strings in viewer requests that are not listed in the QueryStringNames - // type are included in the cache key and automatically included in requests that - // CloudFront sends to the origin. + // query strings in viewer requests are included in the cache key and in requests + // that CloudFront sends to the origin, except those that are listed in the + // QueryStringNames type, which are not included. // - // * all – All query strings in viewer requests - // are included in the cache key and are automatically included in requests that - // CloudFront sends to the origin. + // * all – All query strings in + // viewer requests are included in the cache key and in requests that CloudFront + // sends to the origin. // // This member is required. QueryStringBehavior CachePolicyQueryStringBehavior // Contains the specific query strings in viewer requests that either are or are - // not included in the cache key and automatically included in requests that - // CloudFront sends to the origin. The behavior depends on whether the - // QueryStringBehavior field in the CachePolicyQueryStringsConfig type is set to - // whitelist (the listed query strings are included) or allExcept (the listed query - // strings are not included, but all other query strings are). + // not included in the cache key and in requests that CloudFront sends to the + // origin. The behavior depends on whether the QueryStringBehavior field in the + // CachePolicyQueryStringsConfig type is set to whitelist (the listed query strings + // are included) or allExcept (the listed query strings are not included, but all + // other query strings are). QueryStrings *QueryStringNames noSmithyDocumentSerde @@ -3375,18 +3372,22 @@ type OriginRequestPolicyCookiesConfig struct { // Determines whether cookies in viewer requests are included in requests that // CloudFront sends to the origin. Valid values are: // - // * none – Cookies in viewer - // requests are not included in requests that CloudFront sends to the origin. Even - // when this field is set to none, any cookies that are listed in a CachePolicy are + // * none – No cookies in viewer + // requests are included in requests that CloudFront sends to the origin. Even when + // this field is set to none, any cookies that are listed in a CachePolicy are // included in origin requests. // - // * whitelist – The cookies in viewer requests that - // are listed in the CookieNames type are included in requests that CloudFront + // * whitelist – Only the cookies in viewer requests + // that are listed in the CookieNames type are included in requests that CloudFront // sends to the origin. // // * all – All cookies in viewer requests are included in // requests that CloudFront sends to the origin. // + // * allExcept – All cookies in + // viewer requests are included in requests that CloudFront sends to the origin, + // except for those listed in the CookieNames type, which are not included. + // // This member is required. CookieBehavior OriginRequestPolicyCookieBehavior @@ -3403,22 +3404,27 @@ type OriginRequestPolicyHeadersConfig struct { // Determines whether any HTTP headers are included in requests that CloudFront // sends to the origin. Valid values are: // - // * none – HTTP headers are not included - // in requests that CloudFront sends to the origin. Even when this field is set to - // none, any headers that are listed in a CachePolicy are included in origin - // requests. + // * none – No HTTP headers in viewer + // requests are included in requests that CloudFront sends to the origin. Even when + // this field is set to none, any headers that are listed in a CachePolicy are + // included in origin requests. + // + // * whitelist – Only the HTTP headers that are + // listed in the Headers type are included in requests that CloudFront sends to the + // origin. // - // * whitelist – The HTTP headers that are listed in the Headers type - // are included in requests that CloudFront sends to the origin. + // * allViewer – All HTTP headers in viewer requests are included in + // requests that CloudFront sends to the origin. // - // * allViewer – All - // HTTP headers in viewer requests are included in requests that CloudFront sends - // to the origin. + // * allViewerAndWhitelistCloudFront + // – All HTTP headers in viewer requests and the additional CloudFront headers that + // are listed in the Headers type are included in requests that CloudFront sends to + // the origin. The additional headers are added by CloudFront. // - // * allViewerAndWhitelistCloudFront – All HTTP headers in viewer - // requests and the additional CloudFront headers that are listed in the Headers - // type are included in requests that CloudFront sends to the origin. The - // additional headers are added by CloudFront. + // * allExcept – All + // HTTP headers in viewer requests are included in requests that CloudFront sends + // to the origin, except for those listed in the Headers type, which are not + // included. // // This member is required. HeaderBehavior OriginRequestPolicyHeaderBehavior @@ -3462,12 +3468,12 @@ type OriginRequestPolicyQueryStringsConfig struct { // Determines whether any URL query strings in viewer requests are included in // requests that CloudFront sends to the origin. Valid values are: // - // * none – Query - // strings in viewer requests are not included in requests that CloudFront sends to - // the origin. Even when this field is set to none, any query strings that are + // * none – No + // query strings in viewer requests are included in requests that CloudFront sends + // to the origin. Even when this field is set to none, any query strings that are // listed in a CachePolicy are included in origin requests. // - // * whitelist – The + // * whitelist – Only the // query strings in viewer requests that are listed in the QueryStringNames type // are included in requests that CloudFront sends to the origin. // @@ -3475,11 +3481,19 @@ type OriginRequestPolicyQueryStringsConfig struct { // strings in viewer requests are included in requests that CloudFront sends to the // origin. // + // * allExcept – All query strings in viewer requests are included in + // requests that CloudFront sends to the origin, except for those listed in the + // QueryStringNames type, which are not included. + // // This member is required. QueryStringBehavior OriginRequestPolicyQueryStringBehavior - // Contains a list of the query strings in viewer requests that are included in - // requests that CloudFront sends to the origin. + // Contains the specific query strings in viewer requests that either are or are + // not included in requests that CloudFront sends to the origin. The behavior + // depends on whether the QueryStringBehavior field in the + // OriginRequestPolicyQueryStringsConfig type is set to whitelist (the listed query + // strings are included) or allExcept (the listed query strings are not included, + // but all other query strings are). QueryStrings *QueryStringNames noSmithyDocumentSerde @@ -3568,15 +3582,15 @@ type OriginSslProtocols struct { // These values can include HTTP headers, cookies, and URL query strings. // CloudFront uses the cache key to find an object in its cache that it can return // to the viewer. The headers, cookies, and query strings that are included in the -// cache key are automatically included in requests that CloudFront sends to the -// origin. CloudFront sends a request when it can't find an object in its cache -// that matches the request's cache key. If you want to send values to the origin -// but not include them in the cache key, use OriginRequestPolicy. +// cache key are also included in requests that CloudFront sends to the origin. +// CloudFront sends a request when it can't find an object in its cache that +// matches the request's cache key. If you want to send values to the origin but +// not include them in the cache key, use OriginRequestPolicy. type ParametersInCacheKeyAndForwardedToOrigin struct { // An object that determines whether any cookies in viewer requests (and if so, - // which cookies) are included in the cache key and automatically included in - // requests that CloudFront sends to the origin. + // which cookies) are included in the cache key and in requests that CloudFront + // sends to the origin. // // This member is required. CookiesConfig *CachePolicyCookiesConfig @@ -3613,15 +3627,15 @@ type ParametersInCacheKeyAndForwardedToOrigin struct { EnableAcceptEncodingGzip *bool // An object that determines whether any HTTP headers (and if so, which headers) - // are included in the cache key and automatically included in requests that - // CloudFront sends to the origin. + // are included in the cache key and in requests that CloudFront sends to the + // origin. // // This member is required. HeadersConfig *CachePolicyHeadersConfig // An object that determines whether any URL query strings in viewer requests (and - // if so, which query strings) are included in the cache key and automatically - // included in requests that CloudFront sends to the origin. + // if so, which query strings) are included in the cache key and in requests that + // CloudFront sends to the origin. // // This member is required. QueryStringsConfig *CachePolicyQueryStringsConfig diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go index 1c836ec4042..1ba7f6fd3e1 100644 --- a/service/opensearch/api_op_CreateDomain.go +++ b/service/opensearch/api_op_CreateDomain.go @@ -110,10 +110,20 @@ type CreateDomainInput struct { // Enables node-to-node encryption. NodeToNodeEncryptionOptions *types.NodeToNodeEncryptionOptions + // Specifies a daily 10-hour time block during which OpenSearch Service can perform + // configuration changes on the domain, including service software updates and + // Auto-Tune enhancements that require a blue/green deployment. If no options are + // specified, the default start time of 10:00 P.M. local time (for the Region that + // the domain is created in) is used. + OffPeakWindowOptions *types.OffPeakWindowOptions + // DEPRECATED. Container for the parameters required to configure automated // snapshots of domain indexes. SnapshotOptions *types.SnapshotOptions + // Software update options for the domain. + SoftwareUpdateOptions *types.SoftwareUpdateOptions + // List of tags to add to the domain upon creation. TagList []types.Tag diff --git a/service/opensearch/api_op_ListScheduledActions.go b/service/opensearch/api_op_ListScheduledActions.go new file mode 100644 index 00000000000..f00acde6bfa --- /dev/null +++ b/service/opensearch/api_op_ListScheduledActions.go @@ -0,0 +1,228 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of configuration changes that are scheduled for a domain. These +// changes can be service software updates +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/service-software.html) +// or blue/green Auto-Tune enhancements +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html#auto-tune-types). +func (c *Client) ListScheduledActions(ctx context.Context, params *ListScheduledActionsInput, optFns ...func(*Options)) (*ListScheduledActionsOutput, error) { + if params == nil { + params = &ListScheduledActionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListScheduledActions", params, optFns, c.addOperationListScheduledActionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListScheduledActionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListScheduledActionsInput struct { + + // The name of the domain. + // + // This member is required. + DomainName *string + + // An optional parameter that specifies the maximum number of results to return. + // You can use nextToken to get the next page of results. + MaxResults int32 + + // If your initial ListScheduledActions operation returns a nextToken, you can + // include the returned nextToken in subsequent ListScheduledActions operations, + // which returns results in the next page. + NextToken *string + + noSmithyDocumentSerde +} + +type ListScheduledActionsOutput struct { + + // When nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again using + // the returned token to retrieve the next page. + NextToken *string + + // A list of actions that are scheduled for the domain. + ScheduledActions []types.ScheduledAction + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListScheduledActionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListScheduledActions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListScheduledActions{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListScheduledActionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduledActions(options.Region), middleware.Before); 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 + } + return nil +} + +// ListScheduledActionsAPIClient is a client that implements the +// ListScheduledActions operation. +type ListScheduledActionsAPIClient interface { + ListScheduledActions(context.Context, *ListScheduledActionsInput, ...func(*Options)) (*ListScheduledActionsOutput, error) +} + +var _ ListScheduledActionsAPIClient = (*Client)(nil) + +// ListScheduledActionsPaginatorOptions is the paginator options for +// ListScheduledActions +type ListScheduledActionsPaginatorOptions struct { + // An optional parameter that specifies the maximum number of results to return. + // You can use nextToken to get the next page of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListScheduledActionsPaginator is a paginator for ListScheduledActions +type ListScheduledActionsPaginator struct { + options ListScheduledActionsPaginatorOptions + client ListScheduledActionsAPIClient + params *ListScheduledActionsInput + nextToken *string + firstPage bool +} + +// NewListScheduledActionsPaginator returns a new ListScheduledActionsPaginator +func NewListScheduledActionsPaginator(client ListScheduledActionsAPIClient, params *ListScheduledActionsInput, optFns ...func(*ListScheduledActionsPaginatorOptions)) *ListScheduledActionsPaginator { + if params == nil { + params = &ListScheduledActionsInput{} + } + + options := ListScheduledActionsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListScheduledActionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListScheduledActionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListScheduledActions page. +func (p *ListScheduledActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListScheduledActionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListScheduledActions(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_opListScheduledActions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "ListScheduledActions", + } +} diff --git a/service/opensearch/api_op_StartServiceSoftwareUpdate.go b/service/opensearch/api_op_StartServiceSoftwareUpdate.go index 2d0fa775e94..4997ad410c7 100644 --- a/service/opensearch/api_op_StartServiceSoftwareUpdate.go +++ b/service/opensearch/api_op_StartServiceSoftwareUpdate.go @@ -38,6 +38,29 @@ type StartServiceSoftwareUpdateInput struct { // This member is required. DomainName *string + // The Epoch timestamp when you want the service software update to start. You only + // need to specify this parameter if you set ScheduleAt to TIMESTAMP. + DesiredStartTime *int64 + + // When to start the service software update. + // + // * NOW - Immediately schedules the + // update to happen in the current hour if there's capacity available. + // + // * TIMESTAMP + // - Lets you specify a custom date and time to apply the update. If you specify + // this value, you must also provide a value for DesiredStartTime. + // + // * + // OFF_PEAK_WINDOW - Marks the update to be picked up during an upcoming off-peak + // window. There's no guarantee that the update will happen during the next + // immediate window. Depending on capacity, it might happen in subsequent + // days. + // + // Default: NOW if you don't specify a value for DesiredStartTime, and + // TIMESTAMP if you do. + ScheduleAt types.ScheduleAt + noSmithyDocumentSerde } diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index 160568ed8e4..8d5cc41c61f 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -109,16 +109,22 @@ type UpdateDomainConfigInput struct { // Encryption at rest options for the domain. EncryptionAtRestOptions *types.EncryptionAtRestOptions - // Options to publish OpenSearch lots to Amazon CloudWatch Logs. + // Options to publish OpenSearch logs to Amazon CloudWatch Logs. LogPublishingOptions map[string]types.LogPublishingOption - // Node-To-Node Encryption options for the domain. + // Node-to-node encryption options for the domain. NodeToNodeEncryptionOptions *types.NodeToNodeEncryptionOptions + // Off-peak window options for the domain. + OffPeakWindowOptions *types.OffPeakWindowOptions + // Option to set the time, in UTC format, for the daily automated snapshot. Default // value is 0 hours. SnapshotOptions *types.SnapshotOptions + // Service software update options for the domain. + SoftwareUpdateOptions *types.SoftwareUpdateOptions + // Options to specify the subnets and security groups for a VPC endpoint. For more // information, see Launching your Amazon OpenSearch Service domains using a VPC // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html). diff --git a/service/opensearch/api_op_UpdateScheduledAction.go b/service/opensearch/api_op_UpdateScheduledAction.go new file mode 100644 index 00000000000..3830389d9dd --- /dev/null +++ b/service/opensearch/api_op_UpdateScheduledAction.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Reschedules a planned domain configuration change for a later time. This change +// can be a scheduled service software update +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/service-software.html) +// or a blue/green Auto-Tune enhancement +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html#auto-tune-types). +func (c *Client) UpdateScheduledAction(ctx context.Context, params *UpdateScheduledActionInput, optFns ...func(*Options)) (*UpdateScheduledActionOutput, error) { + if params == nil { + params = &UpdateScheduledActionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateScheduledAction", params, optFns, c.addOperationUpdateScheduledActionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateScheduledActionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateScheduledActionInput struct { + + // The unique identifier of the action to reschedule. To retrieve this ID, send a + // ListScheduledActions + // (https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ListScheduledActions.html) + // request. + // + // This member is required. + ActionID *string + + // The type of action to reschedule. Can be one of SERVICE_SOFTWARE_UPDATE, + // JVM_HEAP_SIZE_TUNING, or JVM_YOUNG_GEN_TUNING. To retrieve this value, send a + // ListScheduledActions + // (https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ListScheduledActions.html) + // request. + // + // This member is required. + ActionType types.ActionType + + // The name of the domain to reschedule an action for. + // + // This member is required. + DomainName *string + + // When to schedule the action. + // + // * NOW - Immediately schedules the update to happen + // in the current hour if there's capacity available. + // + // * TIMESTAMP - Lets you + // specify a custom date and time to apply the update. If you specify this value, + // you must also provide a value for DesiredStartTime. + // + // * OFF_PEAK_WINDOW - Marks + // the action to be picked up during an upcoming off-peak window. There's no + // guarantee that the change will be implemented during the next immediate window. + // Depending on capacity, it might happen in subsequent days. + // + // This member is required. + ScheduleAt types.ScheduleAt + + // The time to implement the change, in Coordinated Universal Time (UTC). Only + // specify this parameter if you set ScheduleAt to TIMESTAMP. + DesiredStartTime *int64 + + noSmithyDocumentSerde +} + +type UpdateScheduledActionOutput struct { + + // Information about the rescheduled action. + ScheduledAction *types.ScheduledAction + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateScheduledActionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateScheduledAction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateScheduledAction{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateScheduledActionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateScheduledAction(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateScheduledAction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "UpdateScheduledAction", + } +} diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go index 92c3990013f..e2e4bab0e30 100644 --- a/service/opensearch/deserializers.go +++ b/service/opensearch/deserializers.go @@ -5808,6 +5808,174 @@ func awsRestjson1_deserializeOpDocumentListPackagesForDomainOutput(v **ListPacka return nil } +type awsRestjson1_deserializeOpListScheduledActions struct { +} + +func (*awsRestjson1_deserializeOpListScheduledActions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListScheduledActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListScheduledActions(response, &metadata) + } + output := &ListScheduledActionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListScheduledActionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListScheduledActions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidPaginationTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidPaginationTokenException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListScheduledActionsOutput(v **ListScheduledActionsOutput, 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 *ListScheduledActionsOutput + if *v == nil { + sv = &ListScheduledActionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ScheduledActions": + if err := awsRestjson1_deserializeDocumentScheduledActionsList(&sv.ScheduledActions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListTags struct { } @@ -7626,14 +7794,14 @@ func awsRestjson1_deserializeOpDocumentUpdatePackageOutput(v **UpdatePackageOutp return nil } -type awsRestjson1_deserializeOpUpdateVpcEndpoint struct { +type awsRestjson1_deserializeOpUpdateScheduledAction struct { } -func (*awsRestjson1_deserializeOpUpdateVpcEndpoint) ID() string { +func (*awsRestjson1_deserializeOpUpdateScheduledAction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateScheduledAction) 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) @@ -7647,9 +7815,9 @@ func (m *awsRestjson1_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateVpcEndpoint(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateScheduledAction(response, &metadata) } - output := &UpdateVpcEndpointOutput{} + output := &UpdateScheduledActionOutput{} out.Result = output var buff [1024]byte @@ -7670,7 +7838,7 @@ func (m *awsRestjson1_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateVpcEndpointOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateScheduledActionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7683,7 +7851,7 @@ func (m *awsRestjson1_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateScheduledAction(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)} @@ -7730,15 +7898,18 @@ func awsRestjson1_deserializeOpErrorUpdateVpcEndpoint(response *smithyhttp.Respo case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("DisabledOperationException", errorCode): - return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) - case strings.EqualFold("InternalException", errorCode): return awsRestjson1_deserializeErrorInternalException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("SlotNotAvailableException", errorCode): + return awsRestjson1_deserializeErrorSlotNotAvailableException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -7752,7 +7923,7 @@ func awsRestjson1_deserializeOpErrorUpdateVpcEndpoint(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentUpdateVpcEndpointOutput(v **UpdateVpcEndpointOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateScheduledActionOutput(v **UpdateScheduledActionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7765,17 +7936,17 @@ func awsRestjson1_deserializeOpDocumentUpdateVpcEndpointOutput(v **UpdateVpcEndp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateVpcEndpointOutput + var sv *UpdateScheduledActionOutput if *v == nil { - sv = &UpdateVpcEndpointOutput{} + sv = &UpdateScheduledActionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "VpcEndpoint": - if err := awsRestjson1_deserializeDocumentVpcEndpoint(&sv.VpcEndpoint, value); err != nil { + case "ScheduledAction": + if err := awsRestjson1_deserializeDocumentScheduledAction(&sv.ScheduledAction, value); err != nil { return err } @@ -7788,14 +7959,14 @@ func awsRestjson1_deserializeOpDocumentUpdateVpcEndpointOutput(v **UpdateVpcEndp return nil } -type awsRestjson1_deserializeOpUpgradeDomain struct { +type awsRestjson1_deserializeOpUpdateVpcEndpoint struct { } -func (*awsRestjson1_deserializeOpUpgradeDomain) ID() string { +func (*awsRestjson1_deserializeOpUpdateVpcEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpgradeDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateVpcEndpoint) 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) @@ -7809,9 +7980,9 @@ func (m *awsRestjson1_deserializeOpUpgradeDomain) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpgradeDomain(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateVpcEndpoint(response, &metadata) } - output := &UpgradeDomainOutput{} + output := &UpdateVpcEndpointOutput{} out.Result = output var buff [1024]byte @@ -7832,7 +8003,7 @@ func (m *awsRestjson1_deserializeOpUpgradeDomain) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpgradeDomainOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateVpcEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7845,7 +8016,7 @@ func (m *awsRestjson1_deserializeOpUpgradeDomain) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpgradeDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateVpcEndpoint(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)} @@ -7889,15 +8060,15 @@ func awsRestjson1_deserializeOpErrorUpgradeDomain(response *smithyhttp.Response, case strings.EqualFold("BaseException", errorCode): return awsRestjson1_deserializeErrorBaseException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("DisabledOperationException", errorCode): return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) case strings.EqualFold("InternalException", errorCode): return awsRestjson1_deserializeErrorInternalException(response, errorBody) - case strings.EqualFold("ResourceAlreadyExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7914,7 +8085,7 @@ func awsRestjson1_deserializeOpErrorUpgradeDomain(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentUpgradeDomainOutput(v **UpgradeDomainOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateVpcEndpointOutput(v **UpdateVpcEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7927,61 +8098,20 @@ func awsRestjson1_deserializeOpDocumentUpgradeDomainOutput(v **UpgradeDomainOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpgradeDomainOutput + var sv *UpdateVpcEndpointOutput if *v == nil { - sv = &UpgradeDomainOutput{} + sv = &UpdateVpcEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AdvancedOptions": - if err := awsRestjson1_deserializeDocumentAdvancedOptions(&sv.AdvancedOptions, value); err != nil { - return err - } - - case "ChangeProgressDetails": - if err := awsRestjson1_deserializeDocumentChangeProgressDetails(&sv.ChangeProgressDetails, value); err != nil { + case "VpcEndpoint": + if err := awsRestjson1_deserializeDocumentVpcEndpoint(&sv.VpcEndpoint, value); err != nil { return err } - case "DomainName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) - } - sv.DomainName = ptr.String(jtv) - } - - case "PerformCheckOnly": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.PerformCheckOnly = ptr.Bool(jtv) - } - - case "TargetVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected VersionString to be of type string, got %T instead", value) - } - sv.TargetVersion = ptr.String(jtv) - } - - case "UpgradeId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UpgradeId = ptr.String(jtv) - } - default: _, _ = key, value @@ -7991,15 +8121,218 @@ func awsRestjson1_deserializeOpDocumentUpgradeDomainOutput(v **UpgradeDomainOutp return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +type awsRestjson1_deserializeOpUpgradeDomain struct { +} - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} +func (*awsRestjson1_deserializeOpUpgradeDomain) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpgradeDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpgradeDomain(response, &metadata) + } + output := &UpgradeDomainOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpgradeDomainOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpgradeDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpgradeDomainOutput(v **UpgradeDomainOutput, 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 *UpgradeDomainOutput + if *v == nil { + sv = &UpgradeDomainOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdvancedOptions": + if err := awsRestjson1_deserializeDocumentAdvancedOptions(&sv.AdvancedOptions, value); err != nil { + return err + } + + case "ChangeProgressDetails": + if err := awsRestjson1_deserializeDocumentChangeProgressDetails(&sv.ChangeProgressDetails, value); err != nil { + return err + } + + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "PerformCheckOnly": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.PerformCheckOnly = ptr.Bool(jtv) + } + + case "TargetVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionString to be of type string, got %T instead", value) + } + sv.TargetVersion = ptr.String(jtv) + } + + case "UpgradeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UpgradeId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8351,6 +8684,42 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp return output } +func awsRestjson1_deserializeErrorSlotNotAvailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SlotNotAvailableException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentSlotNotAvailableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ValidationException{} var buff [1024]byte @@ -9086,6 +9455,15 @@ func awsRestjson1_deserializeDocumentAutoTuneOptions(v **types.AutoTuneOptions, sv.RollbackOnDisable = types.RollbackOnDisable(jtv) } + case "UseOffPeakWindow": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.UseOffPeakWindow = ptr.Bool(jtv) + } + default: _, _ = key, value @@ -9135,6 +9513,15 @@ func awsRestjson1_deserializeDocumentAutoTuneOptionsOutput(v **types.AutoTuneOpt sv.State = types.AutoTuneState(jtv) } + case "UseOffPeakWindow": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.UseOffPeakWindow = ptr.Bool(jtv) + } + default: _, _ = key, value @@ -10245,11 +10632,21 @@ func awsRestjson1_deserializeDocumentDomainConfig(v **types.DomainConfig, value return err } + case "OffPeakWindowOptions": + if err := awsRestjson1_deserializeDocumentOffPeakWindowOptionsStatus(&sv.OffPeakWindowOptions, value); err != nil { + return err + } + case "SnapshotOptions": if err := awsRestjson1_deserializeDocumentSnapshotOptionsStatus(&sv.SnapshotOptions, value); err != nil { return err } + case "SoftwareUpdateOptions": + if err := awsRestjson1_deserializeDocumentSoftwareUpdateOptionsStatus(&sv.SoftwareUpdateOptions, value); err != nil { + return err + } + case "VPCOptions": if err := awsRestjson1_deserializeDocumentVPCDerivedInfoStatus(&sv.VPCOptions, value); err != nil { return err @@ -10803,6 +11200,11 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value return err } + case "OffPeakWindowOptions": + if err := awsRestjson1_deserializeDocumentOffPeakWindowOptions(&sv.OffPeakWindowOptions, value); err != nil { + return err + } + case "Processing": if value != nil { jtv, ok := value.(bool) @@ -10822,6 +11224,11 @@ func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, value return err } + case "SoftwareUpdateOptions": + if err := awsRestjson1_deserializeDocumentSoftwareUpdateOptions(&sv.SoftwareUpdateOptions, value); err != nil { + return err + } + case "UpgradeProcessing": if value != nil { jtv, ok := value.(bool) @@ -12276,6 +12683,128 @@ func awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptionsStatus(v **types return nil } +func awsRestjson1_deserializeDocumentOffPeakWindow(v **types.OffPeakWindow, 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.OffPeakWindow + if *v == nil { + sv = &types.OffPeakWindow{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "WindowStartTime": + if err := awsRestjson1_deserializeDocumentWindowStartTime(&sv.WindowStartTime, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOffPeakWindowOptions(v **types.OffPeakWindowOptions, 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.OffPeakWindowOptions + if *v == nil { + sv = &types.OffPeakWindowOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "OffPeakWindow": + if err := awsRestjson1_deserializeDocumentOffPeakWindow(&sv.OffPeakWindow, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOffPeakWindowOptionsStatus(v **types.OffPeakWindowOptionsStatus, 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.OffPeakWindowOptionsStatus + if *v == nil { + sv = &types.OffPeakWindowOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentOffPeakWindowOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentOptionStatus(v **types.OptionStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13542,6 +14071,156 @@ func awsRestjson1_deserializeDocumentSAMLOptionsOutput(v **types.SAMLOptionsOutp return nil } +func awsRestjson1_deserializeDocumentScheduledAction(v **types.ScheduledAction, 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.ScheduledAction + if *v == nil { + sv = &types.ScheduledAction{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Cancellable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Cancellable = ptr.Bool(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Mandatory": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Mandatory = ptr.Bool(jtv) + } + + case "ScheduledBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledBy to be of type string, got %T instead", value) + } + sv.ScheduledBy = types.ScheduledBy(jtv) + } + + case "ScheduledTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduledTime = ptr.Int64(i64) + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionSeverity to be of type string, got %T instead", value) + } + sv.Severity = types.ActionSeverity(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ActionStatus(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionType to be of type string, got %T instead", value) + } + sv.Type = types.ActionType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScheduledActionsList(v *[]types.ScheduledAction, 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.ScheduledAction + if *v == nil { + cv = []types.ScheduledAction{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScheduledAction + destAddr := &col + if err := awsRestjson1_deserializeDocumentScheduledAction(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentScheduledAutoTuneDetails(v **types.ScheduledAutoTuneDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13726,6 +14405,91 @@ func awsRestjson1_deserializeDocumentServiceSoftwareOptions(v **types.ServiceSof return nil } +func awsRestjson1_deserializeDocumentSlotList(v *[]int64, 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 []int64 + if *v == nil { + cv = []int64{} + } else { + cv = *v + } + + for _, value := range shape { + var col int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + col = i64 + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSlotNotAvailableException(v **types.SlotNotAvailableException, 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.SlotNotAvailableException + if *v == nil { + sv = &types.SlotNotAvailableException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "SlotSuggestions": + if err := awsRestjson1_deserializeDocumentSlotList(&sv.SlotSuggestions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSnapshotOptions(v **types.SnapshotOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13811,6 +14575,87 @@ func awsRestjson1_deserializeDocumentSnapshotOptionsStatus(v **types.SnapshotOpt return nil } +func awsRestjson1_deserializeDocumentSoftwareUpdateOptions(v **types.SoftwareUpdateOptions, 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.SoftwareUpdateOptions + if *v == nil { + sv = &types.SoftwareUpdateOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutoSoftwareUpdateEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AutoSoftwareUpdateEnabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSoftwareUpdateOptionsStatus(v **types.SoftwareUpdateOptionsStatus, 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.SoftwareUpdateOptionsStatus + if *v == nil { + sv = &types.SoftwareUpdateOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentSoftwareUpdateOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentStorageType(v **types.StorageType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14931,6 +15776,63 @@ func awsRestjson1_deserializeDocumentVpcEndpointSummaryList(v *[]types.VpcEndpoi return nil } +func awsRestjson1_deserializeDocumentWindowStartTime(v **types.WindowStartTime, 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.WindowStartTime + if *v == nil { + sv = &types.WindowStartTime{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Hours": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StartTimeHours to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Hours = i64 + } + + case "Minutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StartTimeMinutes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Minutes = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentZoneAwarenessConfig(v **types.ZoneAwarenessConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearch/generated.json b/service/opensearch/generated.json index 5c4b392046a..3b3012bebb4 100644 --- a/service/opensearch/generated.json +++ b/service/opensearch/generated.json @@ -44,6 +44,7 @@ "api_op_ListDomainsForPackage.go", "api_op_ListInstanceTypeDetails.go", "api_op_ListPackagesForDomain.go", + "api_op_ListScheduledActions.go", "api_op_ListTags.go", "api_op_ListVersions.go", "api_op_ListVpcEndpointAccess.go", @@ -56,6 +57,7 @@ "api_op_StartServiceSoftwareUpdate.go", "api_op_UpdateDomainConfig.go", "api_op_UpdatePackage.go", + "api_op_UpdateScheduledAction.go", "api_op_UpdateVpcEndpoint.go", "api_op_UpgradeDomain.go", "deserializers.go", diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go index 10f9af06a6b..cc475c96d78 100644 --- a/service/opensearch/serializers.go +++ b/service/opensearch/serializers.go @@ -509,6 +509,13 @@ func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val } } + if v.OffPeakWindowOptions != nil { + ok := object.Key("OffPeakWindowOptions") + if err := awsRestjson1_serializeDocumentOffPeakWindowOptions(v.OffPeakWindowOptions, ok); err != nil { + return err + } + } + if v.SnapshotOptions != nil { ok := object.Key("SnapshotOptions") if err := awsRestjson1_serializeDocumentSnapshotOptions(v.SnapshotOptions, ok); err != nil { @@ -516,6 +523,13 @@ func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, val } } + if v.SoftwareUpdateOptions != nil { + ok := object.Key("SoftwareUpdateOptions") + if err := awsRestjson1_serializeDocumentSoftwareUpdateOptions(v.SoftwareUpdateOptions, ok); err != nil { + return err + } + } + if v.TagList != nil { ok := object.Key("TagList") if err := awsRestjson1_serializeDocumentTagList(v.TagList, ok); err != nil { @@ -2543,6 +2557,72 @@ func awsRestjson1_serializeOpHttpBindingsListPackagesForDomainInput(v *ListPacka return nil } +type awsRestjson1_serializeOpListScheduledActions struct { +} + +func (*awsRestjson1_serializeOpListScheduledActions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListScheduledActions) 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.(*ListScheduledActionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}/scheduledActions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListScheduledActionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListScheduledActionsInput(v *ListScheduledActionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListTags struct { } @@ -3182,11 +3262,21 @@ func awsRestjson1_serializeOpDocumentStartServiceSoftwareUpdateInput(v *StartSer object := value.Object() defer object.Close() + if v.DesiredStartTime != nil { + ok := object.Key("DesiredStartTime") + ok.Long(*v.DesiredStartTime) + } + if v.DomainName != nil { ok := object.Key("DomainName") ok.String(*v.DomainName) } + if len(v.ScheduleAt) > 0 { + ok := object.Key("ScheduleAt") + ok.String(string(v.ScheduleAt)) + } + return nil } @@ -3348,6 +3438,13 @@ func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConf } } + if v.OffPeakWindowOptions != nil { + ok := object.Key("OffPeakWindowOptions") + if err := awsRestjson1_serializeDocumentOffPeakWindowOptions(v.OffPeakWindowOptions, ok); err != nil { + return err + } + } + if v.SnapshotOptions != nil { ok := object.Key("SnapshotOptions") if err := awsRestjson1_serializeDocumentSnapshotOptions(v.SnapshotOptions, ok); err != nil { @@ -3355,6 +3452,13 @@ func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConf } } + if v.SoftwareUpdateOptions != nil { + ok := object.Key("SoftwareUpdateOptions") + if err := awsRestjson1_serializeDocumentSoftwareUpdateOptions(v.SoftwareUpdateOptions, ok); err != nil { + return err + } + } + if v.VPCOptions != nil { ok := object.Key("VPCOptions") if err := awsRestjson1_serializeDocumentVPCOptions(v.VPCOptions, ok); err != nil { @@ -3450,6 +3554,102 @@ func awsRestjson1_serializeOpDocumentUpdatePackageInput(v *UpdatePackageInput, v return nil } +type awsRestjson1_serializeOpUpdateScheduledAction struct { +} + +func (*awsRestjson1_serializeOpUpdateScheduledAction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateScheduledAction) 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.(*UpdateScheduledActionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}/scheduledAction/update") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateScheduledActionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateScheduledActionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateScheduledActionInput(v *UpdateScheduledActionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateScheduledActionInput(v *UpdateScheduledActionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ActionID != nil { + ok := object.Key("ActionID") + ok.String(*v.ActionID) + } + + if len(v.ActionType) > 0 { + ok := object.Key("ActionType") + ok.String(string(v.ActionType)) + } + + if v.DesiredStartTime != nil { + ok := object.Key("DesiredStartTime") + ok.Long(*v.DesiredStartTime) + } + + if len(v.ScheduleAt) > 0 { + ok := object.Key("ScheduleAt") + ok.String(string(v.ScheduleAt)) + } + + return nil +} + type awsRestjson1_serializeOpUpdateVpcEndpoint struct { } @@ -3715,6 +3915,11 @@ func awsRestjson1_serializeDocumentAutoTuneOptions(v *types.AutoTuneOptions, val ok.String(string(v.RollbackOnDisable)) } + if v.UseOffPeakWindow != nil { + ok := object.Key("UseOffPeakWindow") + ok.Boolean(*v.UseOffPeakWindow) + } + return nil } @@ -3734,6 +3939,11 @@ func awsRestjson1_serializeDocumentAutoTuneOptionsInput(v *types.AutoTuneOptions } } + if v.UseOffPeakWindow != nil { + ok := object.Key("UseOffPeakWindow") + ok.Boolean(*v.UseOffPeakWindow) + } + return nil } @@ -4127,6 +4337,39 @@ func awsRestjson1_serializeDocumentNodeToNodeEncryptionOptions(v *types.NodeToNo return nil } +func awsRestjson1_serializeDocumentOffPeakWindow(v *types.OffPeakWindow, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WindowStartTime != nil { + ok := object.Key("WindowStartTime") + if err := awsRestjson1_serializeDocumentWindowStartTime(v.WindowStartTime, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentOffPeakWindowOptions(v *types.OffPeakWindowOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.OffPeakWindow != nil { + ok := object.Key("OffPeakWindow") + if err := awsRestjson1_serializeDocumentOffPeakWindow(v.OffPeakWindow, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentPackageSource(v *types.PackageSource, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4217,6 +4460,18 @@ func awsRestjson1_serializeDocumentSnapshotOptions(v *types.SnapshotOptions, val return nil } +func awsRestjson1_serializeDocumentSoftwareUpdateOptions(v *types.SoftwareUpdateOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutoSoftwareUpdateEnabled != nil { + ok := object.Key("AutoSoftwareUpdateEnabled") + ok.Boolean(*v.AutoSoftwareUpdateEnabled) + } + + return nil +} + func awsRestjson1_serializeDocumentStringList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4301,6 +4556,23 @@ func awsRestjson1_serializeDocumentVPCOptions(v *types.VPCOptions, value smithyj return nil } +func awsRestjson1_serializeDocumentWindowStartTime(v *types.WindowStartTime, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("Hours") + ok.Long(v.Hours) + } + + { + ok := object.Key("Minutes") + ok.Long(v.Minutes) + } + + return nil +} + func awsRestjson1_serializeDocumentZoneAwarenessConfig(v *types.ZoneAwarenessConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go index 7e4318959d4..35b8589a8d5 100644 --- a/service/opensearch/types/enums.go +++ b/service/opensearch/types/enums.go @@ -2,6 +2,72 @@ package types +type ActionSeverity string + +// Enum values for ActionSeverity +const ( + ActionSeverityHigh ActionSeverity = "HIGH" + ActionSeverityMedium ActionSeverity = "MEDIUM" + ActionSeverityLow ActionSeverity = "LOW" +) + +// Values returns all known values for ActionSeverity. 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 (ActionSeverity) Values() []ActionSeverity { + return []ActionSeverity{ + "HIGH", + "MEDIUM", + "LOW", + } +} + +type ActionStatus string + +// Enum values for ActionStatus +const ( + ActionStatusPendingUpdate ActionStatus = "PENDING_UPDATE" + ActionStatusInProgress ActionStatus = "IN_PROGRESS" + ActionStatusFailed ActionStatus = "FAILED" + ActionStatusCompleted ActionStatus = "COMPLETED" + ActionStatusNotEligible ActionStatus = "NOT_ELIGIBLE" + ActionStatusEligible ActionStatus = "ELIGIBLE" +) + +// Values returns all known values for ActionStatus. 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 (ActionStatus) Values() []ActionStatus { + return []ActionStatus{ + "PENDING_UPDATE", + "IN_PROGRESS", + "FAILED", + "COMPLETED", + "NOT_ELIGIBLE", + "ELIGIBLE", + } +} + +type ActionType string + +// Enum values for ActionType +const ( + ActionTypeServiceSoftwareUpdate ActionType = "SERVICE_SOFTWARE_UPDATE" + ActionTypeJvmHeapSizeTuning ActionType = "JVM_HEAP_SIZE_TUNING" + ActionTypeJvmYoungGenTuning ActionType = "JVM_YOUNG_GEN_TUNING" +) + +// Values returns all known values for ActionType. 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 (ActionType) Values() []ActionType { + return []ActionType{ + "SERVICE_SOFTWARE_UPDATE", + "JVM_HEAP_SIZE_TUNING", + "JVM_YOUNG_GEN_TUNING", + } +} + type AutoTuneDesiredState string // Enum values for AutoTuneDesiredState @@ -647,6 +713,26 @@ func (RollbackOnDisable) Values() []RollbackOnDisable { } } +type ScheduleAt string + +// Enum values for ScheduleAt +const ( + ScheduleAtNow ScheduleAt = "NOW" + ScheduleAtTimestamp ScheduleAt = "TIMESTAMP" + ScheduleAtOffPeakWindow ScheduleAt = "OFF_PEAK_WINDOW" +) + +// Values returns all known values for ScheduleAt. 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 (ScheduleAt) Values() []ScheduleAt { + return []ScheduleAt{ + "NOW", + "TIMESTAMP", + "OFF_PEAK_WINDOW", + } +} + type ScheduledAutoTuneActionType string // Enum values for ScheduledAutoTuneActionType @@ -686,6 +772,24 @@ func (ScheduledAutoTuneSeverityType) Values() []ScheduledAutoTuneSeverityType { } } +type ScheduledBy string + +// Enum values for ScheduledBy +const ( + ScheduledByCustomer ScheduledBy = "CUSTOMER" + ScheduledBySystem ScheduledBy = "SYSTEM" +) + +// Values returns all known values for ScheduledBy. 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 (ScheduledBy) Values() []ScheduledBy { + return []ScheduledBy{ + "CUSTOMER", + "SYSTEM", + } +} + type TimeUnit string // Enum values for TimeUnit diff --git a/service/opensearch/types/errors.go b/service/opensearch/types/errors.go index dd7868355e7..115acb3de70 100644 --- a/service/opensearch/types/errors.go +++ b/service/opensearch/types/errors.go @@ -59,7 +59,7 @@ func (e *BaseException) ErrorCode() string { } func (e *BaseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An error occurred because the client attempts to remove a resource that's +// An error occurred because the client attempts to remove a resource that is // currently in use. type ConflictException struct { Message *string @@ -86,7 +86,7 @@ func (e *ConflictException) ErrorCode() string { } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An error occured because the client wanted to access an unsupported operation. +// An error occured because the client wanted to access a not supported operation. type DisabledOperationException struct { Message *string @@ -246,7 +246,7 @@ func (e *ResourceAlreadyExistsException) ErrorCode() string { } func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An exception for accessing or deleting a resource that doesn't exist. +// An exception for accessing or deleting a resource that does not exist.. type ResourceNotFoundException struct { Message *string @@ -272,7 +272,36 @@ func (e *ResourceNotFoundException) ErrorCode() string { } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An exception for missing or invalid input fields. +// An exception for attempting to schedule a domain action during an unavailable +// time slot. +type SlotNotAvailableException struct { + Message *string + + ErrorCodeOverride *string + + SlotSuggestions []int64 + + noSmithyDocumentSerde +} + +func (e *SlotNotAvailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SlotNotAvailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SlotNotAvailableException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SlotNotAvailableException" + } + return *e.ErrorCodeOverride +} +func (e *SlotNotAvailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An exception for accessing or deleting a resource that doesn't exist. type ValidationException struct { Message *string diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go index 305ca1adaab..e6f2a911c17 100644 --- a/service/opensearch/types/types.go +++ b/service/opensearch/types/types.go @@ -199,6 +199,11 @@ type AutoTuneDetails struct { noSmithyDocumentSerde } +// This object is deprecated. Use the domain's off-peak window +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html) +// to schedule Auto-Tune optimizations. For migration instructions, see Migrating +// from Auto-Tune maintenance windows +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html#off-peak-migrate). // The Auto-Tune maintenance schedule. For more information, see Auto-Tune for // Amazon OpenSearch Service // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html). @@ -226,7 +231,10 @@ type AutoTuneOptions struct { // Whether Auto-Tune is enabled or disabled. DesiredState AutoTuneDesiredState - // A list of maintenance schedules during which Auto-Tune can deploy changes. + // DEPRECATED. Use off-peak window + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html) + // instead. A list of maintenance schedules during which Auto-Tune can deploy + // changes. MaintenanceSchedules []AutoTuneMaintenanceSchedule // When disabling Auto-Tune, specify NO_ROLLBACK to retain all prior Auto-Tune @@ -235,24 +243,32 @@ type AutoTuneOptions struct { // request. Otherwise, OpenSearch Service is unable to perform the rollback. RollbackOnDisable RollbackOnDisable + // Whether to use the domain's off-peak window + // (https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_OffPeakWindow.html) + // to deploy configuration changes on the domain rather than a maintenance + // schedule. + UseOffPeakWindow *bool + noSmithyDocumentSerde } // Options for configuring Auto-Tune. For more information, see Auto-Tune for // Amazon OpenSearch Service -// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html). +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) type AutoTuneOptionsInput struct { // Whether Auto-Tune is enabled or disabled. DesiredState AutoTuneDesiredState // A list of maintenance schedules during which Auto-Tune can deploy changes. - // Maintenance schedules are overwrite, not append. If your request includes no - // schedules, the request deletes all existing schedules. To preserve existing - // schedules, make a call to DescribeDomainConfig first and use the - // MaintenanceSchedules portion of the response as the basis for this section. + // Maintenance windows are deprecated and have been replaced with off-peak windows + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html). MaintenanceSchedules []AutoTuneMaintenanceSchedule + // Whether to schedule Auto-Tune optimizations that require blue/green deployments + // during the domain's configured daily off-peak window. + UseOffPeakWindow *bool + noSmithyDocumentSerde } @@ -266,6 +282,10 @@ type AutoTuneOptionsOutput struct { // The current state of Auto-Tune on the domain. State AutoTuneState + // Whether the domain's off-peak window will be used to deploy Auto-Tune changes + // rather than a maintenance schedule. + UseOffPeakWindow *bool + noSmithyDocumentSerde } @@ -573,7 +593,7 @@ type DomainConfig struct { // all traffic. DomainEndpointOptions *DomainEndpointOptionsStatus - // Container for EBS options configured for an OpenSearch Service domain. + // Container for EBS options configured for the domain. EBSOptions *EBSOptionsStatus // Key-value pairs to enable encryption at rest. @@ -588,10 +608,16 @@ type DomainConfig struct { // Whether node-to-node encryption is enabled or disabled. NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptionsStatus + // Container for off-peak window options for the domain. + OffPeakWindowOptions *OffPeakWindowOptionsStatus + // DEPRECATED. Container for parameters required to configure automated snapshots // of domain indexes. SnapshotOptions *SnapshotOptionsStatus + // Software update options for the domain. + SoftwareUpdateOptions *SoftwareUpdateOptionsStatus + // The current VPC options for the domain and the status of any updates to their // configuration. VPCOptions *VPCDerivedInfoStatus @@ -787,6 +813,10 @@ type DomainStatus struct { // Whether node-to-node encryption is enabled or disabled. NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions + // Options that specify a custom 10-hour window during which OpenSearch Service can + // perform configuration changes on the domain. + OffPeakWindowOptions *OffPeakWindowOptions + // The status of the domain configuration. True if OpenSearch Service is processing // configuration changes. False if the configuration is active. Processing *bool @@ -798,6 +828,9 @@ type DomainStatus struct { // of domain indexes. SnapshotOptions *SnapshotOptions + // Service software update options for the domain. + SoftwareUpdateOptions *SoftwareUpdateOptions + // The status of a domain version upgrade to a new version of OpenSearch or // Elasticsearch. True if OpenSearch Service is in the process of a version // upgrade. False if the configuration is active. @@ -1176,6 +1209,57 @@ type NodeToNodeEncryptionOptionsStatus struct { noSmithyDocumentSerde } +// A custom 10-hour, low-traffic window during which OpenSearch Service can perform +// mandatory configuration changes on the domain. These actions can include +// scheduled service software updates and blue/green Auto-Tune enhancements. +// OpenSearch Service will schedule these actions during the window that you +// specify. If you don't specify a window start time, it defaults to 10:00 P.M. +// local time. For more information, see Defining off-peak maintenance windows for +// Amazon OpenSearch Service +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/off-peak.html). +type OffPeakWindow struct { + + // A custom start time for the off-peak window, in Coordinated Universal Time + // (UTC). The window length will always be 10 hours, so you can't specify an end + // time. For example, if you specify 11:00 P.M. UTC as a start time, the end time + // will automatically be set to 9:00 A.M. + WindowStartTime *WindowStartTime + + noSmithyDocumentSerde +} + +// Options for a domain's off-peak window +// (https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_OffPeakWindow.html), +// during which OpenSearch Service can perform mandatory configuration changes on +// the domain. +type OffPeakWindowOptions struct { + + // Whether to enable an off-peak window. This option is only available when + // modifying a domain created prior to February 13, 2023, not when creating a new + // domain. All domains created after this date have the off-peak window enabled by + // default. You can't disable the off-peak window after it's enabled for a domain. + Enabled *bool + + // Off-peak window settings for the domain. + OffPeakWindow *OffPeakWindow + + noSmithyDocumentSerde +} + +// The status of off-peak window +// (https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_OffPeakWindow.html) +// options for a domain. +type OffPeakWindowOptionsStatus struct { + + // The domain's off-peak window configuration. + Options *OffPeakWindowOptions + + // The current status of off-peak window options. + Status *OptionStatus + + noSmithyDocumentSerde +} + // Provides the current status of an entity. type OptionStatus struct { @@ -1497,6 +1581,52 @@ type SAMLOptionsOutput struct { noSmithyDocumentSerde } +// Information about a scheduled configuration change for an OpenSearch Service +// domain. This actions can be a service software update +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/service-software.html) +// or a blue/green Auto-Tune enhancement +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html#auto-tune-types). +type ScheduledAction struct { + + // The unique identifier of the scheduled action. + // + // This member is required. + Id *string + + // The time when the change is scheduled to happen. + // + // This member is required. + ScheduledTime *int64 + + // The severity of the action. + // + // This member is required. + Severity ActionSeverity + + // The type of action that will be taken on the domain. + // + // This member is required. + Type ActionType + + // Whether or not the scheduled action is cancellable. + Cancellable *bool + + // A description of the action to be taken. + Description *string + + // Whether the action is required or optional. + Mandatory *bool + + // Whether the action was scheduled manually (CUSTOMER, or by OpenSearch Service + // automatically (SYSTEM). + ScheduledBy ScheduledBy + + // The current status of the scheduled action. + Status ActionStatus + + noSmithyDocumentSerde +} + // Specifies details about a scheduled Auto-Tune action. For more information, see // Auto-Tune for Amazon OpenSearch Service // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html). @@ -1582,6 +1712,28 @@ type SnapshotOptionsStatus struct { noSmithyDocumentSerde } +// Options for configuring service software updates for a domain. +type SoftwareUpdateOptions struct { + + // Whether automatic service software updates are enabled for the domain. + AutoSoftwareUpdateEnabled *bool + + noSmithyDocumentSerde +} + +// The status of the service software options for a domain. +type SoftwareUpdateOptionsStatus struct { + + // The service software update options for a domain. + Options *SoftwareUpdateOptions + + // The status of service software update options, including creation date and last + // updated date. + Status *OptionStatus + + noSmithyDocumentSerde +} + // A list of storage types for an Amazon OpenSearch Service domain that are // available for a given intance type. type StorageType struct { @@ -1864,6 +2016,24 @@ type VPCOptions struct { noSmithyDocumentSerde } +// The desired start time for an off-peak maintenance window +// (https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_OffPeakWindow.html). +type WindowStartTime struct { + + // The start hour of the window in Coordinated Universal Time (UTC), using 24-hour + // time. For example, 17 refers to 5:00 P.M. UTC. + // + // This member is required. + Hours int64 + + // The start minute of the window, in UTC. + // + // This member is required. + Minutes int64 + + noSmithyDocumentSerde +} + // The zone awareness configuration for an Amazon OpenSearch Service domain. type ZoneAwarenessConfig struct { diff --git a/service/opensearch/validators.go b/service/opensearch/validators.go index 7ac81feb9b0..4231f12870d 100644 --- a/service/opensearch/validators.go +++ b/service/opensearch/validators.go @@ -590,6 +590,26 @@ func (m *validateOpListPackagesForDomain) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpListScheduledActions struct { +} + +func (*validateOpListScheduledActions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListScheduledActions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListScheduledActionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListScheduledActionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTags struct { } @@ -790,6 +810,26 @@ func (m *validateOpUpdatePackage) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateScheduledAction struct { +} + +func (*validateOpUpdateScheduledAction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateScheduledAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateScheduledActionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateScheduledActionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateVpcEndpoint struct { } @@ -946,6 +986,10 @@ func addOpListPackagesForDomainValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpListPackagesForDomain{}, middleware.After) } +func addOpListScheduledActionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListScheduledActions{}, middleware.After) +} + func addOpListTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTags{}, middleware.After) } @@ -986,6 +1030,10 @@ func addOpUpdatePackageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdatePackage{}, middleware.After) } +func addOpUpdateScheduledActionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateScheduledAction{}, middleware.After) +} + func addOpUpdateVpcEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateVpcEndpoint{}, middleware.After) } @@ -1075,6 +1123,40 @@ func validateDomainInformationContainer(v *types.DomainInformationContainer) err } } +func validateOffPeakWindow(v *types.OffPeakWindow) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OffPeakWindow"} + if v.WindowStartTime != nil { + if err := validateWindowStartTime(v.WindowStartTime); err != nil { + invalidParams.AddNested("WindowStartTime", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOffPeakWindowOptions(v *types.OffPeakWindowOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OffPeakWindowOptions"} + if v.OffPeakWindow != nil { + if err := validateOffPeakWindow(v.OffPeakWindow); err != nil { + invalidParams.AddNested("OffPeakWindow", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSAMLIdp(v *types.SAMLIdp) error { if v == nil { return nil @@ -1145,6 +1227,18 @@ func validateTagList(v []types.Tag) error { } } +func validateWindowStartTime(v *types.WindowStartTime) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WindowStartTime"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAcceptInboundConnectionInput(v *AcceptInboundConnectionInput) error { if v == nil { return nil @@ -1256,6 +1350,11 @@ func validateOpCreateDomainInput(v *CreateDomainInput) error { invalidParams.AddNested("TagList", err.(smithy.InvalidParamsError)) } } + if v.OffPeakWindowOptions != nil { + if err := validateOffPeakWindowOptions(v.OffPeakWindowOptions); err != nil { + invalidParams.AddNested("OffPeakWindowOptions", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1637,6 +1736,21 @@ func validateOpListPackagesForDomainInput(v *ListPackagesForDomainInput) error { } } +func validateOpListScheduledActionsInput(v *ListScheduledActionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListScheduledActionsInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsInput(v *ListTagsInput) error { if v == nil { return nil @@ -1784,6 +1898,11 @@ func validateOpUpdateDomainConfigInput(v *UpdateDomainConfigInput) error { invalidParams.AddNested("AdvancedSecurityOptions", err.(smithy.InvalidParamsError)) } } + if v.OffPeakWindowOptions != nil { + if err := validateOffPeakWindowOptions(v.OffPeakWindowOptions); err != nil { + invalidParams.AddNested("OffPeakWindowOptions", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1809,6 +1928,30 @@ func validateOpUpdatePackageInput(v *UpdatePackageInput) error { } } +func validateOpUpdateScheduledActionInput(v *UpdateScheduledActionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateScheduledActionInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.ActionID == nil { + invalidParams.Add(smithy.NewErrParamRequired("ActionID")) + } + if len(v.ActionType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ActionType")) + } + if len(v.ScheduleAt) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleAt")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateVpcEndpointInput(v *UpdateVpcEndpointInput) error { if v == nil { return nil diff --git a/service/rum/api_op_BatchCreateRumMetricDefinitions.go b/service/rum/api_op_BatchCreateRumMetricDefinitions.go index 6e141600c36..7c593092dcd 100644 --- a/service/rum/api_op_BatchCreateRumMetricDefinitions.go +++ b/service/rum/api_op_BatchCreateRumMetricDefinitions.go @@ -11,26 +11,44 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Specifies the extended metrics that you want a CloudWatch RUM app monitor to -// send to a destination. Valid destinations include CloudWatch and Evidently. By -// default, RUM app monitors send some metrics to CloudWatch. These default metrics -// are listed in CloudWatch metrics that you can collect with CloudWatch RUM +// Specifies the extended metrics and custom metrics that you want a CloudWatch RUM +// app monitor to send to a destination. Valid destinations include CloudWatch and +// Evidently. By default, RUM app monitors send some metrics to CloudWatch. These +// default metrics are listed in CloudWatch metrics that you can collect with +// CloudWatch RUM // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-metrics.html). -// If you also send extended metrics, you can send metrics to Evidently as well as -// CloudWatch, and you can also optionally send the metrics with additional -// dimensions. The valid dimension names for the additional dimensions are -// BrowserName, CountryCode, DeviceType, FileType, OSName, and PageId. For more -// information, see Extended metrics that you can send to CloudWatch and -// CloudWatch Evidently +// In addition to these default metrics, you can choose to send extended metrics or +// custom metrics or both. +// +// * Extended metrics enable you to send metrics with +// additional dimensions not included in the default metrics. You can also send +// extended metrics to Evidently as well as CloudWatch. The valid dimension names +// for the additional dimensions for extended metrics are BrowserName, CountryCode, +// DeviceType, FileType, OSName, and PageId. For more information, see Extended +// metrics that you can send to CloudWatch and CloudWatch Evidently // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-vended-metrics.html). -// The maximum number of metric definitions that you can specify in one -// BatchCreateRumMetricDefinitions operation is 200. The maximum number of metric -// definitions that one destination can contain is 2000. Extended metrics sent are -// charged as CloudWatch custom metrics. Each combination of additional dimension -// name and dimension value counts as a custom metric. For more information, see -// Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). You must -// have already created a destination for the metrics before you send them. For -// more information, see PutRumMetricsDestination +// +// * +// Custom metrics are metrics that you define. You can send custom metrics to +// CloudWatch or to CloudWatch Evidently or to both. With custom metrics, you can +// use any metric name and namespace, and to derive the metrics you can use any +// custom events, built-in events, custom attributes, or default attributes. You +// can't send custom metrics to the AWS/RUM namespace. You must send custom metrics +// to a custom namespace that you define. The namespace that you use can't start +// with AWS/. CloudWatch RUM prepends RUM/CustomMetrics/ to the custom namespace +// that you define, so the final namespace for your metrics in CloudWatch is +// RUM/CustomMetrics/your-custom-namespace . +// +// The maximum number of metric +// definitions that you can specify in one BatchCreateRumMetricDefinitions +// operation is 200. The maximum number of metric definitions that one destination +// can contain is 2000. Extended metrics sent to CloudWatch and RUM custom metrics +// are charged as CloudWatch custom metrics. Each combination of additional +// dimension name and dimension value counts as a custom metric. For more +// information, see Amazon CloudWatch Pricing +// (https://aws.amazon.com/cloudwatch/pricing/). You must have already created a +// destination for the metrics before you send them. For more information, see +// PutRumMetricsDestination // (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html). // If some metric definitions specified in a BatchCreateRumMetricDefinitions // operations are not valid, those metric definitions fail and return errors, but diff --git a/service/rum/api_op_PutRumMetricsDestination.go b/service/rum/api_op_PutRumMetricsDestination.go index 2371c7c580d..36413f57372 100644 --- a/service/rum/api_op_PutRumMetricsDestination.go +++ b/service/rum/api_op_PutRumMetricsDestination.go @@ -13,8 +13,9 @@ import ( // Creates or updates a destination to receive extended metrics from CloudWatch // RUM. You can send extended metrics to CloudWatch or to a CloudWatch Evidently -// experiment. For more information about extended metrics, see AddRumMetrics -// (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_AddRumMetrics.html). +// experiment. For more information about extended metrics, see +// BatchCreateRumMetricDefinitions +// (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchCreateRumMetricDefinitions.html). func (c *Client) PutRumMetricsDestination(ctx context.Context, params *PutRumMetricsDestinationInput, optFns ...func(*Options)) (*PutRumMetricsDestinationOutput, error) { if params == nil { params = &PutRumMetricsDestinationInput{} diff --git a/service/rum/deserializers.go b/service/rum/deserializers.go index 5cf0b940581..a183e071cf8 100644 --- a/service/rum/deserializers.go +++ b/service/rum/deserializers.go @@ -3522,6 +3522,15 @@ func awsRestjson1_deserializeDocumentMetricDefinition(v **types.MetricDefinition sv.Name = ptr.String(jtv) } + case "Namespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) + } + sv.Namespace = ptr.String(jtv) + } + case "UnitLabel": if value != nil { jtv, ok := value.(string) @@ -3630,6 +3639,15 @@ func awsRestjson1_deserializeDocumentMetricDefinitionRequest(v **types.MetricDef sv.Name = ptr.String(jtv) } + case "Namespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Namespace to be of type string, got %T instead", value) + } + sv.Namespace = ptr.String(jtv) + } + case "UnitLabel": if value != nil { jtv, ok := value.(string) diff --git a/service/rum/serializers.go b/service/rum/serializers.go index 0ff1c12a6b7..70b5b681000 100644 --- a/service/rum/serializers.go +++ b/service/rum/serializers.go @@ -1505,6 +1505,11 @@ func awsRestjson1_serializeDocumentMetricDefinitionRequest(v *types.MetricDefini ok.String(*v.Name) } + if v.Namespace != nil { + ok := object.Key("Namespace") + ok.String(*v.Namespace) + } + if v.UnitLabel != nil { ok := object.Key("UnitLabel") ok.String(*v.UnitLabel) diff --git a/service/rum/types/types.go b/service/rum/types/types.go index fa5b9bb6bc6..5b6ed670cf9 100644 --- a/service/rum/types/types.go +++ b/service/rum/types/types.go @@ -264,6 +264,10 @@ type MetricDefinition struct { // specified dimensions. EventPattern *string + // If this metric definition is for a custom metric instead of an extended metric, + // this field displays the metric namespace that the custom metric is published to. + Namespace *string + // Use this field only if you are sending this metric to CloudWatch. It defines the // CloudWatch metric unit that this metric is measured in. UnitLabel *string @@ -274,17 +278,24 @@ type MetricDefinition struct { noSmithyDocumentSerde } -// Use this structure to define one extended metric that RUM will send to -// CloudWatch or CloudWatch Evidently. For more information, see Additional -// metrics that you can send to CloudWatch and CloudWatch Evidently +// Use this structure to define one extended metric or custom metric that RUM will +// send to CloudWatch or CloudWatch Evidently. For more information, see +// Additional metrics that you can send to CloudWatch and CloudWatch Evidently // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-vended-metrics.html). -// Only certain combinations of values for Name, ValueKey, and EventPattern are -// valid. In addition to what is displayed in the list below, the EventPattern can -// also include information used by the DimensionKeys field. +// This structure is validated differently for extended metrics and custom metrics. +// For extended metrics that are sent to the AWS/RUM namespace, the following +// validations apply: // -// * If Name is -// PerformanceNavigationDuration, then ValueKeymust be event_details.duration and -// the EventPattern must include +// * The Namespace parameter must be omitted or set to +// AWS/RUM. +// +// * Only certain combinations of values for Name, ValueKey, and +// EventPattern are valid. In addition to what is displayed in the list below, the +// EventPattern can also include information used by the DimensionKeys field. +// +// * If +// Name is PerformanceNavigationDuration, then ValueKeymust be +// event_details.duration and the EventPattern must include // {"event_type":["com.amazon.rum.performance_navigation_event"]} // // * If Name is @@ -333,61 +344,133 @@ type MetricDefinition struct { // * If Name is SessionCount, then // ValueKeymust be null and the EventPattern must include // {"event_type":["com.amazon.rum.session_start_event"]} +// +// For custom metrics, the +// following validation rules apply: +// +// * The namespace can't be omitted and can't be +// AWS/RUM. You can use the AWS/RUM namespace only for extended metrics. +// +// * All +// dimensions listed in the DimensionKeys field must be present in the value of +// EventPattern. +// +// * The values that you specify for ValueKey, EventPattern, and +// DimensionKeys must be fields in RUM events, so all first-level keys in these +// fields must be one of the keys in the list later in this section. +// +// * If you set +// a value for EventPattern, it must be a JSON object. +// +// * For every non-empty +// event_details, there must be a non-empty event_type. +// +// * If EventPattern contains +// an event_details field, it must also contain an event_type. For every built-in +// event_type that you use, you must use a value for event_details that corresponds +// to that event_type. For information about event details that correspond to event +// types, see RUM event details +// (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-datacollected.html#CloudWatch-RUM-datacollected-eventDetails). +// +// * +// In EventPattern, any JSON array must contain only one value. +// +// Valid key values +// for first-level keys in the ValueKey, EventPattern, and DimensionKeys fields: +// +// * +// account_id +// +// * application_Id +// +// * application_version +// +// * application_name +// +// * +// batch_id +// +// * event_details +// +// * event_id +// +// * event_interaction +// +// * event_timestamp +// +// * +// event_type +// +// * event_version +// +// * log_stream +// +// * metadata +// +// * sessionId +// +// * +// user_details +// +// * userId type MetricDefinitionRequest struct { - // The name for the metric that is defined in this structure. Valid values are the - // following: + // The name for the metric that is defined in this structure. For custom metrics, + // you can specify any name that you like. For extended metrics, valid values are + // the following: // // * PerformanceNavigationDuration // - // * PerformanceResourceDuration - // // * - // NavigationSatisfiedTransaction + // PerformanceResourceDuration // - // * NavigationToleratedTransaction + // * NavigationSatisfiedTransaction // // * - // NavigationFrustratedTransaction + // NavigationToleratedTransaction // - // * WebVitalsCumulativeLayoutShift + // * NavigationFrustratedTransaction // // * - // WebVitalsFirstInputDelay + // WebVitalsCumulativeLayoutShift + // + // * WebVitalsFirstInputDelay // - // * WebVitalsLargestContentfulPaint + // * + // WebVitalsLargestContentfulPaint // // * JsErrorCount // - // * - // HttpErrorCount + // * HttpErrorCount // - // * SessionCount + // * + // SessionCount // // This member is required. Name *string // Use this field only if you are sending the metric to CloudWatch. This field is a // map of field paths to dimension names. It defines the dimensions to associate - // with this metric in CloudWatch. Valid values for the entries in this field are - // the following: + // with this metric in CloudWatch. For extended metrics, valid values for the + // entries in this field are the following: // // * "metadata.pageId": "PageId" // - // * "metadata.browserName": - // "BrowserName" + // * + // "metadata.browserName": "BrowserName" // // * "metadata.deviceType": "DeviceType" // - // * "metadata.osName": - // "OSName" + // * + // "metadata.osName": "OSName" // // * "metadata.countryCode": "CountryCode" // - // * "event_details.fileType": - // "FileType" + // * + // "event_details.fileType": "FileType" // - // All dimensions listed in this field must also be included in + // For both extended metrics and custom + // metrics, all dimensions listed in this field must also be included in // EventPattern. DimensionKeys map[string]string @@ -415,6 +498,12 @@ type MetricDefinitionRequest struct { // is published with the specified dimensions. EventPattern *string + // If this structure is for a custom metric instead of an extended metrics, use + // this parameter to define the metric namespace for that custom metric. Do not + // specify this parameter if this structure is for an extended metric. You cannot + // use any string that starts with AWS/ for your namespace. + Namespace *string + // The CloudWatch metric unit to use for this metric. If you omit this field, the // metric is recorded with no unit. UnitLabel *string diff --git a/service/ssm/api_op_CreateAssociation.go b/service/ssm/api_op_CreateAssociation.go index 0210106fe8c..bc1dfecfc37 100644 --- a/service/ssm/api_op_CreateAssociation.go +++ b/service/ssm/api_op_CreateAssociation.go @@ -43,14 +43,14 @@ type CreateAssociationInput struct { // The name of the SSM Command document or Automation runbook that contains the // configuration information for the managed node. You can specify Amazon Web // Services-predefined documents, documents you created, or a document that is - // shared with you from another account. For Systems Manager documents (SSM - // documents) that are shared with you from other Amazon Web Services accounts, you - // must specify the complete SSM document ARN, in the following format: - // arn:partition:ssm:region:account-id:document/document-name For example: - // arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For Amazon Web - // Services-predefined documents and SSM documents you created in your account, you - // only need to specify the document name. For example, AWS-ApplyPatchBaseline or - // My-Document. + // shared with you from another Amazon Web Services account. For Systems Manager + // documents (SSM documents) that are shared with you from other Amazon Web + // Services accounts, you must specify the complete SSM document ARN, in the + // following format: arn:partition:ssm:region:account-id:document/document-name + // For example: arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document For + // Amazon Web Services-predefined documents and SSM documents you created in your + // account, you only need to specify the document name. For example, + // AWS-ApplyPatchBaseline or My-Document. // // This member is required. Name *string diff --git a/service/ssm/api_op_CreateDocument.go b/service/ssm/api_op_CreateDocument.go index 46d4962783d..684befc28b8 100644 --- a/service/ssm/api_op_CreateDocument.go +++ b/service/ssm/api_op_CreateDocument.go @@ -34,13 +34,14 @@ func (c *Client) CreateDocument(ctx context.Context, params *CreateDocumentInput type CreateDocumentInput struct { - // The content for the new SSM document in JSON or YAML format. We recommend - // storing the contents for your new document in an external JSON or YAML file and - // referencing the file in a command. For examples, see the following topics in the - // Amazon Web Services Systems Manager User Guide. + // The content for the new SSM document in JSON or YAML format. The content of the + // document must not exceed 64KB. This quota also includes the content specified + // for input parameters at runtime. We recommend storing the contents for your new + // document in an external JSON or YAML file and referencing the file in a command. + // For examples, see the following topics in the Amazon Web Services Systems + // Manager User Guide. // - // * Create an SSM document - // (Amazon Web Services API) + // * Create an SSM document (Amazon Web Services API) // (https://docs.aws.amazon.com/systems-manager/latest/userguide/create-ssm-document-api.html) // // * diff --git a/service/ssm/api_op_GetServiceSetting.go b/service/ssm/api_op_GetServiceSetting.go index 24a02d08830..0a2d208c06a 100644 --- a/service/ssm/api_op_GetServiceSetting.go +++ b/service/ssm/api_op_GetServiceSetting.go @@ -46,7 +46,10 @@ type GetServiceSettingInput struct { // The ID of the service setting to get. The setting ID can be one of the // following. // - // * /ssm/automation/customer-script-log-destination + // * /ssm/managed-instance/default-ec2-instance-management-role + // + // * + // /ssm/automation/customer-script-log-destination // // * // /ssm/automation/customer-script-log-group-name diff --git a/service/ssm/api_op_ModifyDocumentPermission.go b/service/ssm/api_op_ModifyDocumentPermission.go index 735342f6b58..e6bf5c5ce46 100644 --- a/service/ssm/api_op_ModifyDocumentPermission.go +++ b/service/ssm/api_op_ModifyDocumentPermission.go @@ -13,8 +13,8 @@ import ( // Shares a Amazon Web Services Systems Manager document (SSM document)publicly or // privately. If you share a document privately, you must specify the Amazon Web -// Services user account IDs for those people who can use the document. If you -// share a document publicly, you must specify All as the account ID. +// Services user IDs for those people who can use the document. If you share a +// document publicly, you must specify All as the account ID. func (c *Client) ModifyDocumentPermission(ctx context.Context, params *ModifyDocumentPermissionInput, optFns ...func(*Options)) (*ModifyDocumentPermissionOutput, error) { if params == nil { params = &ModifyDocumentPermissionInput{} @@ -42,15 +42,14 @@ type ModifyDocumentPermissionInput struct { // This member is required. PermissionType types.DocumentPermissionType - // The Amazon Web Services user accounts that should have access to the document. - // The account IDs can either be a group of account IDs or All. + // The Amazon Web Services users that should have access to the document. The + // account IDs can either be a group of account IDs or All. AccountIdsToAdd []string - // The Amazon Web Services user accounts that should no longer have access to the - // document. The Amazon Web Services user account can either be a group of account - // IDs or All. This action has a higher priority than AccountIdsToAdd. If you - // specify an account ID to add and the same ID to remove, the system removes - // access to the document. + // The Amazon Web Services users that should no longer have access to the document. + // The Amazon Web Services user can either be a group of account IDs or All. This + // action has a higher priority than AccountIdsToAdd. If you specify an ID to add + // and the same ID to remove, the system removes access to the document. AccountIdsToRemove []string // (Optional) The version of the document to share. If it isn't specified, the diff --git a/service/ssm/api_op_PutParameter.go b/service/ssm/api_op_PutParameter.go index c7fa36d860c..0ae5addc252 100644 --- a/service/ssm/api_op_PutParameter.go +++ b/service/ssm/api_op_PutParameter.go @@ -95,10 +95,21 @@ type PutParameterInput struct { // String parameter and specify aws:ec2:image, Amazon Web Services Systems Manager // validates the parameter value is in the required format, such as // ami-12345abcdeEXAMPLE, and that the specified AMI is available in your Amazon - // Web Services account. For more information, see Native parameter support for - // Amazon Machine Image (AMI) IDs - // (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html) - // in the Amazon Web Services Systems Manager User Guide. + // Web Services account. If the action is successful, the service sends back an + // HTTP 200 response which indicates a successful PutParameter call for all cases + // except for data type aws:ec2:image. If you call PutParameter with aws:ec2:image + // data type, a successful HTTP 200 response does not guarantee that your parameter + // was successfully created or updated. The aws:ec2:image value is validated + // asynchronously, and the PutParameter call returns before the validation is + // complete. If you submit an invalid AMI value, the PutParameter operation will + // return success, but the asynchronous validation will fail and the parameter will + // not be created or updated. To monitor whether your aws:ec2:image parameters are + // created successfully, see Setting up notifications or trigger actions based on + // Parameter Store events + // (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html). + // For more information about AMI format validation , see Native parameter support + // for Amazon Machine Image (AMI) IDs + // (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html). DataType *string // Information about the parameter that you want to add to the system. Optional but @@ -106,18 +117,13 @@ type PutParameterInput struct { Description *string // The Key Management Service (KMS) ID that you want to use to encrypt a parameter. - // Either the default KMS key automatically assigned to your Amazon Web Services - // account or a custom key. Required for parameters that use the SecureString data - // type. If you don't specify a key ID, the system uses the default key associated - // with your Amazon Web Services account. - // - // * To use your default KMS key, choose - // the SecureString data type, and do not specify the Key ID when you create the - // parameter. The system automatically populates Key ID with your default KMS - // key. + // Use a custom key for better security. Required for parameters that use the + // SecureString data type. If you don't specify a key ID, the system uses the + // default key associated with your Amazon Web Services account which is not as + // secure as using a custom key. // - // * To use a custom KMS key, choose the SecureString data type with the Key - // ID parameter. + // * To use a custom KMS key, choose the + // SecureString data type with the Key ID parameter. KeyId *string // Overwrite an existing parameter. The default value is false. diff --git a/service/ssm/api_op_UpdateAssociation.go b/service/ssm/api_op_UpdateAssociation.go index daa8c90d53a..39be8a84f87 100644 --- a/service/ssm/api_op_UpdateAssociation.go +++ b/service/ssm/api_op_UpdateAssociation.go @@ -20,15 +20,14 @@ import ( // includes the Name parameter. Before calling this API action, we recommend that // you call the DescribeAssociation API operation and make a note of all optional // parameters required for your UpdateAssociation call. In order to call this API -// operation, your Identity and Access Management (IAM) user account, group, or -// role must be configured with permission to call the DescribeAssociation API -// operation. If you don't have permission to call DescribeAssociation, then you -// receive the following error: An error occurred (AccessDeniedException) when -// calling the UpdateAssociation operation: User: isn't authorized to perform: -// ssm:DescribeAssociation on resource: When you update an association, the -// association immediately runs against the specified targets. You can add the -// ApplyOnlyAtCronInterval parameter to run the association during the next -// schedule run. +// operation, a user, group, or role must be granted permission to call the +// DescribeAssociation API operation. If you don't have permission to call +// DescribeAssociation, then you receive the following error: An error occurred +// (AccessDeniedException) when calling the UpdateAssociation operation: User: +// isn't authorized to perform: ssm:DescribeAssociation on resource: When you +// update an association, the association immediately runs against the specified +// targets. You can add the ApplyOnlyAtCronInterval parameter to run the +// association during the next schedule run. func (c *Client) UpdateAssociation(ctx context.Context, params *UpdateAssociationInput, optFns ...func(*Options)) (*UpdateAssociationOutput, error) { if params == nil { params = &UpdateAssociationInput{} diff --git a/service/ssm/api_op_UpdateServiceSetting.go b/service/ssm/api_op_UpdateServiceSetting.go index 1b42de41a4c..c40bd09a7af 100644 --- a/service/ssm/api_op_UpdateServiceSetting.go +++ b/service/ssm/api_op_UpdateServiceSetting.go @@ -46,6 +46,9 @@ type UpdateServiceSettingInput struct { // The setting ID can be one of the following. // // * + // /ssm/managed-instance/default-ec2-instance-management-role + // + // * // /ssm/automation/customer-script-log-destination // // * diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index 3f8dfbc8198..a017e367562 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -472,12 +472,12 @@ func (e *DocumentLimitExceeded) ErrorCode() string { } func (e *DocumentLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The document can't be shared with more Amazon Web Services user accounts. You -// can specify a maximum of 20 accounts per API operation to share a private -// document. By default, you can share a private document with a maximum of 1,000 -// accounts and publicly share up to five documents. If you need to increase the -// quota for privately or publicly shared Systems Manager documents, contact Amazon -// Web Services Support. +// The document can't be shared with more Amazon Web Services accounts. You can +// specify a maximum of 20 accounts per API operation to share a private document. +// By default, you can share a private document with a maximum of 1,000 accounts +// and publicly share up to five documents. If you need to increase the quota for +// privately or publicly shared Systems Manager documents, contact Amazon Web +// Services Support. type DocumentPermissionLimit struct { Message *string diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index 40dd63fa8b0..381bf52caca 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -80,9 +80,11 @@ type AlarmConfiguration struct { // This member is required. Alarms []Alarm - // If you specify true for this value, your automation or command continue to run - // even if we can't gather information about the state of your CloudWatch alarm. - // The default value is false. + // When this value is true, your automation or command continues to run in cases + // where we can’t retrieve alarm status information from CloudWatch. In cases where + // we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the + // automation or command continues to run, regardless of this value. Default is + // false. IgnorePollAlarmFailure bool noSmithyDocumentSerde @@ -1762,7 +1764,7 @@ type DocumentDescription struct { // The name of the SSM document. Name *string - // The Amazon Web Services user account that created the document. + // The Amazon Web Services user that created the document. Owner *string // A description of the parameters for a document. @@ -1858,7 +1860,7 @@ type DocumentIdentifier struct { // The name of the SSM document. Name *string - // The Amazon Web Services user account that created the document. + // The Amazon Web Services user that created the document. Owner *string // The operating system platform. @@ -1974,7 +1976,7 @@ type DocumentMetadataResponseInfo struct { noSmithyDocumentSerde } -// Parameters specified in a System Manager document that run on the server when +// Parameters specified in a Systems Manager document that run on the server when // the command is run. type DocumentParameter struct { @@ -4950,7 +4952,7 @@ type Session struct { // Reserved for future use. OutputUrl *SessionManagerOutputUrl - // The ID of the Amazon Web Services user account that started the session. + // The ID of the Amazon Web Services user that started the session. Owner *string // The reason for connecting to the instance. @@ -4993,11 +4995,11 @@ type SessionFilter struct { // Target: Specify a managed node to which session connections have been made. // // * - // Owner: Specify an Amazon Web Services user account to see a list of sessions - // started by that user. + // Owner: Specify an Amazon Web Services user to see a list of sessions started by + // that user. // - // * Status: Specify a valid session status to see a list of - // all sessions with that status. Status values you can specify include: + // * Status: Specify a valid session status to see a list of all + // sessions with that status. Status values you can specify include: // // * // Connected