@aws-sdk/client-cloudwatch 3.201.0 → 3.204.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1996,6 +1996,9 @@ const serializeAws_queryAnomalyDetectorConfiguration = (input, context) => {
1996
1996
  const entries = {};
1997
1997
  if (input.ExcludedTimeRanges != null) {
1998
1998
  const memberEntries = serializeAws_queryAnomalyDetectorExcludedTimeRanges(input.ExcludedTimeRanges, context);
1999
+ if (input.ExcludedTimeRanges?.length === 0) {
2000
+ entries.ExcludedTimeRanges = [];
2001
+ }
1999
2002
  Object.entries(memberEntries).forEach(([key, value]) => {
2000
2003
  const loc = `ExcludedTimeRanges.${key}`;
2001
2004
  entries[loc] = value;
@@ -2061,6 +2064,9 @@ const serializeAws_queryDeleteAlarmsInput = (input, context) => {
2061
2064
  const entries = {};
2062
2065
  if (input.AlarmNames != null) {
2063
2066
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2067
+ if (input.AlarmNames?.length === 0) {
2068
+ entries.AlarmNames = [];
2069
+ }
2064
2070
  Object.entries(memberEntries).forEach(([key, value]) => {
2065
2071
  const loc = `AlarmNames.${key}`;
2066
2072
  entries[loc] = value;
@@ -2078,6 +2084,9 @@ const serializeAws_queryDeleteAnomalyDetectorInput = (input, context) => {
2078
2084
  }
2079
2085
  if (input.Dimensions != null) {
2080
2086
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2087
+ if (input.Dimensions?.length === 0) {
2088
+ entries.Dimensions = [];
2089
+ }
2081
2090
  Object.entries(memberEntries).forEach(([key, value]) => {
2082
2091
  const loc = `Dimensions.${key}`;
2083
2092
  entries[loc] = value;
@@ -2106,6 +2115,9 @@ const serializeAws_queryDeleteDashboardsInput = (input, context) => {
2106
2115
  const entries = {};
2107
2116
  if (input.DashboardNames != null) {
2108
2117
  const memberEntries = serializeAws_queryDashboardNames(input.DashboardNames, context);
2118
+ if (input.DashboardNames?.length === 0) {
2119
+ entries.DashboardNames = [];
2120
+ }
2109
2121
  Object.entries(memberEntries).forEach(([key, value]) => {
2110
2122
  const loc = `DashboardNames.${key}`;
2111
2123
  entries[loc] = value;
@@ -2117,6 +2129,9 @@ const serializeAws_queryDeleteInsightRulesInput = (input, context) => {
2117
2129
  const entries = {};
2118
2130
  if (input.RuleNames != null) {
2119
2131
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2132
+ if (input.RuleNames?.length === 0) {
2133
+ entries.RuleNames = [];
2134
+ }
2120
2135
  Object.entries(memberEntries).forEach(([key, value]) => {
2121
2136
  const loc = `RuleNames.${key}`;
2122
2137
  entries[loc] = value;
@@ -2138,6 +2153,9 @@ const serializeAws_queryDescribeAlarmHistoryInput = (input, context) => {
2138
2153
  }
2139
2154
  if (input.AlarmTypes != null) {
2140
2155
  const memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2156
+ if (input.AlarmTypes?.length === 0) {
2157
+ entries.AlarmTypes = [];
2158
+ }
2141
2159
  Object.entries(memberEntries).forEach(([key, value]) => {
2142
2160
  const loc = `AlarmTypes.${key}`;
2143
2161
  entries[loc] = value;
@@ -2179,6 +2197,9 @@ const serializeAws_queryDescribeAlarmsForMetricInput = (input, context) => {
2179
2197
  }
2180
2198
  if (input.Dimensions != null) {
2181
2199
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2200
+ if (input.Dimensions?.length === 0) {
2201
+ entries.Dimensions = [];
2202
+ }
2182
2203
  Object.entries(memberEntries).forEach(([key, value]) => {
2183
2204
  const loc = `Dimensions.${key}`;
2184
2205
  entries[loc] = value;
@@ -2196,6 +2217,9 @@ const serializeAws_queryDescribeAlarmsInput = (input, context) => {
2196
2217
  const entries = {};
2197
2218
  if (input.AlarmNames != null) {
2198
2219
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2220
+ if (input.AlarmNames?.length === 0) {
2221
+ entries.AlarmNames = [];
2222
+ }
2199
2223
  Object.entries(memberEntries).forEach(([key, value]) => {
2200
2224
  const loc = `AlarmNames.${key}`;
2201
2225
  entries[loc] = value;
@@ -2206,6 +2230,9 @@ const serializeAws_queryDescribeAlarmsInput = (input, context) => {
2206
2230
  }
2207
2231
  if (input.AlarmTypes != null) {
2208
2232
  const memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2233
+ if (input.AlarmTypes?.length === 0) {
2234
+ entries.AlarmTypes = [];
2235
+ }
2209
2236
  Object.entries(memberEntries).forEach(([key, value]) => {
2210
2237
  const loc = `AlarmTypes.${key}`;
2211
2238
  entries[loc] = value;
@@ -2247,6 +2274,9 @@ const serializeAws_queryDescribeAnomalyDetectorsInput = (input, context) => {
2247
2274
  }
2248
2275
  if (input.Dimensions != null) {
2249
2276
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2277
+ if (input.Dimensions?.length === 0) {
2278
+ entries.Dimensions = [];
2279
+ }
2250
2280
  Object.entries(memberEntries).forEach(([key, value]) => {
2251
2281
  const loc = `Dimensions.${key}`;
2252
2282
  entries[loc] = value;
@@ -2254,6 +2284,9 @@ const serializeAws_queryDescribeAnomalyDetectorsInput = (input, context) => {
2254
2284
  }
2255
2285
  if (input.AnomalyDetectorTypes != null) {
2256
2286
  const memberEntries = serializeAws_queryAnomalyDetectorTypes(input.AnomalyDetectorTypes, context);
2287
+ if (input.AnomalyDetectorTypes?.length === 0) {
2288
+ entries.AnomalyDetectorTypes = [];
2289
+ }
2257
2290
  Object.entries(memberEntries).forEach(([key, value]) => {
2258
2291
  const loc = `AnomalyDetectorTypes.${key}`;
2259
2292
  entries[loc] = value;
@@ -2325,6 +2358,9 @@ const serializeAws_queryDisableAlarmActionsInput = (input, context) => {
2325
2358
  const entries = {};
2326
2359
  if (input.AlarmNames != null) {
2327
2360
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2361
+ if (input.AlarmNames?.length === 0) {
2362
+ entries.AlarmNames = [];
2363
+ }
2328
2364
  Object.entries(memberEntries).forEach(([key, value]) => {
2329
2365
  const loc = `AlarmNames.${key}`;
2330
2366
  entries[loc] = value;
@@ -2336,6 +2372,9 @@ const serializeAws_queryDisableInsightRulesInput = (input, context) => {
2336
2372
  const entries = {};
2337
2373
  if (input.RuleNames != null) {
2338
2374
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2375
+ if (input.RuleNames?.length === 0) {
2376
+ entries.RuleNames = [];
2377
+ }
2339
2378
  Object.entries(memberEntries).forEach(([key, value]) => {
2340
2379
  const loc = `RuleNames.${key}`;
2341
2380
  entries[loc] = value;
@@ -2347,6 +2386,9 @@ const serializeAws_queryEnableAlarmActionsInput = (input, context) => {
2347
2386
  const entries = {};
2348
2387
  if (input.AlarmNames != null) {
2349
2388
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2389
+ if (input.AlarmNames?.length === 0) {
2390
+ entries.AlarmNames = [];
2391
+ }
2350
2392
  Object.entries(memberEntries).forEach(([key, value]) => {
2351
2393
  const loc = `AlarmNames.${key}`;
2352
2394
  entries[loc] = value;
@@ -2358,6 +2400,9 @@ const serializeAws_queryEnableInsightRulesInput = (input, context) => {
2358
2400
  const entries = {};
2359
2401
  if (input.RuleNames != null) {
2360
2402
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2403
+ if (input.RuleNames?.length === 0) {
2404
+ entries.RuleNames = [];
2405
+ }
2361
2406
  Object.entries(memberEntries).forEach(([key, value]) => {
2362
2407
  const loc = `RuleNames.${key}`;
2363
2408
  entries[loc] = value;
@@ -2403,6 +2448,9 @@ const serializeAws_queryGetInsightRuleReportInput = (input, context) => {
2403
2448
  }
2404
2449
  if (input.Metrics != null) {
2405
2450
  const memberEntries = serializeAws_queryInsightRuleMetricList(input.Metrics, context);
2451
+ if (input.Metrics?.length === 0) {
2452
+ entries.Metrics = [];
2453
+ }
2406
2454
  Object.entries(memberEntries).forEach(([key, value]) => {
2407
2455
  const loc = `Metrics.${key}`;
2408
2456
  entries[loc] = value;
@@ -2417,6 +2465,9 @@ const serializeAws_queryGetMetricDataInput = (input, context) => {
2417
2465
  const entries = {};
2418
2466
  if (input.MetricDataQueries != null) {
2419
2467
  const memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
2468
+ if (input.MetricDataQueries?.length === 0) {
2469
+ entries.MetricDataQueries = [];
2470
+ }
2420
2471
  Object.entries(memberEntries).forEach(([key, value]) => {
2421
2472
  const loc = `MetricDataQueries.${key}`;
2422
2473
  entries[loc] = value;
@@ -2456,6 +2507,9 @@ const serializeAws_queryGetMetricStatisticsInput = (input, context) => {
2456
2507
  }
2457
2508
  if (input.Dimensions != null) {
2458
2509
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2510
+ if (input.Dimensions?.length === 0) {
2511
+ entries.Dimensions = [];
2512
+ }
2459
2513
  Object.entries(memberEntries).forEach(([key, value]) => {
2460
2514
  const loc = `Dimensions.${key}`;
2461
2515
  entries[loc] = value;
@@ -2472,6 +2526,9 @@ const serializeAws_queryGetMetricStatisticsInput = (input, context) => {
2472
2526
  }
2473
2527
  if (input.Statistics != null) {
2474
2528
  const memberEntries = serializeAws_queryStatistics(input.Statistics, context);
2529
+ if (input.Statistics?.length === 0) {
2530
+ entries.Statistics = [];
2531
+ }
2475
2532
  Object.entries(memberEntries).forEach(([key, value]) => {
2476
2533
  const loc = `Statistics.${key}`;
2477
2534
  entries[loc] = value;
@@ -2479,6 +2536,9 @@ const serializeAws_queryGetMetricStatisticsInput = (input, context) => {
2479
2536
  }
2480
2537
  if (input.ExtendedStatistics != null) {
2481
2538
  const memberEntries = serializeAws_queryExtendedStatistics(input.ExtendedStatistics, context);
2539
+ if (input.ExtendedStatistics?.length === 0) {
2540
+ entries.ExtendedStatistics = [];
2541
+ }
2482
2542
  Object.entries(memberEntries).forEach(([key, value]) => {
2483
2543
  const loc = `ExtendedStatistics.${key}`;
2484
2544
  entries[loc] = value;
@@ -2570,6 +2630,9 @@ const serializeAws_queryListMetricsInput = (input, context) => {
2570
2630
  }
2571
2631
  if (input.Dimensions != null) {
2572
2632
  const memberEntries = serializeAws_queryDimensionFilters(input.Dimensions, context);
2633
+ if (input.Dimensions?.length === 0) {
2634
+ entries.Dimensions = [];
2635
+ }
2573
2636
  Object.entries(memberEntries).forEach(([key, value]) => {
2574
2637
  const loc = `Dimensions.${key}`;
2575
2638
  entries[loc] = value;
@@ -2610,6 +2673,9 @@ const serializeAws_queryManagedRule = (input, context) => {
2610
2673
  }
2611
2674
  if (input.Tags != null) {
2612
2675
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
2676
+ if (input.Tags?.length === 0) {
2677
+ entries.Tags = [];
2678
+ }
2613
2679
  Object.entries(memberEntries).forEach(([key, value]) => {
2614
2680
  const loc = `Tags.${key}`;
2615
2681
  entries[loc] = value;
@@ -2642,6 +2708,9 @@ const serializeAws_queryMetric = (input, context) => {
2642
2708
  }
2643
2709
  if (input.Dimensions != null) {
2644
2710
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2711
+ if (input.Dimensions?.length === 0) {
2712
+ entries.Dimensions = [];
2713
+ }
2645
2714
  Object.entries(memberEntries).forEach(([key, value]) => {
2646
2715
  const loc = `Dimensions.${key}`;
2647
2716
  entries[loc] = value;
@@ -2715,6 +2784,9 @@ const serializeAws_queryMetricDatum = (input, context) => {
2715
2784
  }
2716
2785
  if (input.Dimensions != null) {
2717
2786
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2787
+ if (input.Dimensions?.length === 0) {
2788
+ entries.Dimensions = [];
2789
+ }
2718
2790
  Object.entries(memberEntries).forEach(([key, value]) => {
2719
2791
  const loc = `Dimensions.${key}`;
2720
2792
  entries[loc] = value;
@@ -2735,6 +2807,9 @@ const serializeAws_queryMetricDatum = (input, context) => {
2735
2807
  }
2736
2808
  if (input.Values != null) {
2737
2809
  const memberEntries = serializeAws_queryValues(input.Values, context);
2810
+ if (input.Values?.length === 0) {
2811
+ entries.Values = [];
2812
+ }
2738
2813
  Object.entries(memberEntries).forEach(([key, value]) => {
2739
2814
  const loc = `Values.${key}`;
2740
2815
  entries[loc] = value;
@@ -2742,6 +2817,9 @@ const serializeAws_queryMetricDatum = (input, context) => {
2742
2817
  }
2743
2818
  if (input.Counts != null) {
2744
2819
  const memberEntries = serializeAws_queryCounts(input.Counts, context);
2820
+ if (input.Counts?.length === 0) {
2821
+ entries.Counts = [];
2822
+ }
2745
2823
  Object.entries(memberEntries).forEach(([key, value]) => {
2746
2824
  const loc = `Counts.${key}`;
2747
2825
  entries[loc] = value;
@@ -2759,6 +2837,9 @@ const serializeAws_queryMetricMathAnomalyDetector = (input, context) => {
2759
2837
  const entries = {};
2760
2838
  if (input.MetricDataQueries != null) {
2761
2839
  const memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
2840
+ if (input.MetricDataQueries?.length === 0) {
2841
+ entries.MetricDataQueries = [];
2842
+ }
2762
2843
  Object.entries(memberEntries).forEach(([key, value]) => {
2763
2844
  const loc = `MetricDataQueries.${key}`;
2764
2845
  entries[loc] = value;
@@ -2836,6 +2917,9 @@ const serializeAws_queryMetricStreamStatisticsConfiguration = (input, context) =
2836
2917
  const entries = {};
2837
2918
  if (input.IncludeMetrics != null) {
2838
2919
  const memberEntries = serializeAws_queryMetricStreamStatisticsIncludeMetrics(input.IncludeMetrics, context);
2920
+ if (input.IncludeMetrics?.length === 0) {
2921
+ entries.IncludeMetrics = [];
2922
+ }
2839
2923
  Object.entries(memberEntries).forEach(([key, value]) => {
2840
2924
  const loc = `IncludeMetrics.${key}`;
2841
2925
  entries[loc] = value;
@@ -2843,6 +2927,9 @@ const serializeAws_queryMetricStreamStatisticsConfiguration = (input, context) =
2843
2927
  }
2844
2928
  if (input.AdditionalStatistics != null) {
2845
2929
  const memberEntries = serializeAws_queryMetricStreamStatisticsAdditionalStatistics(input.AdditionalStatistics, context);
2930
+ if (input.AdditionalStatistics?.length === 0) {
2931
+ entries.AdditionalStatistics = [];
2932
+ }
2846
2933
  Object.entries(memberEntries).forEach(([key, value]) => {
2847
2934
  const loc = `AdditionalStatistics.${key}`;
2848
2935
  entries[loc] = value;
@@ -2900,6 +2987,9 @@ const serializeAws_queryPutAnomalyDetectorInput = (input, context) => {
2900
2987
  }
2901
2988
  if (input.Dimensions != null) {
2902
2989
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2990
+ if (input.Dimensions?.length === 0) {
2991
+ entries.Dimensions = [];
2992
+ }
2903
2993
  Object.entries(memberEntries).forEach(([key, value]) => {
2904
2994
  const loc = `Dimensions.${key}`;
2905
2995
  entries[loc] = value;
@@ -2938,6 +3028,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
2938
3028
  }
2939
3029
  if (input.AlarmActions != null) {
2940
3030
  const memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
3031
+ if (input.AlarmActions?.length === 0) {
3032
+ entries.AlarmActions = [];
3033
+ }
2941
3034
  Object.entries(memberEntries).forEach(([key, value]) => {
2942
3035
  const loc = `AlarmActions.${key}`;
2943
3036
  entries[loc] = value;
@@ -2954,6 +3047,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
2954
3047
  }
2955
3048
  if (input.InsufficientDataActions != null) {
2956
3049
  const memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3050
+ if (input.InsufficientDataActions?.length === 0) {
3051
+ entries.InsufficientDataActions = [];
3052
+ }
2957
3053
  Object.entries(memberEntries).forEach(([key, value]) => {
2958
3054
  const loc = `InsufficientDataActions.${key}`;
2959
3055
  entries[loc] = value;
@@ -2961,6 +3057,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
2961
3057
  }
2962
3058
  if (input.OKActions != null) {
2963
3059
  const memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3060
+ if (input.OKActions?.length === 0) {
3061
+ entries.OKActions = [];
3062
+ }
2964
3063
  Object.entries(memberEntries).forEach(([key, value]) => {
2965
3064
  const loc = `OKActions.${key}`;
2966
3065
  entries[loc] = value;
@@ -2968,6 +3067,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
2968
3067
  }
2969
3068
  if (input.Tags != null) {
2970
3069
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3070
+ if (input.Tags?.length === 0) {
3071
+ entries.Tags = [];
3072
+ }
2971
3073
  Object.entries(memberEntries).forEach(([key, value]) => {
2972
3074
  const loc = `Tags.${key}`;
2973
3075
  entries[loc] = value;
@@ -3007,6 +3109,9 @@ const serializeAws_queryPutInsightRuleInput = (input, context) => {
3007
3109
  }
3008
3110
  if (input.Tags != null) {
3009
3111
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3112
+ if (input.Tags?.length === 0) {
3113
+ entries.Tags = [];
3114
+ }
3010
3115
  Object.entries(memberEntries).forEach(([key, value]) => {
3011
3116
  const loc = `Tags.${key}`;
3012
3117
  entries[loc] = value;
@@ -3018,6 +3123,9 @@ const serializeAws_queryPutManagedInsightRulesInput = (input, context) => {
3018
3123
  const entries = {};
3019
3124
  if (input.ManagedRules != null) {
3020
3125
  const memberEntries = serializeAws_queryManagedRules(input.ManagedRules, context);
3126
+ if (input.ManagedRules?.length === 0) {
3127
+ entries.ManagedRules = [];
3128
+ }
3021
3129
  Object.entries(memberEntries).forEach(([key, value]) => {
3022
3130
  const loc = `ManagedRules.${key}`;
3023
3131
  entries[loc] = value;
@@ -3038,6 +3146,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3038
3146
  }
3039
3147
  if (input.OKActions != null) {
3040
3148
  const memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3149
+ if (input.OKActions?.length === 0) {
3150
+ entries.OKActions = [];
3151
+ }
3041
3152
  Object.entries(memberEntries).forEach(([key, value]) => {
3042
3153
  const loc = `OKActions.${key}`;
3043
3154
  entries[loc] = value;
@@ -3045,6 +3156,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3045
3156
  }
3046
3157
  if (input.AlarmActions != null) {
3047
3158
  const memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
3159
+ if (input.AlarmActions?.length === 0) {
3160
+ entries.AlarmActions = [];
3161
+ }
3048
3162
  Object.entries(memberEntries).forEach(([key, value]) => {
3049
3163
  const loc = `AlarmActions.${key}`;
3050
3164
  entries[loc] = value;
@@ -3052,6 +3166,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3052
3166
  }
3053
3167
  if (input.InsufficientDataActions != null) {
3054
3168
  const memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3169
+ if (input.InsufficientDataActions?.length === 0) {
3170
+ entries.InsufficientDataActions = [];
3171
+ }
3055
3172
  Object.entries(memberEntries).forEach(([key, value]) => {
3056
3173
  const loc = `InsufficientDataActions.${key}`;
3057
3174
  entries[loc] = value;
@@ -3071,6 +3188,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3071
3188
  }
3072
3189
  if (input.Dimensions != null) {
3073
3190
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3191
+ if (input.Dimensions?.length === 0) {
3192
+ entries.Dimensions = [];
3193
+ }
3074
3194
  Object.entries(memberEntries).forEach(([key, value]) => {
3075
3195
  const loc = `Dimensions.${key}`;
3076
3196
  entries[loc] = value;
@@ -3102,6 +3222,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3102
3222
  }
3103
3223
  if (input.Metrics != null) {
3104
3224
  const memberEntries = serializeAws_queryMetricDataQueries(input.Metrics, context);
3225
+ if (input.Metrics?.length === 0) {
3226
+ entries.Metrics = [];
3227
+ }
3105
3228
  Object.entries(memberEntries).forEach(([key, value]) => {
3106
3229
  const loc = `Metrics.${key}`;
3107
3230
  entries[loc] = value;
@@ -3109,6 +3232,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3109
3232
  }
3110
3233
  if (input.Tags != null) {
3111
3234
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3235
+ if (input.Tags?.length === 0) {
3236
+ entries.Tags = [];
3237
+ }
3112
3238
  Object.entries(memberEntries).forEach(([key, value]) => {
3113
3239
  const loc = `Tags.${key}`;
3114
3240
  entries[loc] = value;
@@ -3126,6 +3252,9 @@ const serializeAws_queryPutMetricDataInput = (input, context) => {
3126
3252
  }
3127
3253
  if (input.MetricData != null) {
3128
3254
  const memberEntries = serializeAws_queryMetricData(input.MetricData, context);
3255
+ if (input.MetricData?.length === 0) {
3256
+ entries.MetricData = [];
3257
+ }
3129
3258
  Object.entries(memberEntries).forEach(([key, value]) => {
3130
3259
  const loc = `MetricData.${key}`;
3131
3260
  entries[loc] = value;
@@ -3140,6 +3269,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3140
3269
  }
3141
3270
  if (input.IncludeFilters != null) {
3142
3271
  const memberEntries = serializeAws_queryMetricStreamFilters(input.IncludeFilters, context);
3272
+ if (input.IncludeFilters?.length === 0) {
3273
+ entries.IncludeFilters = [];
3274
+ }
3143
3275
  Object.entries(memberEntries).forEach(([key, value]) => {
3144
3276
  const loc = `IncludeFilters.${key}`;
3145
3277
  entries[loc] = value;
@@ -3147,6 +3279,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3147
3279
  }
3148
3280
  if (input.ExcludeFilters != null) {
3149
3281
  const memberEntries = serializeAws_queryMetricStreamFilters(input.ExcludeFilters, context);
3282
+ if (input.ExcludeFilters?.length === 0) {
3283
+ entries.ExcludeFilters = [];
3284
+ }
3150
3285
  Object.entries(memberEntries).forEach(([key, value]) => {
3151
3286
  const loc = `ExcludeFilters.${key}`;
3152
3287
  entries[loc] = value;
@@ -3163,6 +3298,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3163
3298
  }
3164
3299
  if (input.Tags != null) {
3165
3300
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3301
+ if (input.Tags?.length === 0) {
3302
+ entries.Tags = [];
3303
+ }
3166
3304
  Object.entries(memberEntries).forEach(([key, value]) => {
3167
3305
  const loc = `Tags.${key}`;
3168
3306
  entries[loc] = value;
@@ -3170,6 +3308,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3170
3308
  }
3171
3309
  if (input.StatisticsConfigurations != null) {
3172
3310
  const memberEntries = serializeAws_queryMetricStreamStatisticsConfigurations(input.StatisticsConfigurations, context);
3311
+ if (input.StatisticsConfigurations?.length === 0) {
3312
+ entries.StatisticsConfigurations = [];
3313
+ }
3173
3314
  Object.entries(memberEntries).forEach(([key, value]) => {
3174
3315
  const loc = `StatisticsConfigurations.${key}`;
3175
3316
  entries[loc] = value;
@@ -3225,6 +3366,9 @@ const serializeAws_querySingleMetricAnomalyDetector = (input, context) => {
3225
3366
  }
3226
3367
  if (input.Dimensions != null) {
3227
3368
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3369
+ if (input.Dimensions?.length === 0) {
3370
+ entries.Dimensions = [];
3371
+ }
3228
3372
  Object.entries(memberEntries).forEach(([key, value]) => {
3229
3373
  const loc = `Dimensions.${key}`;
3230
3374
  entries[loc] = value;
@@ -3239,6 +3383,9 @@ const serializeAws_queryStartMetricStreamsInput = (input, context) => {
3239
3383
  const entries = {};
3240
3384
  if (input.Names != null) {
3241
3385
  const memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
3386
+ if (input.Names?.length === 0) {
3387
+ entries.Names = [];
3388
+ }
3242
3389
  Object.entries(memberEntries).forEach(([key, value]) => {
3243
3390
  const loc = `Names.${key}`;
3244
3391
  entries[loc] = value;
@@ -3278,6 +3425,9 @@ const serializeAws_queryStopMetricStreamsInput = (input, context) => {
3278
3425
  const entries = {};
3279
3426
  if (input.Names != null) {
3280
3427
  const memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
3428
+ if (input.Names?.length === 0) {
3429
+ entries.Names = [];
3430
+ }
3281
3431
  Object.entries(memberEntries).forEach(([key, value]) => {
3282
3432
  const loc = `Names.${key}`;
3283
3433
  entries[loc] = value;
@@ -3329,6 +3479,9 @@ const serializeAws_queryTagResourceInput = (input, context) => {
3329
3479
  }
3330
3480
  if (input.Tags != null) {
3331
3481
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3482
+ if (input.Tags?.length === 0) {
3483
+ entries.Tags = [];
3484
+ }
3332
3485
  Object.entries(memberEntries).forEach(([key, value]) => {
3333
3486
  const loc = `Tags.${key}`;
3334
3487
  entries[loc] = value;
@@ -3343,6 +3496,9 @@ const serializeAws_queryUntagResourceInput = (input, context) => {
3343
3496
  }
3344
3497
  if (input.TagKeys != null) {
3345
3498
  const memberEntries = serializeAws_queryTagKeyList(input.TagKeys, context);
3499
+ if (input.TagKeys?.length === 0) {
3500
+ entries.TagKeys = [];
3501
+ }
3346
3502
  Object.entries(memberEntries).forEach(([key, value]) => {
3347
3503
  const loc = `TagKeys.${key}`;
3348
3504
  entries[loc] = value;
@@ -4,7 +4,6 @@ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-
4
4
  import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
5
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
6
6
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
7
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
8
7
  import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
9
8
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
10
9
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
@@ -20,8 +19,6 @@ export const getRuntimeConfig = (config) => {
20
19
  ...config,
21
20
  runtime: "browser",
22
21
  defaultsMode,
23
- base64Decoder: config?.base64Decoder ?? fromBase64,
24
- base64Encoder: config?.base64Encoder ?? toBase64,
25
22
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
26
23
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
24
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -6,7 +6,6 @@ import { Hash } from "@aws-sdk/hash-node";
6
6
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
7
7
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
8
8
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
10
9
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
11
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
12
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
@@ -24,8 +23,6 @@ export const getRuntimeConfig = (config) => {
24
23
  ...config,
25
24
  runtime: "node",
26
25
  defaultsMode,
27
- base64Decoder: config?.base64Decoder ?? fromBase64,
28
- base64Encoder: config?.base64Encoder ?? toBase64,
29
26
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
27
  credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
31
28
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -1,7 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
+ import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
2
3
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
3
4
  export const getRuntimeConfig = (config) => ({
4
5
  apiVersion: "2010-08-01",
6
+ base64Decoder: config?.base64Decoder ?? fromBase64,
7
+ base64Encoder: config?.base64Encoder ?? toBase64,
5
8
  disableHostPrefix: config?.disableHostPrefix ?? false,
6
9
  endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
7
10
  logger: config?.logger ?? {},
@@ -6,8 +6,6 @@ import { CloudWatchClientConfig } from "./CloudWatchClient";
6
6
  export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
7
7
  runtime: string;
8
8
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
9
- base64Decoder: import("@aws-sdk/types").Decoder;
10
- base64Encoder: import("@aws-sdk/types").Encoder;
11
9
  bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
10
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
13
11
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
@@ -23,6 +21,8 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
23
21
  utf8Encoder: import("@aws-sdk/types").Encoder;
24
22
  apiVersion: string;
25
23
  urlParser: import("@aws-sdk/types").UrlParser;
24
+ base64Decoder: import("@aws-sdk/types").Decoder;
25
+ base64Encoder: import("@aws-sdk/types").Encoder;
26
26
  disableHostPrefix: boolean;
27
27
  logger: import("@aws-sdk/types").Logger;
28
28
  serviceId: string;
@@ -6,8 +6,6 @@ import { CloudWatchClientConfig } from "./CloudWatchClient";
6
6
  export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
7
7
  runtime: string;
8
8
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
9
- base64Decoder: import("@aws-sdk/types").Decoder;
10
- base64Encoder: import("@aws-sdk/types").Encoder;
11
9
  bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
10
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
13
11
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
@@ -23,6 +21,8 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
23
21
  utf8Encoder: import("@aws-sdk/types").Encoder;
24
22
  apiVersion: string;
25
23
  urlParser: import("@aws-sdk/types").UrlParser;
24
+ base64Decoder: import("@aws-sdk/types").Decoder;
25
+ base64Encoder: import("@aws-sdk/types").Encoder;
26
26
  disableHostPrefix: boolean;
27
27
  logger: import("@aws-sdk/types").Logger;
28
28
  serviceId: string;
@@ -5,6 +5,8 @@ import { CloudWatchClientConfig } from "./CloudWatchClient";
5
5
  */
6
6
  export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
7
7
  apiVersion: string;
8
+ base64Decoder: import("@aws-sdk/types").Decoder;
9
+ base64Encoder: import("@aws-sdk/types").Encoder;
8
10
  disableHostPrefix: boolean;
9
11
  endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
10
12
  logger?: __Logger | undefined;
@@ -5,8 +5,6 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
5
5
  defaultsMode: import("@aws-sdk/types").Provider<
6
6
  import("@aws-sdk/smithy-client").ResolvedDefaultsMode
7
7
  >;
8
- base64Decoder: import("@aws-sdk/types").Decoder;
9
- base64Encoder: import("@aws-sdk/types").Encoder;
10
8
  bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
11
9
  credentialDefaultProvider: (
12
10
  input: any
@@ -33,6 +31,8 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
33
31
  utf8Encoder: import("@aws-sdk/types").Encoder;
34
32
  apiVersion: string;
35
33
  urlParser: import("@aws-sdk/types").UrlParser;
34
+ base64Decoder: import("@aws-sdk/types").Decoder;
35
+ base64Encoder: import("@aws-sdk/types").Encoder;
36
36
  disableHostPrefix: boolean;
37
37
  logger: import("@aws-sdk/types").Logger;
38
38
  serviceId: string;
@@ -5,8 +5,6 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
5
5
  defaultsMode: import("@aws-sdk/types").Provider<
6
6
  import("@aws-sdk/smithy-client").ResolvedDefaultsMode
7
7
  >;
8
- base64Decoder: import("@aws-sdk/types").Decoder;
9
- base64Encoder: import("@aws-sdk/types").Encoder;
10
8
  bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
11
9
  credentialDefaultProvider: (
12
10
  input: any
@@ -33,6 +31,8 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
33
31
  utf8Encoder: import("@aws-sdk/types").Encoder;
34
32
  apiVersion: string;
35
33
  urlParser: import("@aws-sdk/types").UrlParser;
34
+ base64Decoder: import("@aws-sdk/types").Decoder;
35
+ base64Encoder: import("@aws-sdk/types").Encoder;
36
36
  disableHostPrefix: boolean;
37
37
  logger: import("@aws-sdk/types").Logger;
38
38
  serviceId: string;
@@ -2,6 +2,8 @@ import { Logger as __Logger } from "@aws-sdk/types";
2
2
  import { CloudWatchClientConfig } from "./CloudWatchClient";
3
3
  export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
4
4
  apiVersion: string;
5
+ base64Decoder: import("@aws-sdk/types").Decoder;
6
+ base64Encoder: import("@aws-sdk/types").Encoder;
5
7
  disableHostPrefix: boolean;
6
8
  endpointProvider: (
7
9
  endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,