@aws-sdk/client-cloudwatch 3.200.0 → 3.202.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.202.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.201.0...v3.202.0) (2022-11-02)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **codegen:** aws-query protocol, distinguish explicit empty list ([#4003](https://github.com/aws/aws-sdk-js-v3/issues/4003)) ([8e10769](https://github.com/aws/aws-sdk-js-v3/commit/8e10769b6146f93c0674686fa547290292714917))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.201.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.200.0...v3.201.0) (2022-11-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * end support for Node.js 12.x ([#4123](https://github.com/aws/aws-sdk-js-v3/issues/4123)) ([83f913e](https://github.com/aws/aws-sdk-js-v3/commit/83f913ec2ac3878d8726c6964f585550dc5caf3e))
23
+
24
+
25
+
26
+
27
+
6
28
  # [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
7
29
 
8
30
  **Note:** Version bump only for package @aws-sdk/client-cloudwatch
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveClientEndpointParameters = void 0;
4
4
  const resolveClientEndpointParameters = (options) => {
5
- var _a, _b;
6
5
  return {
7
6
  ...options,
8
- useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false,
9
- useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false,
7
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
10
9
  defaultSigningName: "monitoring",
11
10
  };
12
11
  };
@@ -2076,6 +2076,9 @@ const serializeAws_queryAnomalyDetectorConfiguration = (input, context) => {
2076
2076
  const entries = {};
2077
2077
  if (input.ExcludedTimeRanges != null) {
2078
2078
  const memberEntries = serializeAws_queryAnomalyDetectorExcludedTimeRanges(input.ExcludedTimeRanges, context);
2079
+ if (input.ExcludedTimeRanges?.length === 0) {
2080
+ entries.ExcludedTimeRanges = [];
2081
+ }
2079
2082
  Object.entries(memberEntries).forEach(([key, value]) => {
2080
2083
  const loc = `ExcludedTimeRanges.${key}`;
2081
2084
  entries[loc] = value;
@@ -2141,6 +2144,9 @@ const serializeAws_queryDeleteAlarmsInput = (input, context) => {
2141
2144
  const entries = {};
2142
2145
  if (input.AlarmNames != null) {
2143
2146
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2147
+ if (input.AlarmNames?.length === 0) {
2148
+ entries.AlarmNames = [];
2149
+ }
2144
2150
  Object.entries(memberEntries).forEach(([key, value]) => {
2145
2151
  const loc = `AlarmNames.${key}`;
2146
2152
  entries[loc] = value;
@@ -2158,6 +2164,9 @@ const serializeAws_queryDeleteAnomalyDetectorInput = (input, context) => {
2158
2164
  }
2159
2165
  if (input.Dimensions != null) {
2160
2166
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2167
+ if (input.Dimensions?.length === 0) {
2168
+ entries.Dimensions = [];
2169
+ }
2161
2170
  Object.entries(memberEntries).forEach(([key, value]) => {
2162
2171
  const loc = `Dimensions.${key}`;
2163
2172
  entries[loc] = value;
@@ -2186,6 +2195,9 @@ const serializeAws_queryDeleteDashboardsInput = (input, context) => {
2186
2195
  const entries = {};
2187
2196
  if (input.DashboardNames != null) {
2188
2197
  const memberEntries = serializeAws_queryDashboardNames(input.DashboardNames, context);
2198
+ if (input.DashboardNames?.length === 0) {
2199
+ entries.DashboardNames = [];
2200
+ }
2189
2201
  Object.entries(memberEntries).forEach(([key, value]) => {
2190
2202
  const loc = `DashboardNames.${key}`;
2191
2203
  entries[loc] = value;
@@ -2197,6 +2209,9 @@ const serializeAws_queryDeleteInsightRulesInput = (input, context) => {
2197
2209
  const entries = {};
2198
2210
  if (input.RuleNames != null) {
2199
2211
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2212
+ if (input.RuleNames?.length === 0) {
2213
+ entries.RuleNames = [];
2214
+ }
2200
2215
  Object.entries(memberEntries).forEach(([key, value]) => {
2201
2216
  const loc = `RuleNames.${key}`;
2202
2217
  entries[loc] = value;
@@ -2218,6 +2233,9 @@ const serializeAws_queryDescribeAlarmHistoryInput = (input, context) => {
2218
2233
  }
2219
2234
  if (input.AlarmTypes != null) {
2220
2235
  const memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2236
+ if (input.AlarmTypes?.length === 0) {
2237
+ entries.AlarmTypes = [];
2238
+ }
2221
2239
  Object.entries(memberEntries).forEach(([key, value]) => {
2222
2240
  const loc = `AlarmTypes.${key}`;
2223
2241
  entries[loc] = value;
@@ -2259,6 +2277,9 @@ const serializeAws_queryDescribeAlarmsForMetricInput = (input, context) => {
2259
2277
  }
2260
2278
  if (input.Dimensions != null) {
2261
2279
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2280
+ if (input.Dimensions?.length === 0) {
2281
+ entries.Dimensions = [];
2282
+ }
2262
2283
  Object.entries(memberEntries).forEach(([key, value]) => {
2263
2284
  const loc = `Dimensions.${key}`;
2264
2285
  entries[loc] = value;
@@ -2276,6 +2297,9 @@ const serializeAws_queryDescribeAlarmsInput = (input, context) => {
2276
2297
  const entries = {};
2277
2298
  if (input.AlarmNames != null) {
2278
2299
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2300
+ if (input.AlarmNames?.length === 0) {
2301
+ entries.AlarmNames = [];
2302
+ }
2279
2303
  Object.entries(memberEntries).forEach(([key, value]) => {
2280
2304
  const loc = `AlarmNames.${key}`;
2281
2305
  entries[loc] = value;
@@ -2286,6 +2310,9 @@ const serializeAws_queryDescribeAlarmsInput = (input, context) => {
2286
2310
  }
2287
2311
  if (input.AlarmTypes != null) {
2288
2312
  const memberEntries = serializeAws_queryAlarmTypes(input.AlarmTypes, context);
2313
+ if (input.AlarmTypes?.length === 0) {
2314
+ entries.AlarmTypes = [];
2315
+ }
2289
2316
  Object.entries(memberEntries).forEach(([key, value]) => {
2290
2317
  const loc = `AlarmTypes.${key}`;
2291
2318
  entries[loc] = value;
@@ -2327,6 +2354,9 @@ const serializeAws_queryDescribeAnomalyDetectorsInput = (input, context) => {
2327
2354
  }
2328
2355
  if (input.Dimensions != null) {
2329
2356
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2357
+ if (input.Dimensions?.length === 0) {
2358
+ entries.Dimensions = [];
2359
+ }
2330
2360
  Object.entries(memberEntries).forEach(([key, value]) => {
2331
2361
  const loc = `Dimensions.${key}`;
2332
2362
  entries[loc] = value;
@@ -2334,6 +2364,9 @@ const serializeAws_queryDescribeAnomalyDetectorsInput = (input, context) => {
2334
2364
  }
2335
2365
  if (input.AnomalyDetectorTypes != null) {
2336
2366
  const memberEntries = serializeAws_queryAnomalyDetectorTypes(input.AnomalyDetectorTypes, context);
2367
+ if (input.AnomalyDetectorTypes?.length === 0) {
2368
+ entries.AnomalyDetectorTypes = [];
2369
+ }
2337
2370
  Object.entries(memberEntries).forEach(([key, value]) => {
2338
2371
  const loc = `AnomalyDetectorTypes.${key}`;
2339
2372
  entries[loc] = value;
@@ -2405,6 +2438,9 @@ const serializeAws_queryDisableAlarmActionsInput = (input, context) => {
2405
2438
  const entries = {};
2406
2439
  if (input.AlarmNames != null) {
2407
2440
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2441
+ if (input.AlarmNames?.length === 0) {
2442
+ entries.AlarmNames = [];
2443
+ }
2408
2444
  Object.entries(memberEntries).forEach(([key, value]) => {
2409
2445
  const loc = `AlarmNames.${key}`;
2410
2446
  entries[loc] = value;
@@ -2416,6 +2452,9 @@ const serializeAws_queryDisableInsightRulesInput = (input, context) => {
2416
2452
  const entries = {};
2417
2453
  if (input.RuleNames != null) {
2418
2454
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2455
+ if (input.RuleNames?.length === 0) {
2456
+ entries.RuleNames = [];
2457
+ }
2419
2458
  Object.entries(memberEntries).forEach(([key, value]) => {
2420
2459
  const loc = `RuleNames.${key}`;
2421
2460
  entries[loc] = value;
@@ -2427,6 +2466,9 @@ const serializeAws_queryEnableAlarmActionsInput = (input, context) => {
2427
2466
  const entries = {};
2428
2467
  if (input.AlarmNames != null) {
2429
2468
  const memberEntries = serializeAws_queryAlarmNames(input.AlarmNames, context);
2469
+ if (input.AlarmNames?.length === 0) {
2470
+ entries.AlarmNames = [];
2471
+ }
2430
2472
  Object.entries(memberEntries).forEach(([key, value]) => {
2431
2473
  const loc = `AlarmNames.${key}`;
2432
2474
  entries[loc] = value;
@@ -2438,6 +2480,9 @@ const serializeAws_queryEnableInsightRulesInput = (input, context) => {
2438
2480
  const entries = {};
2439
2481
  if (input.RuleNames != null) {
2440
2482
  const memberEntries = serializeAws_queryInsightRuleNames(input.RuleNames, context);
2483
+ if (input.RuleNames?.length === 0) {
2484
+ entries.RuleNames = [];
2485
+ }
2441
2486
  Object.entries(memberEntries).forEach(([key, value]) => {
2442
2487
  const loc = `RuleNames.${key}`;
2443
2488
  entries[loc] = value;
@@ -2483,6 +2528,9 @@ const serializeAws_queryGetInsightRuleReportInput = (input, context) => {
2483
2528
  }
2484
2529
  if (input.Metrics != null) {
2485
2530
  const memberEntries = serializeAws_queryInsightRuleMetricList(input.Metrics, context);
2531
+ if (input.Metrics?.length === 0) {
2532
+ entries.Metrics = [];
2533
+ }
2486
2534
  Object.entries(memberEntries).forEach(([key, value]) => {
2487
2535
  const loc = `Metrics.${key}`;
2488
2536
  entries[loc] = value;
@@ -2497,6 +2545,9 @@ const serializeAws_queryGetMetricDataInput = (input, context) => {
2497
2545
  const entries = {};
2498
2546
  if (input.MetricDataQueries != null) {
2499
2547
  const memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
2548
+ if (input.MetricDataQueries?.length === 0) {
2549
+ entries.MetricDataQueries = [];
2550
+ }
2500
2551
  Object.entries(memberEntries).forEach(([key, value]) => {
2501
2552
  const loc = `MetricDataQueries.${key}`;
2502
2553
  entries[loc] = value;
@@ -2536,6 +2587,9 @@ const serializeAws_queryGetMetricStatisticsInput = (input, context) => {
2536
2587
  }
2537
2588
  if (input.Dimensions != null) {
2538
2589
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2590
+ if (input.Dimensions?.length === 0) {
2591
+ entries.Dimensions = [];
2592
+ }
2539
2593
  Object.entries(memberEntries).forEach(([key, value]) => {
2540
2594
  const loc = `Dimensions.${key}`;
2541
2595
  entries[loc] = value;
@@ -2552,6 +2606,9 @@ const serializeAws_queryGetMetricStatisticsInput = (input, context) => {
2552
2606
  }
2553
2607
  if (input.Statistics != null) {
2554
2608
  const memberEntries = serializeAws_queryStatistics(input.Statistics, context);
2609
+ if (input.Statistics?.length === 0) {
2610
+ entries.Statistics = [];
2611
+ }
2555
2612
  Object.entries(memberEntries).forEach(([key, value]) => {
2556
2613
  const loc = `Statistics.${key}`;
2557
2614
  entries[loc] = value;
@@ -2559,6 +2616,9 @@ const serializeAws_queryGetMetricStatisticsInput = (input, context) => {
2559
2616
  }
2560
2617
  if (input.ExtendedStatistics != null) {
2561
2618
  const memberEntries = serializeAws_queryExtendedStatistics(input.ExtendedStatistics, context);
2619
+ if (input.ExtendedStatistics?.length === 0) {
2620
+ entries.ExtendedStatistics = [];
2621
+ }
2562
2622
  Object.entries(memberEntries).forEach(([key, value]) => {
2563
2623
  const loc = `ExtendedStatistics.${key}`;
2564
2624
  entries[loc] = value;
@@ -2650,6 +2710,9 @@ const serializeAws_queryListMetricsInput = (input, context) => {
2650
2710
  }
2651
2711
  if (input.Dimensions != null) {
2652
2712
  const memberEntries = serializeAws_queryDimensionFilters(input.Dimensions, context);
2713
+ if (input.Dimensions?.length === 0) {
2714
+ entries.Dimensions = [];
2715
+ }
2653
2716
  Object.entries(memberEntries).forEach(([key, value]) => {
2654
2717
  const loc = `Dimensions.${key}`;
2655
2718
  entries[loc] = value;
@@ -2690,6 +2753,9 @@ const serializeAws_queryManagedRule = (input, context) => {
2690
2753
  }
2691
2754
  if (input.Tags != null) {
2692
2755
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
2756
+ if (input.Tags?.length === 0) {
2757
+ entries.Tags = [];
2758
+ }
2693
2759
  Object.entries(memberEntries).forEach(([key, value]) => {
2694
2760
  const loc = `Tags.${key}`;
2695
2761
  entries[loc] = value;
@@ -2722,6 +2788,9 @@ const serializeAws_queryMetric = (input, context) => {
2722
2788
  }
2723
2789
  if (input.Dimensions != null) {
2724
2790
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2791
+ if (input.Dimensions?.length === 0) {
2792
+ entries.Dimensions = [];
2793
+ }
2725
2794
  Object.entries(memberEntries).forEach(([key, value]) => {
2726
2795
  const loc = `Dimensions.${key}`;
2727
2796
  entries[loc] = value;
@@ -2795,6 +2864,9 @@ const serializeAws_queryMetricDatum = (input, context) => {
2795
2864
  }
2796
2865
  if (input.Dimensions != null) {
2797
2866
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
2867
+ if (input.Dimensions?.length === 0) {
2868
+ entries.Dimensions = [];
2869
+ }
2798
2870
  Object.entries(memberEntries).forEach(([key, value]) => {
2799
2871
  const loc = `Dimensions.${key}`;
2800
2872
  entries[loc] = value;
@@ -2815,6 +2887,9 @@ const serializeAws_queryMetricDatum = (input, context) => {
2815
2887
  }
2816
2888
  if (input.Values != null) {
2817
2889
  const memberEntries = serializeAws_queryValues(input.Values, context);
2890
+ if (input.Values?.length === 0) {
2891
+ entries.Values = [];
2892
+ }
2818
2893
  Object.entries(memberEntries).forEach(([key, value]) => {
2819
2894
  const loc = `Values.${key}`;
2820
2895
  entries[loc] = value;
@@ -2822,6 +2897,9 @@ const serializeAws_queryMetricDatum = (input, context) => {
2822
2897
  }
2823
2898
  if (input.Counts != null) {
2824
2899
  const memberEntries = serializeAws_queryCounts(input.Counts, context);
2900
+ if (input.Counts?.length === 0) {
2901
+ entries.Counts = [];
2902
+ }
2825
2903
  Object.entries(memberEntries).forEach(([key, value]) => {
2826
2904
  const loc = `Counts.${key}`;
2827
2905
  entries[loc] = value;
@@ -2839,6 +2917,9 @@ const serializeAws_queryMetricMathAnomalyDetector = (input, context) => {
2839
2917
  const entries = {};
2840
2918
  if (input.MetricDataQueries != null) {
2841
2919
  const memberEntries = serializeAws_queryMetricDataQueries(input.MetricDataQueries, context);
2920
+ if (input.MetricDataQueries?.length === 0) {
2921
+ entries.MetricDataQueries = [];
2922
+ }
2842
2923
  Object.entries(memberEntries).forEach(([key, value]) => {
2843
2924
  const loc = `MetricDataQueries.${key}`;
2844
2925
  entries[loc] = value;
@@ -2916,6 +2997,9 @@ const serializeAws_queryMetricStreamStatisticsConfiguration = (input, context) =
2916
2997
  const entries = {};
2917
2998
  if (input.IncludeMetrics != null) {
2918
2999
  const memberEntries = serializeAws_queryMetricStreamStatisticsIncludeMetrics(input.IncludeMetrics, context);
3000
+ if (input.IncludeMetrics?.length === 0) {
3001
+ entries.IncludeMetrics = [];
3002
+ }
2919
3003
  Object.entries(memberEntries).forEach(([key, value]) => {
2920
3004
  const loc = `IncludeMetrics.${key}`;
2921
3005
  entries[loc] = value;
@@ -2923,6 +3007,9 @@ const serializeAws_queryMetricStreamStatisticsConfiguration = (input, context) =
2923
3007
  }
2924
3008
  if (input.AdditionalStatistics != null) {
2925
3009
  const memberEntries = serializeAws_queryMetricStreamStatisticsAdditionalStatistics(input.AdditionalStatistics, context);
3010
+ if (input.AdditionalStatistics?.length === 0) {
3011
+ entries.AdditionalStatistics = [];
3012
+ }
2926
3013
  Object.entries(memberEntries).forEach(([key, value]) => {
2927
3014
  const loc = `AdditionalStatistics.${key}`;
2928
3015
  entries[loc] = value;
@@ -2980,6 +3067,9 @@ const serializeAws_queryPutAnomalyDetectorInput = (input, context) => {
2980
3067
  }
2981
3068
  if (input.Dimensions != null) {
2982
3069
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3070
+ if (input.Dimensions?.length === 0) {
3071
+ entries.Dimensions = [];
3072
+ }
2983
3073
  Object.entries(memberEntries).forEach(([key, value]) => {
2984
3074
  const loc = `Dimensions.${key}`;
2985
3075
  entries[loc] = value;
@@ -3018,6 +3108,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
3018
3108
  }
3019
3109
  if (input.AlarmActions != null) {
3020
3110
  const memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
3111
+ if (input.AlarmActions?.length === 0) {
3112
+ entries.AlarmActions = [];
3113
+ }
3021
3114
  Object.entries(memberEntries).forEach(([key, value]) => {
3022
3115
  const loc = `AlarmActions.${key}`;
3023
3116
  entries[loc] = value;
@@ -3034,6 +3127,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
3034
3127
  }
3035
3128
  if (input.InsufficientDataActions != null) {
3036
3129
  const memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3130
+ if (input.InsufficientDataActions?.length === 0) {
3131
+ entries.InsufficientDataActions = [];
3132
+ }
3037
3133
  Object.entries(memberEntries).forEach(([key, value]) => {
3038
3134
  const loc = `InsufficientDataActions.${key}`;
3039
3135
  entries[loc] = value;
@@ -3041,6 +3137,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
3041
3137
  }
3042
3138
  if (input.OKActions != null) {
3043
3139
  const memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3140
+ if (input.OKActions?.length === 0) {
3141
+ entries.OKActions = [];
3142
+ }
3044
3143
  Object.entries(memberEntries).forEach(([key, value]) => {
3045
3144
  const loc = `OKActions.${key}`;
3046
3145
  entries[loc] = value;
@@ -3048,6 +3147,9 @@ const serializeAws_queryPutCompositeAlarmInput = (input, context) => {
3048
3147
  }
3049
3148
  if (input.Tags != null) {
3050
3149
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3150
+ if (input.Tags?.length === 0) {
3151
+ entries.Tags = [];
3152
+ }
3051
3153
  Object.entries(memberEntries).forEach(([key, value]) => {
3052
3154
  const loc = `Tags.${key}`;
3053
3155
  entries[loc] = value;
@@ -3087,6 +3189,9 @@ const serializeAws_queryPutInsightRuleInput = (input, context) => {
3087
3189
  }
3088
3190
  if (input.Tags != null) {
3089
3191
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3192
+ if (input.Tags?.length === 0) {
3193
+ entries.Tags = [];
3194
+ }
3090
3195
  Object.entries(memberEntries).forEach(([key, value]) => {
3091
3196
  const loc = `Tags.${key}`;
3092
3197
  entries[loc] = value;
@@ -3098,6 +3203,9 @@ const serializeAws_queryPutManagedInsightRulesInput = (input, context) => {
3098
3203
  const entries = {};
3099
3204
  if (input.ManagedRules != null) {
3100
3205
  const memberEntries = serializeAws_queryManagedRules(input.ManagedRules, context);
3206
+ if (input.ManagedRules?.length === 0) {
3207
+ entries.ManagedRules = [];
3208
+ }
3101
3209
  Object.entries(memberEntries).forEach(([key, value]) => {
3102
3210
  const loc = `ManagedRules.${key}`;
3103
3211
  entries[loc] = value;
@@ -3118,6 +3226,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3118
3226
  }
3119
3227
  if (input.OKActions != null) {
3120
3228
  const memberEntries = serializeAws_queryResourceList(input.OKActions, context);
3229
+ if (input.OKActions?.length === 0) {
3230
+ entries.OKActions = [];
3231
+ }
3121
3232
  Object.entries(memberEntries).forEach(([key, value]) => {
3122
3233
  const loc = `OKActions.${key}`;
3123
3234
  entries[loc] = value;
@@ -3125,6 +3236,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3125
3236
  }
3126
3237
  if (input.AlarmActions != null) {
3127
3238
  const memberEntries = serializeAws_queryResourceList(input.AlarmActions, context);
3239
+ if (input.AlarmActions?.length === 0) {
3240
+ entries.AlarmActions = [];
3241
+ }
3128
3242
  Object.entries(memberEntries).forEach(([key, value]) => {
3129
3243
  const loc = `AlarmActions.${key}`;
3130
3244
  entries[loc] = value;
@@ -3132,6 +3246,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3132
3246
  }
3133
3247
  if (input.InsufficientDataActions != null) {
3134
3248
  const memberEntries = serializeAws_queryResourceList(input.InsufficientDataActions, context);
3249
+ if (input.InsufficientDataActions?.length === 0) {
3250
+ entries.InsufficientDataActions = [];
3251
+ }
3135
3252
  Object.entries(memberEntries).forEach(([key, value]) => {
3136
3253
  const loc = `InsufficientDataActions.${key}`;
3137
3254
  entries[loc] = value;
@@ -3151,6 +3268,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3151
3268
  }
3152
3269
  if (input.Dimensions != null) {
3153
3270
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3271
+ if (input.Dimensions?.length === 0) {
3272
+ entries.Dimensions = [];
3273
+ }
3154
3274
  Object.entries(memberEntries).forEach(([key, value]) => {
3155
3275
  const loc = `Dimensions.${key}`;
3156
3276
  entries[loc] = value;
@@ -3182,6 +3302,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3182
3302
  }
3183
3303
  if (input.Metrics != null) {
3184
3304
  const memberEntries = serializeAws_queryMetricDataQueries(input.Metrics, context);
3305
+ if (input.Metrics?.length === 0) {
3306
+ entries.Metrics = [];
3307
+ }
3185
3308
  Object.entries(memberEntries).forEach(([key, value]) => {
3186
3309
  const loc = `Metrics.${key}`;
3187
3310
  entries[loc] = value;
@@ -3189,6 +3312,9 @@ const serializeAws_queryPutMetricAlarmInput = (input, context) => {
3189
3312
  }
3190
3313
  if (input.Tags != null) {
3191
3314
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3315
+ if (input.Tags?.length === 0) {
3316
+ entries.Tags = [];
3317
+ }
3192
3318
  Object.entries(memberEntries).forEach(([key, value]) => {
3193
3319
  const loc = `Tags.${key}`;
3194
3320
  entries[loc] = value;
@@ -3206,6 +3332,9 @@ const serializeAws_queryPutMetricDataInput = (input, context) => {
3206
3332
  }
3207
3333
  if (input.MetricData != null) {
3208
3334
  const memberEntries = serializeAws_queryMetricData(input.MetricData, context);
3335
+ if (input.MetricData?.length === 0) {
3336
+ entries.MetricData = [];
3337
+ }
3209
3338
  Object.entries(memberEntries).forEach(([key, value]) => {
3210
3339
  const loc = `MetricData.${key}`;
3211
3340
  entries[loc] = value;
@@ -3220,6 +3349,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3220
3349
  }
3221
3350
  if (input.IncludeFilters != null) {
3222
3351
  const memberEntries = serializeAws_queryMetricStreamFilters(input.IncludeFilters, context);
3352
+ if (input.IncludeFilters?.length === 0) {
3353
+ entries.IncludeFilters = [];
3354
+ }
3223
3355
  Object.entries(memberEntries).forEach(([key, value]) => {
3224
3356
  const loc = `IncludeFilters.${key}`;
3225
3357
  entries[loc] = value;
@@ -3227,6 +3359,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3227
3359
  }
3228
3360
  if (input.ExcludeFilters != null) {
3229
3361
  const memberEntries = serializeAws_queryMetricStreamFilters(input.ExcludeFilters, context);
3362
+ if (input.ExcludeFilters?.length === 0) {
3363
+ entries.ExcludeFilters = [];
3364
+ }
3230
3365
  Object.entries(memberEntries).forEach(([key, value]) => {
3231
3366
  const loc = `ExcludeFilters.${key}`;
3232
3367
  entries[loc] = value;
@@ -3243,6 +3378,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3243
3378
  }
3244
3379
  if (input.Tags != null) {
3245
3380
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3381
+ if (input.Tags?.length === 0) {
3382
+ entries.Tags = [];
3383
+ }
3246
3384
  Object.entries(memberEntries).forEach(([key, value]) => {
3247
3385
  const loc = `Tags.${key}`;
3248
3386
  entries[loc] = value;
@@ -3250,6 +3388,9 @@ const serializeAws_queryPutMetricStreamInput = (input, context) => {
3250
3388
  }
3251
3389
  if (input.StatisticsConfigurations != null) {
3252
3390
  const memberEntries = serializeAws_queryMetricStreamStatisticsConfigurations(input.StatisticsConfigurations, context);
3391
+ if (input.StatisticsConfigurations?.length === 0) {
3392
+ entries.StatisticsConfigurations = [];
3393
+ }
3253
3394
  Object.entries(memberEntries).forEach(([key, value]) => {
3254
3395
  const loc = `StatisticsConfigurations.${key}`;
3255
3396
  entries[loc] = value;
@@ -3305,6 +3446,9 @@ const serializeAws_querySingleMetricAnomalyDetector = (input, context) => {
3305
3446
  }
3306
3447
  if (input.Dimensions != null) {
3307
3448
  const memberEntries = serializeAws_queryDimensions(input.Dimensions, context);
3449
+ if (input.Dimensions?.length === 0) {
3450
+ entries.Dimensions = [];
3451
+ }
3308
3452
  Object.entries(memberEntries).forEach(([key, value]) => {
3309
3453
  const loc = `Dimensions.${key}`;
3310
3454
  entries[loc] = value;
@@ -3319,6 +3463,9 @@ const serializeAws_queryStartMetricStreamsInput = (input, context) => {
3319
3463
  const entries = {};
3320
3464
  if (input.Names != null) {
3321
3465
  const memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
3466
+ if (input.Names?.length === 0) {
3467
+ entries.Names = [];
3468
+ }
3322
3469
  Object.entries(memberEntries).forEach(([key, value]) => {
3323
3470
  const loc = `Names.${key}`;
3324
3471
  entries[loc] = value;
@@ -3358,6 +3505,9 @@ const serializeAws_queryStopMetricStreamsInput = (input, context) => {
3358
3505
  const entries = {};
3359
3506
  if (input.Names != null) {
3360
3507
  const memberEntries = serializeAws_queryMetricStreamNames(input.Names, context);
3508
+ if (input.Names?.length === 0) {
3509
+ entries.Names = [];
3510
+ }
3361
3511
  Object.entries(memberEntries).forEach(([key, value]) => {
3362
3512
  const loc = `Names.${key}`;
3363
3513
  entries[loc] = value;
@@ -3409,6 +3559,9 @@ const serializeAws_queryTagResourceInput = (input, context) => {
3409
3559
  }
3410
3560
  if (input.Tags != null) {
3411
3561
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
3562
+ if (input.Tags?.length === 0) {
3563
+ entries.Tags = [];
3564
+ }
3412
3565
  Object.entries(memberEntries).forEach(([key, value]) => {
3413
3566
  const loc = `Tags.${key}`;
3414
3567
  entries[loc] = value;
@@ -3423,6 +3576,9 @@ const serializeAws_queryUntagResourceInput = (input, context) => {
3423
3576
  }
3424
3577
  if (input.TagKeys != null) {
3425
3578
  const memberEntries = serializeAws_queryTagKeyList(input.TagKeys, context);
3579
+ if (input.TagKeys?.length === 0) {
3580
+ entries.TagKeys = [];
3581
+ }
3426
3582
  Object.entries(memberEntries).forEach(([key, value]) => {
3427
3583
  const loc = `TagKeys.${key}`;
3428
3584
  entries[loc] = value;
@@ -5025,15 +5181,12 @@ const deserializeAws_queryUntagResourceOutput = (output, context) => {
5025
5181
  const contents = {};
5026
5182
  return contents;
5027
5183
  };
5028
- const deserializeMetadata = (output) => {
5029
- var _a, _b;
5030
- return ({
5031
- httpStatusCode: output.statusCode,
5032
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
5033
- extendedRequestId: output.headers["x-amz-id-2"],
5034
- cfId: output.headers["x-amz-cf-id"],
5035
- });
5036
- };
5184
+ const deserializeMetadata = (output) => ({
5185
+ httpStatusCode: output.statusCode,
5186
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
5187
+ extendedRequestId: output.headers["x-amz-id-2"],
5188
+ cfId: output.headers["x-amz-cf-id"],
5189
+ });
5037
5190
  const collectBody = (streamBody = new Uint8Array(), context) => {
5038
5191
  if (streamBody instanceof Uint8Array) {
5039
5192
  return Promise.resolve(streamBody);
@@ -5085,10 +5238,9 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
5085
5238
  return {};
5086
5239
  });
5087
5240
  const parseErrorBody = async (errorBody, context) => {
5088
- var _a;
5089
5241
  const value = await parseBody(errorBody, context);
5090
5242
  if (value.Error) {
5091
- value.Error.message = (_a = value.Error.message) !== null && _a !== void 0 ? _a : value.Error.Message;
5243
+ value.Error.message = value.Error.message ?? value.Error.Message;
5092
5244
  }
5093
5245
  return value;
5094
5246
  };
@@ -16,7 +16,6 @@ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
16
  const smithy_client_1 = require("@aws-sdk/smithy-client");
17
17
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
18
18
  const getRuntimeConfig = (config) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
19
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
21
20
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
21
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -25,21 +24,22 @@ const getRuntimeConfig = (config) => {
25
24
  ...config,
26
25
  runtime: "browser",
27
26
  defaultsMode,
28
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
29
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
30
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
31
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : ((_) => () => Promise.reject(new Error("Credential is missing"))),
32
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
38
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
39
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
42
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
27
+ base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
28
+ base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
29
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
30
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
+ maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
38
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
39
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
42
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
43
43
  };
44
44
  };
45
45
  exports.getRuntimeConfig = getRuntimeConfig;