@aws-sdk/client-synthetics 3.180.0 → 3.183.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 (41) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +27 -21
  3. package/dist-es/Synthetics.js +86 -93
  4. package/dist-es/SyntheticsClient.js +22 -28
  5. package/dist-es/commands/AssociateResourceCommand.js +21 -28
  6. package/dist-es/commands/CreateCanaryCommand.js +21 -28
  7. package/dist-es/commands/CreateGroupCommand.js +21 -28
  8. package/dist-es/commands/DeleteCanaryCommand.js +21 -28
  9. package/dist-es/commands/DeleteGroupCommand.js +21 -28
  10. package/dist-es/commands/DescribeCanariesCommand.js +21 -28
  11. package/dist-es/commands/DescribeCanariesLastRunCommand.js +21 -28
  12. package/dist-es/commands/DescribeRuntimeVersionsCommand.js +21 -28
  13. package/dist-es/commands/DisassociateResourceCommand.js +21 -28
  14. package/dist-es/commands/GetCanaryCommand.js +21 -28
  15. package/dist-es/commands/GetCanaryRunsCommand.js +21 -28
  16. package/dist-es/commands/GetGroupCommand.js +21 -28
  17. package/dist-es/commands/ListAssociatedGroupsCommand.js +21 -28
  18. package/dist-es/commands/ListGroupResourcesCommand.js +21 -28
  19. package/dist-es/commands/ListGroupsCommand.js +21 -28
  20. package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
  21. package/dist-es/commands/StartCanaryCommand.js +21 -28
  22. package/dist-es/commands/StopCanaryCommand.js +21 -28
  23. package/dist-es/commands/TagResourceCommand.js +21 -28
  24. package/dist-es/commands/UntagResourceCommand.js +21 -28
  25. package/dist-es/commands/UpdateCanaryCommand.js +21 -28
  26. package/dist-es/endpoints.js +8 -8
  27. package/dist-es/models/SyntheticsServiceException.js +5 -10
  28. package/dist-es/models/models_0.js +318 -187
  29. package/dist-es/pagination/DescribeCanariesLastRunPaginator.js +25 -68
  30. package/dist-es/pagination/DescribeCanariesPaginator.js +25 -68
  31. package/dist-es/pagination/DescribeRuntimeVersionsPaginator.js +25 -68
  32. package/dist-es/pagination/GetCanaryRunsPaginator.js +25 -68
  33. package/dist-es/pagination/ListAssociatedGroupsPaginator.js +25 -68
  34. package/dist-es/pagination/ListGroupResourcesPaginator.js +25 -68
  35. package/dist-es/pagination/ListGroupsPaginator.js +25 -68
  36. package/dist-es/protocols/Aws_restJson1.js +1547 -2111
  37. package/dist-es/runtimeConfig.browser.js +26 -12
  38. package/dist-es/runtimeConfig.js +30 -12
  39. package/dist-es/runtimeConfig.native.js +8 -5
  40. package/dist-es/runtimeConfig.shared.js +8 -11
  41. package/package.json +33 -33
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-synthetics
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-synthetics
@@ -490,7 +490,7 @@ exports.deserializeAws_restJson1AssociateResourceCommand = deserializeAws_restJs
490
490
  const deserializeAws_restJson1AssociateResourceCommandError = async (output, context) => {
491
491
  const parsedOutput = {
492
492
  ...output,
493
- body: await parseBody(output.body, context),
493
+ body: await parseErrorBody(output.body, context),
494
494
  };
495
495
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
496
496
  switch (errorCode) {
@@ -536,7 +536,7 @@ exports.deserializeAws_restJson1CreateCanaryCommand = deserializeAws_restJson1Cr
536
536
  const deserializeAws_restJson1CreateCanaryCommandError = async (output, context) => {
537
537
  const parsedOutput = {
538
538
  ...output,
539
- body: await parseBody(output.body, context),
539
+ body: await parseErrorBody(output.body, context),
540
540
  };
541
541
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
542
542
  switch (errorCode) {
@@ -576,7 +576,7 @@ exports.deserializeAws_restJson1CreateGroupCommand = deserializeAws_restJson1Cre
576
576
  const deserializeAws_restJson1CreateGroupCommandError = async (output, context) => {
577
577
  const parsedOutput = {
578
578
  ...output,
579
- body: await parseBody(output.body, context),
579
+ body: await parseErrorBody(output.body, context),
580
580
  };
581
581
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
582
  switch (errorCode) {
@@ -616,7 +616,7 @@ exports.deserializeAws_restJson1DeleteCanaryCommand = deserializeAws_restJson1De
616
616
  const deserializeAws_restJson1DeleteCanaryCommandError = async (output, context) => {
617
617
  const parsedOutput = {
618
618
  ...output,
619
- body: await parseBody(output.body, context),
619
+ body: await parseErrorBody(output.body, context),
620
620
  };
621
621
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
622
622
  switch (errorCode) {
@@ -656,7 +656,7 @@ exports.deserializeAws_restJson1DeleteGroupCommand = deserializeAws_restJson1Del
656
656
  const deserializeAws_restJson1DeleteGroupCommandError = async (output, context) => {
657
657
  const parsedOutput = {
658
658
  ...output,
659
- body: await parseBody(output.body, context),
659
+ body: await parseErrorBody(output.body, context),
660
660
  };
661
661
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
662
662
  switch (errorCode) {
@@ -702,7 +702,7 @@ exports.deserializeAws_restJson1DescribeCanariesCommand = deserializeAws_restJso
702
702
  const deserializeAws_restJson1DescribeCanariesCommandError = async (output, context) => {
703
703
  const parsedOutput = {
704
704
  ...output,
705
- body: await parseBody(output.body, context),
705
+ body: await parseErrorBody(output.body, context),
706
706
  };
707
707
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
708
708
  switch (errorCode) {
@@ -742,7 +742,7 @@ exports.deserializeAws_restJson1DescribeCanariesLastRunCommand = deserializeAws_
742
742
  const deserializeAws_restJson1DescribeCanariesLastRunCommandError = async (output, context) => {
743
743
  const parsedOutput = {
744
744
  ...output,
745
- body: await parseBody(output.body, context),
745
+ body: await parseErrorBody(output.body, context),
746
746
  };
747
747
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
748
748
  switch (errorCode) {
@@ -782,7 +782,7 @@ exports.deserializeAws_restJson1DescribeRuntimeVersionsCommand = deserializeAws_
782
782
  const deserializeAws_restJson1DescribeRuntimeVersionsCommandError = async (output, context) => {
783
783
  const parsedOutput = {
784
784
  ...output,
785
- body: await parseBody(output.body, context),
785
+ body: await parseErrorBody(output.body, context),
786
786
  };
787
787
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
788
788
  switch (errorCode) {
@@ -816,7 +816,7 @@ exports.deserializeAws_restJson1DisassociateResourceCommand = deserializeAws_res
816
816
  const deserializeAws_restJson1DisassociateResourceCommandError = async (output, context) => {
817
817
  const parsedOutput = {
818
818
  ...output,
819
- body: await parseBody(output.body, context),
819
+ body: await parseErrorBody(output.body, context),
820
820
  };
821
821
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
822
822
  switch (errorCode) {
@@ -859,7 +859,7 @@ exports.deserializeAws_restJson1GetCanaryCommand = deserializeAws_restJson1GetCa
859
859
  const deserializeAws_restJson1GetCanaryCommandError = async (output, context) => {
860
860
  const parsedOutput = {
861
861
  ...output,
862
- body: await parseBody(output.body, context),
862
+ body: await parseErrorBody(output.body, context),
863
863
  };
864
864
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
865
865
  switch (errorCode) {
@@ -899,7 +899,7 @@ exports.deserializeAws_restJson1GetCanaryRunsCommand = deserializeAws_restJson1G
899
899
  const deserializeAws_restJson1GetCanaryRunsCommandError = async (output, context) => {
900
900
  const parsedOutput = {
901
901
  ...output,
902
- body: await parseBody(output.body, context),
902
+ body: await parseErrorBody(output.body, context),
903
903
  };
904
904
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
905
905
  switch (errorCode) {
@@ -939,7 +939,7 @@ exports.deserializeAws_restJson1GetGroupCommand = deserializeAws_restJson1GetGro
939
939
  const deserializeAws_restJson1GetGroupCommandError = async (output, context) => {
940
940
  const parsedOutput = {
941
941
  ...output,
942
- body: await parseBody(output.body, context),
942
+ body: await parseErrorBody(output.body, context),
943
943
  };
944
944
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
945
945
  switch (errorCode) {
@@ -985,7 +985,7 @@ exports.deserializeAws_restJson1ListAssociatedGroupsCommand = deserializeAws_res
985
985
  const deserializeAws_restJson1ListAssociatedGroupsCommandError = async (output, context) => {
986
986
  const parsedOutput = {
987
987
  ...output,
988
- body: await parseBody(output.body, context),
988
+ body: await parseErrorBody(output.body, context),
989
989
  };
990
990
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
991
  switch (errorCode) {
@@ -1028,7 +1028,7 @@ exports.deserializeAws_restJson1ListGroupResourcesCommand = deserializeAws_restJ
1028
1028
  const deserializeAws_restJson1ListGroupResourcesCommandError = async (output, context) => {
1029
1029
  const parsedOutput = {
1030
1030
  ...output,
1031
- body: await parseBody(output.body, context),
1031
+ body: await parseErrorBody(output.body, context),
1032
1032
  };
1033
1033
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1034
1034
  switch (errorCode) {
@@ -1074,7 +1074,7 @@ exports.deserializeAws_restJson1ListGroupsCommand = deserializeAws_restJson1List
1074
1074
  const deserializeAws_restJson1ListGroupsCommandError = async (output, context) => {
1075
1075
  const parsedOutput = {
1076
1076
  ...output,
1077
- body: await parseBody(output.body, context),
1077
+ body: await parseErrorBody(output.body, context),
1078
1078
  };
1079
1079
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1080
1080
  switch (errorCode) {
@@ -1111,7 +1111,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
1111
1111
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
1112
1112
  const parsedOutput = {
1113
1113
  ...output,
1114
- body: await parseBody(output.body, context),
1114
+ body: await parseErrorBody(output.body, context),
1115
1115
  };
1116
1116
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1117
1117
  switch (errorCode) {
@@ -1154,7 +1154,7 @@ exports.deserializeAws_restJson1StartCanaryCommand = deserializeAws_restJson1Sta
1154
1154
  const deserializeAws_restJson1StartCanaryCommandError = async (output, context) => {
1155
1155
  const parsedOutput = {
1156
1156
  ...output,
1157
- body: await parseBody(output.body, context),
1157
+ body: await parseErrorBody(output.body, context),
1158
1158
  };
1159
1159
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1160
1160
  switch (errorCode) {
@@ -1194,7 +1194,7 @@ exports.deserializeAws_restJson1StopCanaryCommand = deserializeAws_restJson1Stop
1194
1194
  const deserializeAws_restJson1StopCanaryCommandError = async (output, context) => {
1195
1195
  const parsedOutput = {
1196
1196
  ...output,
1197
- body: await parseBody(output.body, context),
1197
+ body: await parseErrorBody(output.body, context),
1198
1198
  };
1199
1199
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1200
1200
  switch (errorCode) {
@@ -1234,7 +1234,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
1234
1234
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
1235
1235
  const parsedOutput = {
1236
1236
  ...output,
1237
- body: await parseBody(output.body, context),
1237
+ body: await parseErrorBody(output.body, context),
1238
1238
  };
1239
1239
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1240
1240
  switch (errorCode) {
@@ -1277,7 +1277,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
1277
1277
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
1278
1278
  const parsedOutput = {
1279
1279
  ...output,
1280
- body: await parseBody(output.body, context),
1280
+ body: await parseErrorBody(output.body, context),
1281
1281
  };
1282
1282
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1283
1283
  switch (errorCode) {
@@ -1320,7 +1320,7 @@ exports.deserializeAws_restJson1UpdateCanaryCommand = deserializeAws_restJson1Up
1320
1320
  const deserializeAws_restJson1UpdateCanaryCommandError = async (output, context) => {
1321
1321
  const parsedOutput = {
1322
1322
  ...output,
1323
- body: await parseBody(output.body, context),
1323
+ body: await parseErrorBody(output.body, context),
1324
1324
  };
1325
1325
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1326
1326
  switch (errorCode) {
@@ -1908,6 +1908,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1908
1908
  }
1909
1909
  return {};
1910
1910
  });
1911
+ const parseErrorBody = async (errorBody, context) => {
1912
+ var _a;
1913
+ const value = await parseBody(errorBody, context);
1914
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1915
+ return value;
1916
+ };
1911
1917
  const loadRestJsonErrorCode = (output, data) => {
1912
1918
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1913
1919
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { AssociateResourceCommand, } from "./commands/AssociateResourceCommand";
3
2
  import { CreateCanaryCommand, } from "./commands/CreateCanaryCommand";
4
3
  import { CreateGroupCommand } from "./commands/CreateGroupCommand";
@@ -21,305 +20,299 @@ import { TagResourceCommand } from "./commands/TagResourceCommand";
21
20
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
22
21
  import { UpdateCanaryCommand, } from "./commands/UpdateCanaryCommand";
23
22
  import { SyntheticsClient } from "./SyntheticsClient";
24
- var Synthetics = (function (_super) {
25
- __extends(Synthetics, _super);
26
- function Synthetics() {
27
- return _super !== null && _super.apply(this, arguments) || this;
28
- }
29
- Synthetics.prototype.associateResource = function (args, optionsOrCb, cb) {
30
- var command = new AssociateResourceCommand(args);
23
+ export class Synthetics extends SyntheticsClient {
24
+ associateResource(args, optionsOrCb, cb) {
25
+ const command = new AssociateResourceCommand(args);
31
26
  if (typeof optionsOrCb === "function") {
32
27
  this.send(command, optionsOrCb);
33
28
  }
34
29
  else if (typeof cb === "function") {
35
30
  if (typeof optionsOrCb !== "object")
36
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
31
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
37
32
  this.send(command, optionsOrCb || {}, cb);
38
33
  }
39
34
  else {
40
35
  return this.send(command, optionsOrCb);
41
36
  }
42
- };
43
- Synthetics.prototype.createCanary = function (args, optionsOrCb, cb) {
44
- var command = new CreateCanaryCommand(args);
37
+ }
38
+ createCanary(args, optionsOrCb, cb) {
39
+ const command = new CreateCanaryCommand(args);
45
40
  if (typeof optionsOrCb === "function") {
46
41
  this.send(command, optionsOrCb);
47
42
  }
48
43
  else if (typeof cb === "function") {
49
44
  if (typeof optionsOrCb !== "object")
50
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
45
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
51
46
  this.send(command, optionsOrCb || {}, cb);
52
47
  }
53
48
  else {
54
49
  return this.send(command, optionsOrCb);
55
50
  }
56
- };
57
- Synthetics.prototype.createGroup = function (args, optionsOrCb, cb) {
58
- var command = new CreateGroupCommand(args);
51
+ }
52
+ createGroup(args, optionsOrCb, cb) {
53
+ const command = new CreateGroupCommand(args);
59
54
  if (typeof optionsOrCb === "function") {
60
55
  this.send(command, optionsOrCb);
61
56
  }
62
57
  else if (typeof cb === "function") {
63
58
  if (typeof optionsOrCb !== "object")
64
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
59
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
65
60
  this.send(command, optionsOrCb || {}, cb);
66
61
  }
67
62
  else {
68
63
  return this.send(command, optionsOrCb);
69
64
  }
70
- };
71
- Synthetics.prototype.deleteCanary = function (args, optionsOrCb, cb) {
72
- var command = new DeleteCanaryCommand(args);
65
+ }
66
+ deleteCanary(args, optionsOrCb, cb) {
67
+ const command = new DeleteCanaryCommand(args);
73
68
  if (typeof optionsOrCb === "function") {
74
69
  this.send(command, optionsOrCb);
75
70
  }
76
71
  else if (typeof cb === "function") {
77
72
  if (typeof optionsOrCb !== "object")
78
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
73
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
79
74
  this.send(command, optionsOrCb || {}, cb);
80
75
  }
81
76
  else {
82
77
  return this.send(command, optionsOrCb);
83
78
  }
84
- };
85
- Synthetics.prototype.deleteGroup = function (args, optionsOrCb, cb) {
86
- var command = new DeleteGroupCommand(args);
79
+ }
80
+ deleteGroup(args, optionsOrCb, cb) {
81
+ const command = new DeleteGroupCommand(args);
87
82
  if (typeof optionsOrCb === "function") {
88
83
  this.send(command, optionsOrCb);
89
84
  }
90
85
  else if (typeof cb === "function") {
91
86
  if (typeof optionsOrCb !== "object")
92
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
87
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
93
88
  this.send(command, optionsOrCb || {}, cb);
94
89
  }
95
90
  else {
96
91
  return this.send(command, optionsOrCb);
97
92
  }
98
- };
99
- Synthetics.prototype.describeCanaries = function (args, optionsOrCb, cb) {
100
- var command = new DescribeCanariesCommand(args);
93
+ }
94
+ describeCanaries(args, optionsOrCb, cb) {
95
+ const command = new DescribeCanariesCommand(args);
101
96
  if (typeof optionsOrCb === "function") {
102
97
  this.send(command, optionsOrCb);
103
98
  }
104
99
  else if (typeof cb === "function") {
105
100
  if (typeof optionsOrCb !== "object")
106
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
101
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
107
102
  this.send(command, optionsOrCb || {}, cb);
108
103
  }
109
104
  else {
110
105
  return this.send(command, optionsOrCb);
111
106
  }
112
- };
113
- Synthetics.prototype.describeCanariesLastRun = function (args, optionsOrCb, cb) {
114
- var command = new DescribeCanariesLastRunCommand(args);
107
+ }
108
+ describeCanariesLastRun(args, optionsOrCb, cb) {
109
+ const command = new DescribeCanariesLastRunCommand(args);
115
110
  if (typeof optionsOrCb === "function") {
116
111
  this.send(command, optionsOrCb);
117
112
  }
118
113
  else if (typeof cb === "function") {
119
114
  if (typeof optionsOrCb !== "object")
120
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
115
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
121
116
  this.send(command, optionsOrCb || {}, cb);
122
117
  }
123
118
  else {
124
119
  return this.send(command, optionsOrCb);
125
120
  }
126
- };
127
- Synthetics.prototype.describeRuntimeVersions = function (args, optionsOrCb, cb) {
128
- var command = new DescribeRuntimeVersionsCommand(args);
121
+ }
122
+ describeRuntimeVersions(args, optionsOrCb, cb) {
123
+ const command = new DescribeRuntimeVersionsCommand(args);
129
124
  if (typeof optionsOrCb === "function") {
130
125
  this.send(command, optionsOrCb);
131
126
  }
132
127
  else if (typeof cb === "function") {
133
128
  if (typeof optionsOrCb !== "object")
134
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
129
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
135
130
  this.send(command, optionsOrCb || {}, cb);
136
131
  }
137
132
  else {
138
133
  return this.send(command, optionsOrCb);
139
134
  }
140
- };
141
- Synthetics.prototype.disassociateResource = function (args, optionsOrCb, cb) {
142
- var command = new DisassociateResourceCommand(args);
135
+ }
136
+ disassociateResource(args, optionsOrCb, cb) {
137
+ const command = new DisassociateResourceCommand(args);
143
138
  if (typeof optionsOrCb === "function") {
144
139
  this.send(command, optionsOrCb);
145
140
  }
146
141
  else if (typeof cb === "function") {
147
142
  if (typeof optionsOrCb !== "object")
148
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
143
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
149
144
  this.send(command, optionsOrCb || {}, cb);
150
145
  }
151
146
  else {
152
147
  return this.send(command, optionsOrCb);
153
148
  }
154
- };
155
- Synthetics.prototype.getCanary = function (args, optionsOrCb, cb) {
156
- var command = new GetCanaryCommand(args);
149
+ }
150
+ getCanary(args, optionsOrCb, cb) {
151
+ const command = new GetCanaryCommand(args);
157
152
  if (typeof optionsOrCb === "function") {
158
153
  this.send(command, optionsOrCb);
159
154
  }
160
155
  else if (typeof cb === "function") {
161
156
  if (typeof optionsOrCb !== "object")
162
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
157
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
163
158
  this.send(command, optionsOrCb || {}, cb);
164
159
  }
165
160
  else {
166
161
  return this.send(command, optionsOrCb);
167
162
  }
168
- };
169
- Synthetics.prototype.getCanaryRuns = function (args, optionsOrCb, cb) {
170
- var command = new GetCanaryRunsCommand(args);
163
+ }
164
+ getCanaryRuns(args, optionsOrCb, cb) {
165
+ const command = new GetCanaryRunsCommand(args);
171
166
  if (typeof optionsOrCb === "function") {
172
167
  this.send(command, optionsOrCb);
173
168
  }
174
169
  else if (typeof cb === "function") {
175
170
  if (typeof optionsOrCb !== "object")
176
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
171
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
177
172
  this.send(command, optionsOrCb || {}, cb);
178
173
  }
179
174
  else {
180
175
  return this.send(command, optionsOrCb);
181
176
  }
182
- };
183
- Synthetics.prototype.getGroup = function (args, optionsOrCb, cb) {
184
- var command = new GetGroupCommand(args);
177
+ }
178
+ getGroup(args, optionsOrCb, cb) {
179
+ const command = new GetGroupCommand(args);
185
180
  if (typeof optionsOrCb === "function") {
186
181
  this.send(command, optionsOrCb);
187
182
  }
188
183
  else if (typeof cb === "function") {
189
184
  if (typeof optionsOrCb !== "object")
190
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
185
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
191
186
  this.send(command, optionsOrCb || {}, cb);
192
187
  }
193
188
  else {
194
189
  return this.send(command, optionsOrCb);
195
190
  }
196
- };
197
- Synthetics.prototype.listAssociatedGroups = function (args, optionsOrCb, cb) {
198
- var command = new ListAssociatedGroupsCommand(args);
191
+ }
192
+ listAssociatedGroups(args, optionsOrCb, cb) {
193
+ const command = new ListAssociatedGroupsCommand(args);
199
194
  if (typeof optionsOrCb === "function") {
200
195
  this.send(command, optionsOrCb);
201
196
  }
202
197
  else if (typeof cb === "function") {
203
198
  if (typeof optionsOrCb !== "object")
204
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
199
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
205
200
  this.send(command, optionsOrCb || {}, cb);
206
201
  }
207
202
  else {
208
203
  return this.send(command, optionsOrCb);
209
204
  }
210
- };
211
- Synthetics.prototype.listGroupResources = function (args, optionsOrCb, cb) {
212
- var command = new ListGroupResourcesCommand(args);
205
+ }
206
+ listGroupResources(args, optionsOrCb, cb) {
207
+ const command = new ListGroupResourcesCommand(args);
213
208
  if (typeof optionsOrCb === "function") {
214
209
  this.send(command, optionsOrCb);
215
210
  }
216
211
  else if (typeof cb === "function") {
217
212
  if (typeof optionsOrCb !== "object")
218
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
213
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
219
214
  this.send(command, optionsOrCb || {}, cb);
220
215
  }
221
216
  else {
222
217
  return this.send(command, optionsOrCb);
223
218
  }
224
- };
225
- Synthetics.prototype.listGroups = function (args, optionsOrCb, cb) {
226
- var command = new ListGroupsCommand(args);
219
+ }
220
+ listGroups(args, optionsOrCb, cb) {
221
+ const command = new ListGroupsCommand(args);
227
222
  if (typeof optionsOrCb === "function") {
228
223
  this.send(command, optionsOrCb);
229
224
  }
230
225
  else if (typeof cb === "function") {
231
226
  if (typeof optionsOrCb !== "object")
232
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
227
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
233
228
  this.send(command, optionsOrCb || {}, cb);
234
229
  }
235
230
  else {
236
231
  return this.send(command, optionsOrCb);
237
232
  }
238
- };
239
- Synthetics.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
240
- var command = new ListTagsForResourceCommand(args);
233
+ }
234
+ listTagsForResource(args, optionsOrCb, cb) {
235
+ const command = new ListTagsForResourceCommand(args);
241
236
  if (typeof optionsOrCb === "function") {
242
237
  this.send(command, optionsOrCb);
243
238
  }
244
239
  else if (typeof cb === "function") {
245
240
  if (typeof optionsOrCb !== "object")
246
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
241
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
247
242
  this.send(command, optionsOrCb || {}, cb);
248
243
  }
249
244
  else {
250
245
  return this.send(command, optionsOrCb);
251
246
  }
252
- };
253
- Synthetics.prototype.startCanary = function (args, optionsOrCb, cb) {
254
- var command = new StartCanaryCommand(args);
247
+ }
248
+ startCanary(args, optionsOrCb, cb) {
249
+ const command = new StartCanaryCommand(args);
255
250
  if (typeof optionsOrCb === "function") {
256
251
  this.send(command, optionsOrCb);
257
252
  }
258
253
  else if (typeof cb === "function") {
259
254
  if (typeof optionsOrCb !== "object")
260
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
255
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
261
256
  this.send(command, optionsOrCb || {}, cb);
262
257
  }
263
258
  else {
264
259
  return this.send(command, optionsOrCb);
265
260
  }
266
- };
267
- Synthetics.prototype.stopCanary = function (args, optionsOrCb, cb) {
268
- var command = new StopCanaryCommand(args);
261
+ }
262
+ stopCanary(args, optionsOrCb, cb) {
263
+ const command = new StopCanaryCommand(args);
269
264
  if (typeof optionsOrCb === "function") {
270
265
  this.send(command, optionsOrCb);
271
266
  }
272
267
  else if (typeof cb === "function") {
273
268
  if (typeof optionsOrCb !== "object")
274
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
269
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
275
270
  this.send(command, optionsOrCb || {}, cb);
276
271
  }
277
272
  else {
278
273
  return this.send(command, optionsOrCb);
279
274
  }
280
- };
281
- Synthetics.prototype.tagResource = function (args, optionsOrCb, cb) {
282
- var command = new TagResourceCommand(args);
275
+ }
276
+ tagResource(args, optionsOrCb, cb) {
277
+ const command = new TagResourceCommand(args);
283
278
  if (typeof optionsOrCb === "function") {
284
279
  this.send(command, optionsOrCb);
285
280
  }
286
281
  else if (typeof cb === "function") {
287
282
  if (typeof optionsOrCb !== "object")
288
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
283
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
289
284
  this.send(command, optionsOrCb || {}, cb);
290
285
  }
291
286
  else {
292
287
  return this.send(command, optionsOrCb);
293
288
  }
294
- };
295
- Synthetics.prototype.untagResource = function (args, optionsOrCb, cb) {
296
- var command = new UntagResourceCommand(args);
289
+ }
290
+ untagResource(args, optionsOrCb, cb) {
291
+ const command = new UntagResourceCommand(args);
297
292
  if (typeof optionsOrCb === "function") {
298
293
  this.send(command, optionsOrCb);
299
294
  }
300
295
  else if (typeof cb === "function") {
301
296
  if (typeof optionsOrCb !== "object")
302
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
297
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
303
298
  this.send(command, optionsOrCb || {}, cb);
304
299
  }
305
300
  else {
306
301
  return this.send(command, optionsOrCb);
307
302
  }
308
- };
309
- Synthetics.prototype.updateCanary = function (args, optionsOrCb, cb) {
310
- var command = new UpdateCanaryCommand(args);
303
+ }
304
+ updateCanary(args, optionsOrCb, cb) {
305
+ const command = new UpdateCanaryCommand(args);
311
306
  if (typeof optionsOrCb === "function") {
312
307
  this.send(command, optionsOrCb);
313
308
  }
314
309
  else if (typeof cb === "function") {
315
310
  if (typeof optionsOrCb !== "object")
316
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
311
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
317
312
  this.send(command, optionsOrCb || {}, cb);
318
313
  }
319
314
  else {
320
315
  return this.send(command, optionsOrCb);
321
316
  }
322
- };
323
- return Synthetics;
324
- }(SyntheticsClient));
325
- export { Synthetics };
317
+ }
318
+ }