@aws-sdk/client-cloudwatch 3.150.0 → 3.153.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/CloudWatch.js +30 -0
  3. package/dist-cjs/commands/ListManagedInsightRulesCommand.js +36 -0
  4. package/dist-cjs/commands/PutManagedInsightRulesCommand.js +36 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +30 -2
  7. package/dist-cjs/pagination/DescribeAnomalyDetectorsPaginator.js +36 -0
  8. package/dist-cjs/pagination/ListManagedInsightRulesPaginator.js +36 -0
  9. package/dist-cjs/pagination/index.js +2 -0
  10. package/dist-cjs/protocols/Aws_query.js +230 -2
  11. package/dist-es/CloudWatch.js +30 -0
  12. package/dist-es/commands/ListManagedInsightRulesCommand.js +39 -0
  13. package/dist-es/commands/PutManagedInsightRulesCommand.js +39 -0
  14. package/dist-es/commands/index.js +2 -0
  15. package/dist-es/models/models_0.js +7 -0
  16. package/dist-es/pagination/DescribeAnomalyDetectorsPaginator.js +75 -0
  17. package/dist-es/pagination/ListManagedInsightRulesPaginator.js +75 -0
  18. package/dist-es/pagination/index.js +2 -0
  19. package/dist-es/protocols/Aws_query.js +345 -72
  20. package/dist-types/CloudWatch.d.ts +36 -0
  21. package/dist-types/CloudWatchClient.d.ts +4 -2
  22. package/dist-types/commands/ListManagedInsightRulesCommand.d.ts +41 -0
  23. package/dist-types/commands/PutManagedInsightRulesCommand.d.ts +51 -0
  24. package/dist-types/commands/index.d.ts +2 -0
  25. package/dist-types/models/models_0.d.ts +240 -12
  26. package/dist-types/pagination/DescribeAnomalyDetectorsPaginator.d.ts +4 -0
  27. package/dist-types/pagination/ListManagedInsightRulesPaginator.d.ts +4 -0
  28. package/dist-types/pagination/index.d.ts +2 -0
  29. package/dist-types/protocols/Aws_query.d.ts +6 -0
  30. package/dist-types/ts3.4/CloudWatch.d.ts +10 -0
  31. package/dist-types/ts3.4/CloudWatchClient.d.ts +4 -2
  32. package/dist-types/ts3.4/commands/ListManagedInsightRulesCommand.d.ts +17 -0
  33. package/dist-types/ts3.4/commands/PutManagedInsightRulesCommand.d.ts +17 -0
  34. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  35. package/dist-types/ts3.4/models/models_0.d.ts +63 -0
  36. package/dist-types/ts3.4/pagination/DescribeAnomalyDetectorsPaginator.d.ts +4 -0
  37. package/dist-types/ts3.4/pagination/ListManagedInsightRulesPaginator.d.ts +4 -0
  38. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  39. package/dist-types/ts3.4/protocols/Aws_query.d.ts +6 -0
  40. package/package.json +1 -1
@@ -21,6 +21,7 @@ import { GetMetricStatisticsCommand, } from "./commands/GetMetricStatisticsComma
21
21
  import { GetMetricStreamCommand, } from "./commands/GetMetricStreamCommand";
22
22
  import { GetMetricWidgetImageCommand, } from "./commands/GetMetricWidgetImageCommand";
23
23
  import { ListDashboardsCommand, } from "./commands/ListDashboardsCommand";
24
+ import { ListManagedInsightRulesCommand, } from "./commands/ListManagedInsightRulesCommand";
24
25
  import { ListMetricsCommand } from "./commands/ListMetricsCommand";
25
26
  import { ListMetricStreamsCommand, } from "./commands/ListMetricStreamsCommand";
26
27
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
@@ -28,6 +29,7 @@ import { PutAnomalyDetectorCommand, } from "./commands/PutAnomalyDetectorCommand
28
29
  import { PutCompositeAlarmCommand, } from "./commands/PutCompositeAlarmCommand";
29
30
  import { PutDashboardCommand, } from "./commands/PutDashboardCommand";
30
31
  import { PutInsightRuleCommand, } from "./commands/PutInsightRuleCommand";
32
+ import { PutManagedInsightRulesCommand, } from "./commands/PutManagedInsightRulesCommand";
31
33
  import { PutMetricAlarmCommand, } from "./commands/PutMetricAlarmCommand";
32
34
  import { PutMetricDataCommand, } from "./commands/PutMetricDataCommand";
33
35
  import { PutMetricStreamCommand, } from "./commands/PutMetricStreamCommand";
@@ -335,6 +337,20 @@ var CloudWatch = (function (_super) {
335
337
  return this.send(command, optionsOrCb);
336
338
  }
337
339
  };
340
+ CloudWatch.prototype.listManagedInsightRules = function (args, optionsOrCb, cb) {
341
+ var command = new ListManagedInsightRulesCommand(args);
342
+ if (typeof optionsOrCb === "function") {
343
+ this.send(command, optionsOrCb);
344
+ }
345
+ else if (typeof cb === "function") {
346
+ if (typeof optionsOrCb !== "object")
347
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
348
+ this.send(command, optionsOrCb || {}, cb);
349
+ }
350
+ else {
351
+ return this.send(command, optionsOrCb);
352
+ }
353
+ };
338
354
  CloudWatch.prototype.listMetrics = function (args, optionsOrCb, cb) {
339
355
  var command = new ListMetricsCommand(args);
340
356
  if (typeof optionsOrCb === "function") {
@@ -433,6 +449,20 @@ var CloudWatch = (function (_super) {
433
449
  return this.send(command, optionsOrCb);
434
450
  }
435
451
  };
452
+ CloudWatch.prototype.putManagedInsightRules = function (args, optionsOrCb, cb) {
453
+ var command = new PutManagedInsightRulesCommand(args);
454
+ if (typeof optionsOrCb === "function") {
455
+ this.send(command, optionsOrCb);
456
+ }
457
+ else if (typeof cb === "function") {
458
+ if (typeof optionsOrCb !== "object")
459
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
460
+ this.send(command, optionsOrCb || {}, cb);
461
+ }
462
+ else {
463
+ return this.send(command, optionsOrCb);
464
+ }
465
+ };
436
466
  CloudWatch.prototype.putMetricAlarm = function (args, optionsOrCb, cb) {
437
467
  var command = new PutMetricAlarmCommand(args);
438
468
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ListManagedInsightRulesInputFilterSensitiveLog, ListManagedInsightRulesOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_queryListManagedInsightRulesCommand, serializeAws_queryListManagedInsightRulesCommand, } from "../protocols/Aws_query";
6
+ var ListManagedInsightRulesCommand = (function (_super) {
7
+ __extends(ListManagedInsightRulesCommand, _super);
8
+ function ListManagedInsightRulesCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ListManagedInsightRulesCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "CloudWatchClient";
18
+ var commandName = "ListManagedInsightRulesCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ListManagedInsightRulesInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: ListManagedInsightRulesOutputFilterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ListManagedInsightRulesCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_queryListManagedInsightRulesCommand(input, context);
33
+ };
34
+ ListManagedInsightRulesCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_queryListManagedInsightRulesCommand(output, context);
36
+ };
37
+ return ListManagedInsightRulesCommand;
38
+ }($Command));
39
+ export { ListManagedInsightRulesCommand };
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { PutManagedInsightRulesInputFilterSensitiveLog, PutManagedInsightRulesOutputFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_queryPutManagedInsightRulesCommand, serializeAws_queryPutManagedInsightRulesCommand, } from "../protocols/Aws_query";
6
+ var PutManagedInsightRulesCommand = (function (_super) {
7
+ __extends(PutManagedInsightRulesCommand, _super);
8
+ function PutManagedInsightRulesCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ PutManagedInsightRulesCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "CloudWatchClient";
18
+ var commandName = "PutManagedInsightRulesCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: PutManagedInsightRulesInputFilterSensitiveLog,
24
+ outputFilterSensitiveLog: PutManagedInsightRulesOutputFilterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ PutManagedInsightRulesCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_queryPutManagedInsightRulesCommand(input, context);
33
+ };
34
+ PutManagedInsightRulesCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_queryPutManagedInsightRulesCommand(output, context);
36
+ };
37
+ return PutManagedInsightRulesCommand;
38
+ }($Command));
39
+ export { PutManagedInsightRulesCommand };
@@ -19,6 +19,7 @@ export * from "./GetMetricStatisticsCommand";
19
19
  export * from "./GetMetricStreamCommand";
20
20
  export * from "./GetMetricWidgetImageCommand";
21
21
  export * from "./ListDashboardsCommand";
22
+ export * from "./ListManagedInsightRulesCommand";
22
23
  export * from "./ListMetricStreamsCommand";
23
24
  export * from "./ListMetricsCommand";
24
25
  export * from "./ListTagsForResourceCommand";
@@ -26,6 +27,7 @@ export * from "./PutAnomalyDetectorCommand";
26
27
  export * from "./PutCompositeAlarmCommand";
27
28
  export * from "./PutDashboardCommand";
28
29
  export * from "./PutInsightRuleCommand";
30
+ export * from "./PutManagedInsightRulesCommand";
29
31
  export * from "./PutMetricAlarmCommand";
30
32
  export * from "./PutMetricDataCommand";
31
33
  export * from "./PutMetricStreamCommand";
@@ -260,6 +260,10 @@ export var GetMetricWidgetImageInputFilterSensitiveLog = function (obj) { return
260
260
  export var GetMetricWidgetImageOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
261
261
  export var ListDashboardsInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
262
262
  export var ListDashboardsOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
263
+ export var ListManagedInsightRulesInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
264
+ export var ManagedRuleStateFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
265
+ export var ManagedRuleDescriptionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
266
+ export var ListManagedInsightRulesOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
263
267
  export var ListMetricsInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
264
268
  export var ListMetricsOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
265
269
  export var ListMetricStreamsInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -275,6 +279,9 @@ export var PutDashboardInputFilterSensitiveLog = function (obj) { return (__assi
275
279
  export var PutDashboardOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
276
280
  export var PutInsightRuleInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
277
281
  export var PutInsightRuleOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
282
+ export var ManagedRuleFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
283
+ export var PutManagedInsightRulesInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
284
+ export var PutManagedInsightRulesOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
278
285
  export var PutMetricAlarmInputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
279
286
  export var StatisticSetFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
280
287
  export var MetricDatumFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -0,0 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { CloudWatch } from "../CloudWatch";
3
+ import { CloudWatchClient } from "../CloudWatchClient";
4
+ import { DescribeAnomalyDetectorsCommand, } from "../commands/DescribeAnomalyDetectorsCommand";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new DescribeAnomalyDetectorsCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.describeAnomalyDetectors.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateDescribeAnomalyDetectors(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateDescribeAnomalyDetectors_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.NextToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof CloudWatch)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof CloudWatchClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected CloudWatch | CloudWatchClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.NextToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
75
+ }
@@ -0,0 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { CloudWatch } from "../CloudWatch";
3
+ import { CloudWatchClient } from "../CloudWatchClient";
4
+ import { ListManagedInsightRulesCommand, } from "../commands/ListManagedInsightRulesCommand";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListManagedInsightRulesCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listManagedInsightRules.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListManagedInsightRules(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListManagedInsightRules_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.NextToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof CloudWatch)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof CloudWatchClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected CloudWatch | CloudWatchClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.NextToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
75
+ }
@@ -1,8 +1,10 @@
1
1
  export * from "./DescribeAlarmHistoryPaginator";
2
2
  export * from "./DescribeAlarmsPaginator";
3
+ export * from "./DescribeAnomalyDetectorsPaginator";
3
4
  export * from "./DescribeInsightRulesPaginator";
4
5
  export * from "./GetMetricDataPaginator";
5
6
  export * from "./Interfaces";
6
7
  export * from "./ListDashboardsPaginator";
8
+ export * from "./ListManagedInsightRulesPaginator";
7
9
  export * from "./ListMetricStreamsPaginator";
8
10
  export * from "./ListMetricsPaginator";