@aws-sdk/client-cloudwatch 3.326.0 → 3.327.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.
@@ -2844,6 +2844,28 @@ const se_MetricStreamFilter = (input, context) => {
2844
2844
  if (input.Namespace != null) {
2845
2845
  entries["Namespace"] = input.Namespace;
2846
2846
  }
2847
+ if (input.MetricNames != null) {
2848
+ const memberEntries = se_MetricStreamFilterMetricNames(input.MetricNames, context);
2849
+ if (input.MetricNames?.length === 0) {
2850
+ entries.MetricNames = [];
2851
+ }
2852
+ Object.entries(memberEntries).forEach(([key, value]) => {
2853
+ const loc = `MetricNames.${key}`;
2854
+ entries[loc] = value;
2855
+ });
2856
+ }
2857
+ return entries;
2858
+ };
2859
+ const se_MetricStreamFilterMetricNames = (input, context) => {
2860
+ const entries = {};
2861
+ let counter = 1;
2862
+ for (const entry of input) {
2863
+ if (entry === null) {
2864
+ continue;
2865
+ }
2866
+ entries[`member.${counter}`] = entry;
2867
+ counter++;
2868
+ }
2847
2869
  return entries;
2848
2870
  };
2849
2871
  const se_MetricStreamFilters = (input, context) => {
@@ -4599,8 +4621,21 @@ const de_MetricStreamFilter = (output, context) => {
4599
4621
  if (output["Namespace"] !== undefined) {
4600
4622
  contents.Namespace = (0, smithy_client_1.expectString)(output["Namespace"]);
4601
4623
  }
4624
+ if (output.MetricNames === "") {
4625
+ contents.MetricNames = [];
4626
+ }
4627
+ else if (output["MetricNames"] !== undefined && output["MetricNames"]["member"] !== undefined) {
4628
+ contents.MetricNames = de_MetricStreamFilterMetricNames((0, smithy_client_1.getArrayIfSingleItem)(output["MetricNames"]["member"]), context);
4629
+ }
4602
4630
  return contents;
4603
4631
  };
4632
+ const de_MetricStreamFilterMetricNames = (output, context) => {
4633
+ return (output || [])
4634
+ .filter((e) => e != null)
4635
+ .map((entry) => {
4636
+ return (0, smithy_client_1.expectString)(entry);
4637
+ });
4638
+ };
4604
4639
  const de_MetricStreamFilters = (output, context) => {
4605
4640
  return (output || [])
4606
4641
  .filter((e) => e != null)
@@ -2764,6 +2764,28 @@ const se_MetricStreamFilter = (input, context) => {
2764
2764
  if (input.Namespace != null) {
2765
2765
  entries["Namespace"] = input.Namespace;
2766
2766
  }
2767
+ if (input.MetricNames != null) {
2768
+ const memberEntries = se_MetricStreamFilterMetricNames(input.MetricNames, context);
2769
+ if (input.MetricNames?.length === 0) {
2770
+ entries.MetricNames = [];
2771
+ }
2772
+ Object.entries(memberEntries).forEach(([key, value]) => {
2773
+ const loc = `MetricNames.${key}`;
2774
+ entries[loc] = value;
2775
+ });
2776
+ }
2777
+ return entries;
2778
+ };
2779
+ const se_MetricStreamFilterMetricNames = (input, context) => {
2780
+ const entries = {};
2781
+ let counter = 1;
2782
+ for (const entry of input) {
2783
+ if (entry === null) {
2784
+ continue;
2785
+ }
2786
+ entries[`member.${counter}`] = entry;
2787
+ counter++;
2788
+ }
2767
2789
  return entries;
2768
2790
  };
2769
2791
  const se_MetricStreamFilters = (input, context) => {
@@ -4519,8 +4541,21 @@ const de_MetricStreamFilter = (output, context) => {
4519
4541
  if (output["Namespace"] !== undefined) {
4520
4542
  contents.Namespace = __expectString(output["Namespace"]);
4521
4543
  }
4544
+ if (output.MetricNames === "") {
4545
+ contents.MetricNames = [];
4546
+ }
4547
+ else if (output["MetricNames"] !== undefined && output["MetricNames"]["member"] !== undefined) {
4548
+ contents.MetricNames = de_MetricStreamFilterMetricNames(__getArrayIfSingleItem(output["MetricNames"]["member"]), context);
4549
+ }
4522
4550
  return contents;
4523
4551
  };
4552
+ const de_MetricStreamFilterMetricNames = (output, context) => {
4553
+ return (output || [])
4554
+ .filter((e) => e != null)
4555
+ .map((entry) => {
4556
+ return __expectString(entry);
4557
+ });
4558
+ };
4524
4559
  const de_MetricStreamFilters = (output, context) => {
4525
4560
  return (output || [])
4526
4561
  .filter((e) => e != null)
@@ -37,11 +37,17 @@ export interface GetMetricStreamCommandOutput extends GetMetricStreamOutput, __M
37
37
  * // IncludeFilters: [ // MetricStreamFilters
38
38
  * // { // MetricStreamFilter
39
39
  * // Namespace: "STRING_VALUE",
40
+ * // MetricNames: [ // MetricStreamFilterMetricNames
41
+ * // "STRING_VALUE",
42
+ * // ],
40
43
  * // },
41
44
  * // ],
42
45
  * // ExcludeFilters: [
43
46
  * // {
44
47
  * // Namespace: "STRING_VALUE",
48
+ * // MetricNames: [
49
+ * // "STRING_VALUE",
50
+ * // ],
45
51
  * // },
46
52
  * // ],
47
53
  * // FirehoseArn: "STRING_VALUE",
@@ -45,6 +45,7 @@ export interface PutMetricAlarmCommandOutput extends __MetadataBearer {
45
45
  * are called <code>AWSServiceRoleForCloudWatchEvents</code> and
46
46
  * <code>AWSServiceRoleForCloudWatchAlarms_ActionSSM</code>.
47
47
  * For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role">Amazon Web Services service-linked role</a>.</p>
48
+ * <p>Each <code>PutMetricAlarm</code> action has a maximum uncompressed payload of 120 KB.</p>
48
49
  * <p>
49
50
  * <b>Cross-account alarms</b>
50
51
  * </p>
@@ -64,11 +64,17 @@ export interface PutMetricStreamCommandOutput extends PutMetricStreamOutput, __M
64
64
  * IncludeFilters: [ // MetricStreamFilters
65
65
  * { // MetricStreamFilter
66
66
  * Namespace: "STRING_VALUE",
67
+ * MetricNames: [ // MetricStreamFilterMetricNames
68
+ * "STRING_VALUE",
69
+ * ],
67
70
  * },
68
71
  * ],
69
72
  * ExcludeFilters: [
70
73
  * {
71
74
  * Namespace: "STRING_VALUE",
75
+ * MetricNames: [
76
+ * "STRING_VALUE",
77
+ * ],
72
78
  * },
73
79
  * ],
74
80
  * FirehoseArn: "STRING_VALUE", // required
@@ -2113,16 +2113,29 @@ export interface GetMetricStreamInput {
2113
2113
  }
2114
2114
  /**
2115
2115
  * @public
2116
- * <p>This structure contains the name of one of the metric namespaces that is listed in
2117
- * a filter of a metric stream.</p>
2118
- * <p>The namespace can contain only ASCII printable characters (ASCII range 32 through 126). It must
2119
- * contain at least one non-whitespace character.</p>
2116
+ * <p>This structure contains a metric namespace and optionally, a list of metric names,
2117
+ * to either include in a metric stream or exclude from
2118
+ * a metric stream.</p>
2119
+ * <p>A metric stream's filters can include up to 1000 total names. This limit
2120
+ * applies to the sum of namespace names and metric names in the filters. For example,
2121
+ * this could include 10 metric namespace filters with 99 metrics each, or 20 namespace filters
2122
+ * with 49 metrics specified in each filter.</p>
2120
2123
  */
2121
2124
  export interface MetricStreamFilter {
2122
2125
  /**
2123
- * <p>The name of the metric namespace in the filter.</p>
2126
+ * <p>The name of the metric namespace for this filter.</p>
2127
+ * <p>The namespace can contain only ASCII printable characters (ASCII range 32 through 126). It must
2128
+ * contain at least one non-whitespace character.</p>
2124
2129
  */
2125
2130
  Namespace?: string;
2131
+ /**
2132
+ * <p>The names of the metrics to either include or exclude from the metric stream. </p>
2133
+ * <p>If you omit this parameter, all metrics in the namespace are included or excluded,
2134
+ * depending on whether this filter is specified as an exclude filter or an include filter.</p>
2135
+ * <p>Each metric name can contain only ASCII printable characters (ASCII range 32 through 126).
2136
+ * Each metric name must contain at least one non-whitespace character.</p>
2137
+ */
2138
+ MetricNames?: string[];
2126
2139
  }
2127
2140
  /**
2128
2141
  * @public
@@ -3177,7 +3190,7 @@ export interface PutMetricAlarmInput {
3177
3190
  * </li>
3178
3191
  * </ul>
3179
3192
  * <p>
3180
- * <b>SSN notification action:</b>
3193
+ * <b>SNS notification action:</b>
3181
3194
  * </p>
3182
3195
  * <ul>
3183
3196
  * <li>
@@ -3266,7 +3279,7 @@ export interface PutMetricAlarmInput {
3266
3279
  * </li>
3267
3280
  * </ul>
3268
3281
  * <p>
3269
- * <b>SSN notification action:</b>
3282
+ * <b>SNS notification action:</b>
3270
3283
  * </p>
3271
3284
  * <ul>
3272
3285
  * <li>
@@ -3355,7 +3368,7 @@ export interface PutMetricAlarmInput {
3355
3368
  * </li>
3356
3369
  * </ul>
3357
3370
  * <p>
3358
- * <b>SSN notification action:</b>
3371
+ * <b>SNS notification action:</b>
3359
3372
  * </p>
3360
3373
  * <ul>
3361
3374
  * <li>
@@ -540,6 +540,7 @@ export interface GetMetricStreamInput {
540
540
  }
541
541
  export interface MetricStreamFilter {
542
542
  Namespace?: string;
543
+ MetricNames?: string[];
543
544
  }
544
545
  export declare const MetricStreamOutputFormat: {
545
546
  readonly JSON: "json";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudwatch",
3
3
  "description": "AWS SDK for JavaScript Cloudwatch Client for Node.js, Browser and React Native",
4
- "version": "3.326.0",
4
+ "version": "3.327.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.326.0",
24
+ "@aws-sdk/client-sts": "3.327.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.326.0",
26
+ "@aws-sdk/credential-provider-node": "3.327.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -32,11 +32,11 @@
32
32
  "@aws-sdk/middleware-host-header": "3.325.0",
33
33
  "@aws-sdk/middleware-logger": "3.325.0",
34
34
  "@aws-sdk/middleware-recursion-detection": "3.325.0",
35
- "@aws-sdk/middleware-retry": "3.325.0",
35
+ "@aws-sdk/middleware-retry": "3.327.0",
36
36
  "@aws-sdk/middleware-serde": "3.325.0",
37
37
  "@aws-sdk/middleware-signing": "3.325.0",
38
38
  "@aws-sdk/middleware-stack": "3.325.0",
39
- "@aws-sdk/middleware-user-agent": "3.325.0",
39
+ "@aws-sdk/middleware-user-agent": "3.327.0",
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.321.1",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
@@ -48,8 +48,8 @@
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
49
  "@aws-sdk/util-defaults-mode-browser": "3.325.0",
50
50
  "@aws-sdk/util-defaults-mode-node": "3.325.0",
51
- "@aws-sdk/util-endpoints": "3.319.0",
52
- "@aws-sdk/util-retry": "3.310.0",
51
+ "@aws-sdk/util-endpoints": "3.327.0",
52
+ "@aws-sdk/util-retry": "3.327.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",
54
54
  "@aws-sdk/util-user-agent-node": "3.310.0",
55
55
  "@aws-sdk/util-utf8": "3.310.0",