@aws-sdk/client-timestream-write 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.
- package/CHANGELOG.md +20 -0
- package/dist-cjs/protocols/Aws_json1_0.js +21 -15
- package/dist-es/TimestreamWrite.js +62 -69
- package/dist-es/TimestreamWriteClient.js +23 -29
- package/dist-es/commands/CreateDatabaseCommand.js +22 -29
- package/dist-es/commands/CreateTableCommand.js +22 -29
- package/dist-es/commands/DeleteDatabaseCommand.js +23 -30
- package/dist-es/commands/DeleteTableCommand.js +23 -30
- package/dist-es/commands/DescribeDatabaseCommand.js +22 -29
- package/dist-es/commands/DescribeEndpointsCommand.js +21 -28
- package/dist-es/commands/DescribeTableCommand.js +22 -29
- package/dist-es/commands/ListDatabasesCommand.js +22 -29
- package/dist-es/commands/ListTablesCommand.js +22 -29
- package/dist-es/commands/ListTagsForResourceCommand.js +22 -29
- package/dist-es/commands/TagResourceCommand.js +22 -29
- package/dist-es/commands/UntagResourceCommand.js +22 -29
- package/dist-es/commands/UpdateDatabaseCommand.js +22 -29
- package/dist-es/commands/UpdateTableCommand.js +22 -29
- package/dist-es/commands/WriteRecordsCommand.js +22 -29
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/TimestreamWriteServiceException.js +5 -10
- package/dist-es/models/models_0.js +232 -151
- package/dist-es/pagination/ListDatabasesPaginator.js +25 -68
- package/dist-es/pagination/ListTablesPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_0.js +1175 -1483
- package/dist-es/runtimeConfig.browser.js +27 -12
- package/dist-es/runtimeConfig.js +31 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +34 -34
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-timestream-write
|
|
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-timestream-write
|
|
@@ -172,7 +172,7 @@ exports.deserializeAws_json1_0CreateDatabaseCommand = deserializeAws_json1_0Crea
|
|
|
172
172
|
const deserializeAws_json1_0CreateDatabaseCommandError = async (output, context) => {
|
|
173
173
|
const parsedOutput = {
|
|
174
174
|
...output,
|
|
175
|
-
body: await
|
|
175
|
+
body: await parseErrorBody(output.body, context),
|
|
176
176
|
};
|
|
177
177
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
178
178
|
switch (errorCode) {
|
|
@@ -224,7 +224,7 @@ exports.deserializeAws_json1_0CreateTableCommand = deserializeAws_json1_0CreateT
|
|
|
224
224
|
const deserializeAws_json1_0CreateTableCommandError = async (output, context) => {
|
|
225
225
|
const parsedOutput = {
|
|
226
226
|
...output,
|
|
227
|
-
body: await
|
|
227
|
+
body: await parseErrorBody(output.body, context),
|
|
228
228
|
};
|
|
229
229
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
230
230
|
switch (errorCode) {
|
|
@@ -276,7 +276,7 @@ exports.deserializeAws_json1_0DeleteDatabaseCommand = deserializeAws_json1_0Dele
|
|
|
276
276
|
const deserializeAws_json1_0DeleteDatabaseCommandError = async (output, context) => {
|
|
277
277
|
const parsedOutput = {
|
|
278
278
|
...output,
|
|
279
|
-
body: await
|
|
279
|
+
body: await parseErrorBody(output.body, context),
|
|
280
280
|
};
|
|
281
281
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
282
282
|
switch (errorCode) {
|
|
@@ -322,7 +322,7 @@ exports.deserializeAws_json1_0DeleteTableCommand = deserializeAws_json1_0DeleteT
|
|
|
322
322
|
const deserializeAws_json1_0DeleteTableCommandError = async (output, context) => {
|
|
323
323
|
const parsedOutput = {
|
|
324
324
|
...output,
|
|
325
|
-
body: await
|
|
325
|
+
body: await parseErrorBody(output.body, context),
|
|
326
326
|
};
|
|
327
327
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
328
328
|
switch (errorCode) {
|
|
@@ -371,7 +371,7 @@ exports.deserializeAws_json1_0DescribeDatabaseCommand = deserializeAws_json1_0De
|
|
|
371
371
|
const deserializeAws_json1_0DescribeDatabaseCommandError = async (output, context) => {
|
|
372
372
|
const parsedOutput = {
|
|
373
373
|
...output,
|
|
374
|
-
body: await
|
|
374
|
+
body: await parseErrorBody(output.body, context),
|
|
375
375
|
};
|
|
376
376
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
377
377
|
switch (errorCode) {
|
|
@@ -420,7 +420,7 @@ exports.deserializeAws_json1_0DescribeEndpointsCommand = deserializeAws_json1_0D
|
|
|
420
420
|
const deserializeAws_json1_0DescribeEndpointsCommandError = async (output, context) => {
|
|
421
421
|
const parsedOutput = {
|
|
422
422
|
...output,
|
|
423
|
-
body: await
|
|
423
|
+
body: await parseErrorBody(output.body, context),
|
|
424
424
|
};
|
|
425
425
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
426
426
|
switch (errorCode) {
|
|
@@ -460,7 +460,7 @@ exports.deserializeAws_json1_0DescribeTableCommand = deserializeAws_json1_0Descr
|
|
|
460
460
|
const deserializeAws_json1_0DescribeTableCommandError = async (output, context) => {
|
|
461
461
|
const parsedOutput = {
|
|
462
462
|
...output,
|
|
463
|
-
body: await
|
|
463
|
+
body: await parseErrorBody(output.body, context),
|
|
464
464
|
};
|
|
465
465
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
466
466
|
switch (errorCode) {
|
|
@@ -509,7 +509,7 @@ exports.deserializeAws_json1_0ListDatabasesCommand = deserializeAws_json1_0ListD
|
|
|
509
509
|
const deserializeAws_json1_0ListDatabasesCommandError = async (output, context) => {
|
|
510
510
|
const parsedOutput = {
|
|
511
511
|
...output,
|
|
512
|
-
body: await
|
|
512
|
+
body: await parseErrorBody(output.body, context),
|
|
513
513
|
};
|
|
514
514
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
515
515
|
switch (errorCode) {
|
|
@@ -555,7 +555,7 @@ exports.deserializeAws_json1_0ListTablesCommand = deserializeAws_json1_0ListTabl
|
|
|
555
555
|
const deserializeAws_json1_0ListTablesCommandError = async (output, context) => {
|
|
556
556
|
const parsedOutput = {
|
|
557
557
|
...output,
|
|
558
|
-
body: await
|
|
558
|
+
body: await parseErrorBody(output.body, context),
|
|
559
559
|
};
|
|
560
560
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
561
561
|
switch (errorCode) {
|
|
@@ -604,7 +604,7 @@ exports.deserializeAws_json1_0ListTagsForResourceCommand = deserializeAws_json1_
|
|
|
604
604
|
const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
|
|
605
605
|
const parsedOutput = {
|
|
606
606
|
...output,
|
|
607
|
-
body: await
|
|
607
|
+
body: await parseErrorBody(output.body, context),
|
|
608
608
|
};
|
|
609
609
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
610
610
|
switch (errorCode) {
|
|
@@ -647,7 +647,7 @@ exports.deserializeAws_json1_0TagResourceCommand = deserializeAws_json1_0TagReso
|
|
|
647
647
|
const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
|
|
648
648
|
const parsedOutput = {
|
|
649
649
|
...output,
|
|
650
|
-
body: await
|
|
650
|
+
body: await parseErrorBody(output.body, context),
|
|
651
651
|
};
|
|
652
652
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
653
653
|
switch (errorCode) {
|
|
@@ -693,7 +693,7 @@ exports.deserializeAws_json1_0UntagResourceCommand = deserializeAws_json1_0Untag
|
|
|
693
693
|
const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
|
|
694
694
|
const parsedOutput = {
|
|
695
695
|
...output,
|
|
696
|
-
body: await
|
|
696
|
+
body: await parseErrorBody(output.body, context),
|
|
697
697
|
};
|
|
698
698
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
699
699
|
switch (errorCode) {
|
|
@@ -739,7 +739,7 @@ exports.deserializeAws_json1_0UpdateDatabaseCommand = deserializeAws_json1_0Upda
|
|
|
739
739
|
const deserializeAws_json1_0UpdateDatabaseCommandError = async (output, context) => {
|
|
740
740
|
const parsedOutput = {
|
|
741
741
|
...output,
|
|
742
|
-
body: await
|
|
742
|
+
body: await parseErrorBody(output.body, context),
|
|
743
743
|
};
|
|
744
744
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
745
745
|
switch (errorCode) {
|
|
@@ -791,7 +791,7 @@ exports.deserializeAws_json1_0UpdateTableCommand = deserializeAws_json1_0UpdateT
|
|
|
791
791
|
const deserializeAws_json1_0UpdateTableCommandError = async (output, context) => {
|
|
792
792
|
const parsedOutput = {
|
|
793
793
|
...output,
|
|
794
|
-
body: await
|
|
794
|
+
body: await parseErrorBody(output.body, context),
|
|
795
795
|
};
|
|
796
796
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
797
797
|
switch (errorCode) {
|
|
@@ -840,7 +840,7 @@ exports.deserializeAws_json1_0WriteRecordsCommand = deserializeAws_json1_0WriteR
|
|
|
840
840
|
const deserializeAws_json1_0WriteRecordsCommandError = async (output, context) => {
|
|
841
841
|
const parsedOutput = {
|
|
842
842
|
...output,
|
|
843
|
-
body: await
|
|
843
|
+
body: await parseErrorBody(output.body, context),
|
|
844
844
|
};
|
|
845
845
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
846
846
|
switch (errorCode) {
|
|
@@ -1458,6 +1458,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1458
1458
|
}
|
|
1459
1459
|
return {};
|
|
1460
1460
|
});
|
|
1461
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1462
|
+
var _a;
|
|
1463
|
+
const value = await parseBody(errorBody, context);
|
|
1464
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1465
|
+
return value;
|
|
1466
|
+
};
|
|
1461
1467
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1462
1468
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1463
1469
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { CreateDatabaseCommand, } from "./commands/CreateDatabaseCommand";
|
|
3
2
|
import { CreateTableCommand } from "./commands/CreateTableCommand";
|
|
4
3
|
import { DeleteDatabaseCommand, } from "./commands/DeleteDatabaseCommand";
|
|
@@ -15,221 +14,215 @@ import { UpdateDatabaseCommand, } from "./commands/UpdateDatabaseCommand";
|
|
|
15
14
|
import { UpdateTableCommand } from "./commands/UpdateTableCommand";
|
|
16
15
|
import { WriteRecordsCommand, } from "./commands/WriteRecordsCommand";
|
|
17
16
|
import { TimestreamWriteClient } from "./TimestreamWriteClient";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
-
}
|
|
23
|
-
TimestreamWrite.prototype.createDatabase = function (args, optionsOrCb, cb) {
|
|
24
|
-
var command = new CreateDatabaseCommand(args);
|
|
17
|
+
export class TimestreamWrite extends TimestreamWriteClient {
|
|
18
|
+
createDatabase(args, optionsOrCb, cb) {
|
|
19
|
+
const command = new CreateDatabaseCommand(args);
|
|
25
20
|
if (typeof optionsOrCb === "function") {
|
|
26
21
|
this.send(command, optionsOrCb);
|
|
27
22
|
}
|
|
28
23
|
else if (typeof cb === "function") {
|
|
29
24
|
if (typeof optionsOrCb !== "object")
|
|
30
|
-
throw new Error(
|
|
25
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
31
26
|
this.send(command, optionsOrCb || {}, cb);
|
|
32
27
|
}
|
|
33
28
|
else {
|
|
34
29
|
return this.send(command, optionsOrCb);
|
|
35
30
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
}
|
|
32
|
+
createTable(args, optionsOrCb, cb) {
|
|
33
|
+
const command = new CreateTableCommand(args);
|
|
39
34
|
if (typeof optionsOrCb === "function") {
|
|
40
35
|
this.send(command, optionsOrCb);
|
|
41
36
|
}
|
|
42
37
|
else if (typeof cb === "function") {
|
|
43
38
|
if (typeof optionsOrCb !== "object")
|
|
44
|
-
throw new Error(
|
|
39
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
45
40
|
this.send(command, optionsOrCb || {}, cb);
|
|
46
41
|
}
|
|
47
42
|
else {
|
|
48
43
|
return this.send(command, optionsOrCb);
|
|
49
44
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
}
|
|
46
|
+
deleteDatabase(args, optionsOrCb, cb) {
|
|
47
|
+
const command = new DeleteDatabaseCommand(args);
|
|
53
48
|
if (typeof optionsOrCb === "function") {
|
|
54
49
|
this.send(command, optionsOrCb);
|
|
55
50
|
}
|
|
56
51
|
else if (typeof cb === "function") {
|
|
57
52
|
if (typeof optionsOrCb !== "object")
|
|
58
|
-
throw new Error(
|
|
53
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
59
54
|
this.send(command, optionsOrCb || {}, cb);
|
|
60
55
|
}
|
|
61
56
|
else {
|
|
62
57
|
return this.send(command, optionsOrCb);
|
|
63
58
|
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
}
|
|
60
|
+
deleteTable(args, optionsOrCb, cb) {
|
|
61
|
+
const command = new DeleteTableCommand(args);
|
|
67
62
|
if (typeof optionsOrCb === "function") {
|
|
68
63
|
this.send(command, optionsOrCb);
|
|
69
64
|
}
|
|
70
65
|
else if (typeof cb === "function") {
|
|
71
66
|
if (typeof optionsOrCb !== "object")
|
|
72
|
-
throw new Error(
|
|
67
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
73
68
|
this.send(command, optionsOrCb || {}, cb);
|
|
74
69
|
}
|
|
75
70
|
else {
|
|
76
71
|
return this.send(command, optionsOrCb);
|
|
77
72
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
}
|
|
74
|
+
describeDatabase(args, optionsOrCb, cb) {
|
|
75
|
+
const command = new DescribeDatabaseCommand(args);
|
|
81
76
|
if (typeof optionsOrCb === "function") {
|
|
82
77
|
this.send(command, optionsOrCb);
|
|
83
78
|
}
|
|
84
79
|
else if (typeof cb === "function") {
|
|
85
80
|
if (typeof optionsOrCb !== "object")
|
|
86
|
-
throw new Error(
|
|
81
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
87
82
|
this.send(command, optionsOrCb || {}, cb);
|
|
88
83
|
}
|
|
89
84
|
else {
|
|
90
85
|
return this.send(command, optionsOrCb);
|
|
91
86
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
}
|
|
88
|
+
describeEndpoints(args, optionsOrCb, cb) {
|
|
89
|
+
const command = new DescribeEndpointsCommand(args);
|
|
95
90
|
if (typeof optionsOrCb === "function") {
|
|
96
91
|
this.send(command, optionsOrCb);
|
|
97
92
|
}
|
|
98
93
|
else if (typeof cb === "function") {
|
|
99
94
|
if (typeof optionsOrCb !== "object")
|
|
100
|
-
throw new Error(
|
|
95
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
101
96
|
this.send(command, optionsOrCb || {}, cb);
|
|
102
97
|
}
|
|
103
98
|
else {
|
|
104
99
|
return this.send(command, optionsOrCb);
|
|
105
100
|
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
}
|
|
102
|
+
describeTable(args, optionsOrCb, cb) {
|
|
103
|
+
const command = new DescribeTableCommand(args);
|
|
109
104
|
if (typeof optionsOrCb === "function") {
|
|
110
105
|
this.send(command, optionsOrCb);
|
|
111
106
|
}
|
|
112
107
|
else if (typeof cb === "function") {
|
|
113
108
|
if (typeof optionsOrCb !== "object")
|
|
114
|
-
throw new Error(
|
|
109
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
115
110
|
this.send(command, optionsOrCb || {}, cb);
|
|
116
111
|
}
|
|
117
112
|
else {
|
|
118
113
|
return this.send(command, optionsOrCb);
|
|
119
114
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
115
|
+
}
|
|
116
|
+
listDatabases(args, optionsOrCb, cb) {
|
|
117
|
+
const command = new ListDatabasesCommand(args);
|
|
123
118
|
if (typeof optionsOrCb === "function") {
|
|
124
119
|
this.send(command, optionsOrCb);
|
|
125
120
|
}
|
|
126
121
|
else if (typeof cb === "function") {
|
|
127
122
|
if (typeof optionsOrCb !== "object")
|
|
128
|
-
throw new Error(
|
|
123
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
129
124
|
this.send(command, optionsOrCb || {}, cb);
|
|
130
125
|
}
|
|
131
126
|
else {
|
|
132
127
|
return this.send(command, optionsOrCb);
|
|
133
128
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
}
|
|
130
|
+
listTables(args, optionsOrCb, cb) {
|
|
131
|
+
const command = new ListTablesCommand(args);
|
|
137
132
|
if (typeof optionsOrCb === "function") {
|
|
138
133
|
this.send(command, optionsOrCb);
|
|
139
134
|
}
|
|
140
135
|
else if (typeof cb === "function") {
|
|
141
136
|
if (typeof optionsOrCb !== "object")
|
|
142
|
-
throw new Error(
|
|
137
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
143
138
|
this.send(command, optionsOrCb || {}, cb);
|
|
144
139
|
}
|
|
145
140
|
else {
|
|
146
141
|
return this.send(command, optionsOrCb);
|
|
147
142
|
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
143
|
+
}
|
|
144
|
+
listTagsForResource(args, optionsOrCb, cb) {
|
|
145
|
+
const command = new ListTagsForResourceCommand(args);
|
|
151
146
|
if (typeof optionsOrCb === "function") {
|
|
152
147
|
this.send(command, optionsOrCb);
|
|
153
148
|
}
|
|
154
149
|
else if (typeof cb === "function") {
|
|
155
150
|
if (typeof optionsOrCb !== "object")
|
|
156
|
-
throw new Error(
|
|
151
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
157
152
|
this.send(command, optionsOrCb || {}, cb);
|
|
158
153
|
}
|
|
159
154
|
else {
|
|
160
155
|
return this.send(command, optionsOrCb);
|
|
161
156
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
157
|
+
}
|
|
158
|
+
tagResource(args, optionsOrCb, cb) {
|
|
159
|
+
const command = new TagResourceCommand(args);
|
|
165
160
|
if (typeof optionsOrCb === "function") {
|
|
166
161
|
this.send(command, optionsOrCb);
|
|
167
162
|
}
|
|
168
163
|
else if (typeof cb === "function") {
|
|
169
164
|
if (typeof optionsOrCb !== "object")
|
|
170
|
-
throw new Error(
|
|
165
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
171
166
|
this.send(command, optionsOrCb || {}, cb);
|
|
172
167
|
}
|
|
173
168
|
else {
|
|
174
169
|
return this.send(command, optionsOrCb);
|
|
175
170
|
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
}
|
|
172
|
+
untagResource(args, optionsOrCb, cb) {
|
|
173
|
+
const command = new UntagResourceCommand(args);
|
|
179
174
|
if (typeof optionsOrCb === "function") {
|
|
180
175
|
this.send(command, optionsOrCb);
|
|
181
176
|
}
|
|
182
177
|
else if (typeof cb === "function") {
|
|
183
178
|
if (typeof optionsOrCb !== "object")
|
|
184
|
-
throw new Error(
|
|
179
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
185
180
|
this.send(command, optionsOrCb || {}, cb);
|
|
186
181
|
}
|
|
187
182
|
else {
|
|
188
183
|
return this.send(command, optionsOrCb);
|
|
189
184
|
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
185
|
+
}
|
|
186
|
+
updateDatabase(args, optionsOrCb, cb) {
|
|
187
|
+
const command = new UpdateDatabaseCommand(args);
|
|
193
188
|
if (typeof optionsOrCb === "function") {
|
|
194
189
|
this.send(command, optionsOrCb);
|
|
195
190
|
}
|
|
196
191
|
else if (typeof cb === "function") {
|
|
197
192
|
if (typeof optionsOrCb !== "object")
|
|
198
|
-
throw new Error(
|
|
193
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
199
194
|
this.send(command, optionsOrCb || {}, cb);
|
|
200
195
|
}
|
|
201
196
|
else {
|
|
202
197
|
return this.send(command, optionsOrCb);
|
|
203
198
|
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
199
|
+
}
|
|
200
|
+
updateTable(args, optionsOrCb, cb) {
|
|
201
|
+
const command = new UpdateTableCommand(args);
|
|
207
202
|
if (typeof optionsOrCb === "function") {
|
|
208
203
|
this.send(command, optionsOrCb);
|
|
209
204
|
}
|
|
210
205
|
else if (typeof cb === "function") {
|
|
211
206
|
if (typeof optionsOrCb !== "object")
|
|
212
|
-
throw new Error(
|
|
207
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
213
208
|
this.send(command, optionsOrCb || {}, cb);
|
|
214
209
|
}
|
|
215
210
|
else {
|
|
216
211
|
return this.send(command, optionsOrCb);
|
|
217
212
|
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
213
|
+
}
|
|
214
|
+
writeRecords(args, optionsOrCb, cb) {
|
|
215
|
+
const command = new WriteRecordsCommand(args);
|
|
221
216
|
if (typeof optionsOrCb === "function") {
|
|
222
217
|
this.send(command, optionsOrCb);
|
|
223
218
|
}
|
|
224
219
|
else if (typeof cb === "function") {
|
|
225
220
|
if (typeof optionsOrCb !== "object")
|
|
226
|
-
throw new Error(
|
|
221
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
227
222
|
this.send(command, optionsOrCb || {}, cb);
|
|
228
223
|
}
|
|
229
224
|
else {
|
|
230
225
|
return this.send(command, optionsOrCb);
|
|
231
226
|
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
}(TimestreamWriteClient));
|
|
235
|
-
export { TimestreamWrite };
|
|
227
|
+
}
|
|
228
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
|
|
3
2
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
3
|
import { resolveEndpointDiscoveryConfig, } from "@aws-sdk/middleware-endpoint-discovery";
|
|
@@ -11,34 +10,29 @@ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware
|
|
|
11
10
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
12
11
|
import { DescribeEndpointsCommand, } from "./commands/DescribeEndpointsCommand";
|
|
13
12
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var _config_6 = resolveUserAgentConfig(_config_5);
|
|
25
|
-
var _config_7 = resolveEndpointDiscoveryConfig(_config_6, {
|
|
13
|
+
export class TimestreamWriteClient extends __Client {
|
|
14
|
+
constructor(configuration) {
|
|
15
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
16
|
+
const _config_1 = resolveRegionConfig(_config_0);
|
|
17
|
+
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
18
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
19
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
20
|
+
const _config_5 = resolveAwsAuthConfig(_config_4);
|
|
21
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
22
|
+
const _config_7 = resolveEndpointDiscoveryConfig(_config_6, {
|
|
26
23
|
endpointDiscoveryCommandCtor: DescribeEndpointsCommand,
|
|
27
24
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return _this;
|
|
25
|
+
super(_config_7);
|
|
26
|
+
this.config = _config_7;
|
|
27
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
28
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
29
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
30
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
31
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
38
34
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
}(__Client));
|
|
44
|
-
export { TimestreamWriteClient };
|
|
35
|
+
destroy() {
|
|
36
|
+
super.destroy();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discovery";
|
|
3
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
5
4
|
import { CreateDatabaseRequestFilterSensitiveLog, CreateDatabaseResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
5
|
import { deserializeAws_json1_0CreateDatabaseCommand, serializeAws_json1_0CreateDatabaseCommand, } from "../protocols/Aws_json1_0";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_this.input = input;
|
|
12
|
-
return _this;
|
|
6
|
+
export class CreateDatabaseCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
13
10
|
}
|
|
14
|
-
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
12
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
-
this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
logger
|
|
23
|
-
clientName
|
|
24
|
-
commandName
|
|
13
|
+
this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, options, isDiscoveredEndpointRequired: true }));
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = "TimestreamWriteClient";
|
|
17
|
+
const commandName = "CreateDatabaseCommand";
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
25
22
|
inputFilterSensitiveLog: CreateDatabaseRequestFilterSensitiveLog,
|
|
26
23
|
outputFilterSensitiveLog: CreateDatabaseResponseFilterSensitiveLog,
|
|
27
24
|
};
|
|
28
|
-
|
|
29
|
-
return stack.resolve(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
CreateDatabaseCommand.prototype.serialize = function (input, context) {
|
|
25
|
+
const { requestHandler } = configuration;
|
|
26
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
27
|
+
}
|
|
28
|
+
serialize(input, context) {
|
|
34
29
|
return serializeAws_json1_0CreateDatabaseCommand(input, context);
|
|
35
|
-
}
|
|
36
|
-
|
|
30
|
+
}
|
|
31
|
+
deserialize(output, context) {
|
|
37
32
|
return deserializeAws_json1_0CreateDatabaseCommand(output, context);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}($Command));
|
|
41
|
-
export { CreateDatabaseCommand };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discovery";
|
|
3
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
5
4
|
import { CreateTableRequestFilterSensitiveLog, CreateTableResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
5
|
import { deserializeAws_json1_0CreateTableCommand, serializeAws_json1_0CreateTableCommand, } from "../protocols/Aws_json1_0";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_this.input = input;
|
|
12
|
-
return _this;
|
|
6
|
+
export class CreateTableCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
13
10
|
}
|
|
14
|
-
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
12
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
-
this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
logger
|
|
23
|
-
clientName
|
|
24
|
-
commandName
|
|
13
|
+
this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, options, isDiscoveredEndpointRequired: true }));
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = "TimestreamWriteClient";
|
|
17
|
+
const commandName = "CreateTableCommand";
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
25
22
|
inputFilterSensitiveLog: CreateTableRequestFilterSensitiveLog,
|
|
26
23
|
outputFilterSensitiveLog: CreateTableResponseFilterSensitiveLog,
|
|
27
24
|
};
|
|
28
|
-
|
|
29
|
-
return stack.resolve(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
CreateTableCommand.prototype.serialize = function (input, context) {
|
|
25
|
+
const { requestHandler } = configuration;
|
|
26
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
27
|
+
}
|
|
28
|
+
serialize(input, context) {
|
|
34
29
|
return serializeAws_json1_0CreateTableCommand(input, context);
|
|
35
|
-
}
|
|
36
|
-
|
|
30
|
+
}
|
|
31
|
+
deserialize(output, context) {
|
|
37
32
|
return deserializeAws_json1_0CreateTableCommand(output, context);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}($Command));
|
|
41
|
-
export { CreateTableCommand };
|
|
33
|
+
}
|
|
34
|
+
}
|