@aws-sdk/client-timestream-write 3.477.0 → 3.481.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 (93) hide show
  1. package/dist-cjs/commands/CreateBatchLoadTaskCommand.js +19 -42
  2. package/dist-cjs/commands/CreateDatabaseCommand.js +19 -42
  3. package/dist-cjs/commands/CreateTableCommand.js +19 -42
  4. package/dist-cjs/commands/DeleteDatabaseCommand.js +19 -42
  5. package/dist-cjs/commands/DeleteTableCommand.js +19 -42
  6. package/dist-cjs/commands/DescribeBatchLoadTaskCommand.js +19 -42
  7. package/dist-cjs/commands/DescribeDatabaseCommand.js +19 -42
  8. package/dist-cjs/commands/DescribeEndpointsCommand.js +18 -41
  9. package/dist-cjs/commands/DescribeTableCommand.js +19 -42
  10. package/dist-cjs/commands/ListBatchLoadTasksCommand.js +19 -42
  11. package/dist-cjs/commands/ListDatabasesCommand.js +19 -42
  12. package/dist-cjs/commands/ListTablesCommand.js +19 -42
  13. package/dist-cjs/commands/ListTagsForResourceCommand.js +19 -42
  14. package/dist-cjs/commands/ResumeBatchLoadTaskCommand.js +19 -42
  15. package/dist-cjs/commands/TagResourceCommand.js +19 -42
  16. package/dist-cjs/commands/UntagResourceCommand.js +19 -42
  17. package/dist-cjs/commands/UpdateDatabaseCommand.js +19 -42
  18. package/dist-cjs/commands/UpdateTableCommand.js +19 -42
  19. package/dist-cjs/commands/WriteRecordsCommand.js +19 -42
  20. package/dist-cjs/endpoint/EndpointParameters.js +7 -1
  21. package/dist-cjs/pagination/ListBatchLoadTasksPaginator.js +2 -24
  22. package/dist-cjs/pagination/ListDatabasesPaginator.js +2 -24
  23. package/dist-cjs/pagination/ListTablesPaginator.js +2 -24
  24. package/dist-es/commands/CreateBatchLoadTaskCommand.js +19 -42
  25. package/dist-es/commands/CreateDatabaseCommand.js +19 -42
  26. package/dist-es/commands/CreateTableCommand.js +19 -42
  27. package/dist-es/commands/DeleteDatabaseCommand.js +19 -42
  28. package/dist-es/commands/DeleteTableCommand.js +19 -42
  29. package/dist-es/commands/DescribeBatchLoadTaskCommand.js +19 -42
  30. package/dist-es/commands/DescribeDatabaseCommand.js +19 -42
  31. package/dist-es/commands/DescribeEndpointsCommand.js +18 -41
  32. package/dist-es/commands/DescribeTableCommand.js +19 -42
  33. package/dist-es/commands/ListBatchLoadTasksCommand.js +19 -42
  34. package/dist-es/commands/ListDatabasesCommand.js +19 -42
  35. package/dist-es/commands/ListTablesCommand.js +19 -42
  36. package/dist-es/commands/ListTagsForResourceCommand.js +19 -42
  37. package/dist-es/commands/ResumeBatchLoadTaskCommand.js +19 -42
  38. package/dist-es/commands/TagResourceCommand.js +19 -42
  39. package/dist-es/commands/UntagResourceCommand.js +19 -42
  40. package/dist-es/commands/UpdateDatabaseCommand.js +19 -42
  41. package/dist-es/commands/UpdateTableCommand.js +19 -42
  42. package/dist-es/commands/WriteRecordsCommand.js +19 -42
  43. package/dist-es/endpoint/EndpointParameters.js +6 -0
  44. package/dist-es/pagination/ListBatchLoadTasksPaginator.js +2 -23
  45. package/dist-es/pagination/ListDatabasesPaginator.js +2 -23
  46. package/dist-es/pagination/ListTablesPaginator.js +2 -23
  47. package/dist-types/commands/CreateBatchLoadTaskCommand.d.ts +6 -21
  48. package/dist-types/commands/CreateDatabaseCommand.d.ts +6 -21
  49. package/dist-types/commands/CreateTableCommand.d.ts +6 -21
  50. package/dist-types/commands/DeleteDatabaseCommand.d.ts +6 -21
  51. package/dist-types/commands/DeleteTableCommand.d.ts +6 -21
  52. package/dist-types/commands/DescribeBatchLoadTaskCommand.d.ts +6 -21
  53. package/dist-types/commands/DescribeDatabaseCommand.d.ts +6 -21
  54. package/dist-types/commands/DescribeEndpointsCommand.d.ts +6 -21
  55. package/dist-types/commands/DescribeTableCommand.d.ts +6 -21
  56. package/dist-types/commands/ListBatchLoadTasksCommand.d.ts +6 -21
  57. package/dist-types/commands/ListDatabasesCommand.d.ts +6 -21
  58. package/dist-types/commands/ListTablesCommand.d.ts +6 -21
  59. package/dist-types/commands/ListTagsForResourceCommand.d.ts +6 -21
  60. package/dist-types/commands/ResumeBatchLoadTaskCommand.d.ts +6 -21
  61. package/dist-types/commands/TagResourceCommand.d.ts +6 -21
  62. package/dist-types/commands/UntagResourceCommand.d.ts +6 -21
  63. package/dist-types/commands/UpdateDatabaseCommand.d.ts +6 -21
  64. package/dist-types/commands/UpdateTableCommand.d.ts +6 -21
  65. package/dist-types/commands/WriteRecordsCommand.d.ts +6 -21
  66. package/dist-types/endpoint/EndpointParameters.d.ts +18 -0
  67. package/dist-types/pagination/ListBatchLoadTasksPaginator.d.ts +1 -1
  68. package/dist-types/pagination/ListDatabasesPaginator.d.ts +1 -1
  69. package/dist-types/pagination/ListTablesPaginator.d.ts +1 -1
  70. package/dist-types/ts3.4/commands/CreateBatchLoadTaskCommand.d.ts +14 -23
  71. package/dist-types/ts3.4/commands/CreateDatabaseCommand.d.ts +14 -23
  72. package/dist-types/ts3.4/commands/CreateTableCommand.d.ts +14 -23
  73. package/dist-types/ts3.4/commands/DeleteDatabaseCommand.d.ts +14 -23
  74. package/dist-types/ts3.4/commands/DeleteTableCommand.d.ts +14 -23
  75. package/dist-types/ts3.4/commands/DescribeBatchLoadTaskCommand.d.ts +12 -24
  76. package/dist-types/ts3.4/commands/DescribeDatabaseCommand.d.ts +14 -23
  77. package/dist-types/ts3.4/commands/DescribeEndpointsCommand.d.ts +14 -23
  78. package/dist-types/ts3.4/commands/DescribeTableCommand.d.ts +14 -23
  79. package/dist-types/ts3.4/commands/ListBatchLoadTasksCommand.d.ts +14 -23
  80. package/dist-types/ts3.4/commands/ListDatabasesCommand.d.ts +14 -23
  81. package/dist-types/ts3.4/commands/ListTablesCommand.d.ts +14 -23
  82. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +14 -23
  83. package/dist-types/ts3.4/commands/ResumeBatchLoadTaskCommand.d.ts +14 -23
  84. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +14 -23
  85. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +14 -23
  86. package/dist-types/ts3.4/commands/UpdateDatabaseCommand.d.ts +14 -23
  87. package/dist-types/ts3.4/commands/UpdateTableCommand.d.ts +14 -23
  88. package/dist-types/ts3.4/commands/WriteRecordsCommand.d.ts +14 -23
  89. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +18 -0
  90. package/dist-types/ts3.4/pagination/ListBatchLoadTasksPaginator.d.ts +3 -3
  91. package/dist-types/ts3.4/pagination/ListDatabasesPaginator.d.ts +3 -3
  92. package/dist-types/ts3.4/pagination/ListTablesPaginator.d.ts +3 -3
  93. package/package.json +11 -10
@@ -2,48 +2,25 @@ import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discove
2
2
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3
3
  import { getSerdePlugin } from "@smithy/middleware-serde";
4
4
  import { Command as $Command } from "@smithy/smithy-client";
5
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { commonParams } from "../endpoint/EndpointParameters";
6
6
  import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_0";
7
7
  export { $Command };
8
- export class UntagResourceCommand extends $Command {
9
- static getEndpointParameterInstructions() {
10
- return {
11
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
- Endpoint: { type: "builtInParams", name: "endpoint" },
13
- Region: { type: "builtInParams", name: "region" },
14
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
- };
16
- }
17
- constructor(input) {
18
- super();
19
- this.input = input;
20
- }
21
- resolveMiddleware(clientStack, configuration, options) {
22
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
- this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions()));
24
- this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
25
- const stack = clientStack.concat(this.middlewareStack);
26
- const { logger } = configuration;
27
- const clientName = "TimestreamWriteClient";
28
- const commandName = "UntagResourceCommand";
29
- const handlerExecutionContext = {
30
- logger,
31
- clientName,
32
- commandName,
33
- inputFilterSensitiveLog: (_) => _,
34
- outputFilterSensitiveLog: (_) => _,
35
- [SMITHY_CONTEXT_KEY]: {
36
- service: "Timestream_20181101",
37
- operation: "UntagResource",
38
- },
39
- };
40
- const { requestHandler } = configuration;
41
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
42
- }
43
- serialize(input, context) {
44
- return se_UntagResourceCommand(input, context);
45
- }
46
- deserialize(output, context) {
47
- return de_UntagResourceCommand(output, context);
48
- }
8
+ export class UntagResourceCommand extends $Command
9
+ .classBuilder()
10
+ .ep({
11
+ ...commonParams,
12
+ })
13
+ .m(function (Command, cs, config, o) {
14
+ return [
15
+ getSerdePlugin(config, this.serialize, this.deserialize),
16
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
17
+ getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
18
+ ];
19
+ })
20
+ .s("Timestream_20181101", "UntagResource", {})
21
+ .n("TimestreamWriteClient", "UntagResourceCommand")
22
+ .f(void 0, void 0)
23
+ .ser(se_UntagResourceCommand)
24
+ .de(de_UntagResourceCommand)
25
+ .build() {
49
26
  }
@@ -2,48 +2,25 @@ import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discove
2
2
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3
3
  import { getSerdePlugin } from "@smithy/middleware-serde";
4
4
  import { Command as $Command } from "@smithy/smithy-client";
5
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { commonParams } from "../endpoint/EndpointParameters";
6
6
  import { de_UpdateDatabaseCommand, se_UpdateDatabaseCommand } from "../protocols/Aws_json1_0";
7
7
  export { $Command };
8
- export class UpdateDatabaseCommand extends $Command {
9
- static getEndpointParameterInstructions() {
10
- return {
11
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
- Endpoint: { type: "builtInParams", name: "endpoint" },
13
- Region: { type: "builtInParams", name: "region" },
14
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
- };
16
- }
17
- constructor(input) {
18
- super();
19
- this.input = input;
20
- }
21
- resolveMiddleware(clientStack, configuration, options) {
22
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
- this.middlewareStack.use(getEndpointPlugin(configuration, UpdateDatabaseCommand.getEndpointParameterInstructions()));
24
- this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
25
- const stack = clientStack.concat(this.middlewareStack);
26
- const { logger } = configuration;
27
- const clientName = "TimestreamWriteClient";
28
- const commandName = "UpdateDatabaseCommand";
29
- const handlerExecutionContext = {
30
- logger,
31
- clientName,
32
- commandName,
33
- inputFilterSensitiveLog: (_) => _,
34
- outputFilterSensitiveLog: (_) => _,
35
- [SMITHY_CONTEXT_KEY]: {
36
- service: "Timestream_20181101",
37
- operation: "UpdateDatabase",
38
- },
39
- };
40
- const { requestHandler } = configuration;
41
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
42
- }
43
- serialize(input, context) {
44
- return se_UpdateDatabaseCommand(input, context);
45
- }
46
- deserialize(output, context) {
47
- return de_UpdateDatabaseCommand(output, context);
48
- }
8
+ export class UpdateDatabaseCommand extends $Command
9
+ .classBuilder()
10
+ .ep({
11
+ ...commonParams,
12
+ })
13
+ .m(function (Command, cs, config, o) {
14
+ return [
15
+ getSerdePlugin(config, this.serialize, this.deserialize),
16
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
17
+ getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
18
+ ];
19
+ })
20
+ .s("Timestream_20181101", "UpdateDatabase", {})
21
+ .n("TimestreamWriteClient", "UpdateDatabaseCommand")
22
+ .f(void 0, void 0)
23
+ .ser(se_UpdateDatabaseCommand)
24
+ .de(de_UpdateDatabaseCommand)
25
+ .build() {
49
26
  }
@@ -2,48 +2,25 @@ import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discove
2
2
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3
3
  import { getSerdePlugin } from "@smithy/middleware-serde";
4
4
  import { Command as $Command } from "@smithy/smithy-client";
5
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { commonParams } from "../endpoint/EndpointParameters";
6
6
  import { de_UpdateTableCommand, se_UpdateTableCommand } from "../protocols/Aws_json1_0";
7
7
  export { $Command };
8
- export class UpdateTableCommand extends $Command {
9
- static getEndpointParameterInstructions() {
10
- return {
11
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
- Endpoint: { type: "builtInParams", name: "endpoint" },
13
- Region: { type: "builtInParams", name: "region" },
14
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
- };
16
- }
17
- constructor(input) {
18
- super();
19
- this.input = input;
20
- }
21
- resolveMiddleware(clientStack, configuration, options) {
22
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
- this.middlewareStack.use(getEndpointPlugin(configuration, UpdateTableCommand.getEndpointParameterInstructions()));
24
- this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
25
- const stack = clientStack.concat(this.middlewareStack);
26
- const { logger } = configuration;
27
- const clientName = "TimestreamWriteClient";
28
- const commandName = "UpdateTableCommand";
29
- const handlerExecutionContext = {
30
- logger,
31
- clientName,
32
- commandName,
33
- inputFilterSensitiveLog: (_) => _,
34
- outputFilterSensitiveLog: (_) => _,
35
- [SMITHY_CONTEXT_KEY]: {
36
- service: "Timestream_20181101",
37
- operation: "UpdateTable",
38
- },
39
- };
40
- const { requestHandler } = configuration;
41
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
42
- }
43
- serialize(input, context) {
44
- return se_UpdateTableCommand(input, context);
45
- }
46
- deserialize(output, context) {
47
- return de_UpdateTableCommand(output, context);
48
- }
8
+ export class UpdateTableCommand extends $Command
9
+ .classBuilder()
10
+ .ep({
11
+ ...commonParams,
12
+ })
13
+ .m(function (Command, cs, config, o) {
14
+ return [
15
+ getSerdePlugin(config, this.serialize, this.deserialize),
16
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
17
+ getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
18
+ ];
19
+ })
20
+ .s("Timestream_20181101", "UpdateTable", {})
21
+ .n("TimestreamWriteClient", "UpdateTableCommand")
22
+ .f(void 0, void 0)
23
+ .ser(se_UpdateTableCommand)
24
+ .de(de_UpdateTableCommand)
25
+ .build() {
49
26
  }
@@ -2,48 +2,25 @@ import { getEndpointDiscoveryPlugin } from "@aws-sdk/middleware-endpoint-discove
2
2
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3
3
  import { getSerdePlugin } from "@smithy/middleware-serde";
4
4
  import { Command as $Command } from "@smithy/smithy-client";
5
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { commonParams } from "../endpoint/EndpointParameters";
6
6
  import { de_WriteRecordsCommand, se_WriteRecordsCommand } from "../protocols/Aws_json1_0";
7
7
  export { $Command };
8
- export class WriteRecordsCommand extends $Command {
9
- static getEndpointParameterInstructions() {
10
- return {
11
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
- Endpoint: { type: "builtInParams", name: "endpoint" },
13
- Region: { type: "builtInParams", name: "region" },
14
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
- };
16
- }
17
- constructor(input) {
18
- super();
19
- this.input = input;
20
- }
21
- resolveMiddleware(clientStack, configuration, options) {
22
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
- this.middlewareStack.use(getEndpointPlugin(configuration, WriteRecordsCommand.getEndpointParameterInstructions()));
24
- this.middlewareStack.use(getEndpointDiscoveryPlugin(configuration, { clientStack, isDiscoveredEndpointRequired: true, options }));
25
- const stack = clientStack.concat(this.middlewareStack);
26
- const { logger } = configuration;
27
- const clientName = "TimestreamWriteClient";
28
- const commandName = "WriteRecordsCommand";
29
- const handlerExecutionContext = {
30
- logger,
31
- clientName,
32
- commandName,
33
- inputFilterSensitiveLog: (_) => _,
34
- outputFilterSensitiveLog: (_) => _,
35
- [SMITHY_CONTEXT_KEY]: {
36
- service: "Timestream_20181101",
37
- operation: "WriteRecords",
38
- },
39
- };
40
- const { requestHandler } = configuration;
41
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
42
- }
43
- serialize(input, context) {
44
- return se_WriteRecordsCommand(input, context);
45
- }
46
- deserialize(output, context) {
47
- return de_WriteRecordsCommand(output, context);
48
- }
8
+ export class WriteRecordsCommand extends $Command
9
+ .classBuilder()
10
+ .ep({
11
+ ...commonParams,
12
+ })
13
+ .m(function (Command, cs, config, o) {
14
+ return [
15
+ getSerdePlugin(config, this.serialize, this.deserialize),
16
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
17
+ getEndpointDiscoveryPlugin(config, { clientStack: cs, isDiscoveredEndpointRequired: true, options: o }),
18
+ ];
19
+ })
20
+ .s("Timestream_20181101", "WriteRecords", {})
21
+ .n("TimestreamWriteClient", "WriteRecordsCommand")
22
+ .f(void 0, void 0)
23
+ .ser(se_WriteRecordsCommand)
24
+ .de(de_WriteRecordsCommand)
25
+ .build() {
49
26
  }
@@ -6,3 +6,9 @@ export const resolveClientEndpointParameters = (options) => {
6
6
  defaultSigningName: "timestream",
7
7
  };
8
8
  };
9
+ export const commonParams = {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListBatchLoadTasksCommand, } from "../commands/ListBatchLoadTasksCommand";
2
3
  import { TimestreamWriteClient } from "../TimestreamWriteClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBatchLoadTasksCommand(input), ...args);
5
- };
6
- export async function* paginateListBatchLoadTasks(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof TimestreamWriteClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected TimestreamWrite | TimestreamWriteClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListBatchLoadTasks = createPaginator(TimestreamWriteClient, ListBatchLoadTasksCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDatabasesCommand, } from "../commands/ListDatabasesCommand";
2
3
  import { TimestreamWriteClient } from "../TimestreamWriteClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDatabasesCommand(input), ...args);
5
- };
6
- export async function* paginateListDatabases(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof TimestreamWriteClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected TimestreamWrite | TimestreamWriteClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListDatabases = createPaginator(TimestreamWriteClient, ListDatabasesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListTablesCommand } from "../commands/ListTablesCommand";
2
3
  import { TimestreamWriteClient } from "../TimestreamWriteClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListTablesCommand(input), ...args);
5
- };
6
- export async function* paginateListTables(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof TimestreamWriteClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected TimestreamWrite | TimestreamWriteClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListTables = createPaginator(TimestreamWriteClient, ListTablesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,6 +1,5 @@
1
- import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
1
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
3
  import { CreateBatchLoadTaskRequest, CreateBatchLoadTaskResponse } from "../models/models_0";
5
4
  import { ServiceInputTypes, ServiceOutputTypes, TimestreamWriteClientResolvedConfig } from "../TimestreamWriteClient";
6
5
  /**
@@ -21,6 +20,10 @@ export interface CreateBatchLoadTaskCommandInput extends CreateBatchLoadTaskRequ
21
20
  */
22
21
  export interface CreateBatchLoadTaskCommandOutput extends CreateBatchLoadTaskResponse, __MetadataBearer {
23
22
  }
23
+ declare const CreateBatchLoadTaskCommand_base: {
24
+ new (input: CreateBatchLoadTaskCommandInput): import("@smithy/smithy-client").CommandImpl<CreateBatchLoadTaskCommandInput, CreateBatchLoadTaskCommandOutput, TimestreamWriteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
26
+ };
24
27
  /**
25
28
  * @public
26
29
  * <p>Creates a new Timestream batch load task. A batch load task processes data from
@@ -155,23 +158,5 @@ export interface CreateBatchLoadTaskCommandOutput extends CreateBatchLoadTaskRes
155
158
  * <p>Base exception class for all service exceptions from TimestreamWrite service.</p>
156
159
  *
157
160
  */
158
- export declare class CreateBatchLoadTaskCommand extends $Command<CreateBatchLoadTaskCommandInput, CreateBatchLoadTaskCommandOutput, TimestreamWriteClientResolvedConfig> {
159
- readonly input: CreateBatchLoadTaskCommandInput;
160
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
161
- /**
162
- * @public
163
- */
164
- constructor(input: CreateBatchLoadTaskCommandInput);
165
- /**
166
- * @internal
167
- */
168
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TimestreamWriteClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateBatchLoadTaskCommandInput, CreateBatchLoadTaskCommandOutput>;
169
- /**
170
- * @internal
171
- */
172
- private serialize;
173
- /**
174
- * @internal
175
- */
176
- private deserialize;
161
+ export declare class CreateBatchLoadTaskCommand extends CreateBatchLoadTaskCommand_base {
177
162
  }
@@ -1,6 +1,5 @@
1
- import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
1
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
3
  import { CreateDatabaseRequest, CreateDatabaseResponse } from "../models/models_0";
5
4
  import { ServiceInputTypes, ServiceOutputTypes, TimestreamWriteClientResolvedConfig } from "../TimestreamWriteClient";
6
5
  /**
@@ -21,6 +20,10 @@ export interface CreateDatabaseCommandInput extends CreateDatabaseRequest {
21
20
  */
22
21
  export interface CreateDatabaseCommandOutput extends CreateDatabaseResponse, __MetadataBearer {
23
22
  }
23
+ declare const CreateDatabaseCommand_base: {
24
+ new (input: CreateDatabaseCommandInput): import("@smithy/smithy-client").CommandImpl<CreateDatabaseCommandInput, CreateDatabaseCommandOutput, TimestreamWriteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
26
+ };
24
27
  /**
25
28
  * @public
26
29
  * <p>Creates a new Timestream database. If the KMS key is not
@@ -93,23 +96,5 @@ export interface CreateDatabaseCommandOutput extends CreateDatabaseResponse, __M
93
96
  * <p>Base exception class for all service exceptions from TimestreamWrite service.</p>
94
97
  *
95
98
  */
96
- export declare class CreateDatabaseCommand extends $Command<CreateDatabaseCommandInput, CreateDatabaseCommandOutput, TimestreamWriteClientResolvedConfig> {
97
- readonly input: CreateDatabaseCommandInput;
98
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
99
- /**
100
- * @public
101
- */
102
- constructor(input: CreateDatabaseCommandInput);
103
- /**
104
- * @internal
105
- */
106
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TimestreamWriteClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateDatabaseCommandInput, CreateDatabaseCommandOutput>;
107
- /**
108
- * @internal
109
- */
110
- private serialize;
111
- /**
112
- * @internal
113
- */
114
- private deserialize;
99
+ export declare class CreateDatabaseCommand extends CreateDatabaseCommand_base {
115
100
  }
@@ -1,6 +1,5 @@
1
- import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
1
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
3
  import { CreateTableRequest, CreateTableResponse } from "../models/models_0";
5
4
  import { ServiceInputTypes, ServiceOutputTypes, TimestreamWriteClientResolvedConfig } from "../TimestreamWriteClient";
6
5
  /**
@@ -21,6 +20,10 @@ export interface CreateTableCommandInput extends CreateTableRequest {
21
20
  */
22
21
  export interface CreateTableCommandOutput extends CreateTableResponse, __MetadataBearer {
23
22
  }
23
+ declare const CreateTableCommand_base: {
24
+ new (input: CreateTableCommandInput): import("@smithy/smithy-client").CommandImpl<CreateTableCommandInput, CreateTableCommandOutput, TimestreamWriteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
26
+ };
24
27
  /**
25
28
  * @public
26
29
  * <p>Adds a new table to an existing database in your account. In an Amazon Web Services account, table names must be at least unique within each Region if they are in the same
@@ -147,23 +150,5 @@ export interface CreateTableCommandOutput extends CreateTableResponse, __Metadat
147
150
  * <p>Base exception class for all service exceptions from TimestreamWrite service.</p>
148
151
  *
149
152
  */
150
- export declare class CreateTableCommand extends $Command<CreateTableCommandInput, CreateTableCommandOutput, TimestreamWriteClientResolvedConfig> {
151
- readonly input: CreateTableCommandInput;
152
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
153
- /**
154
- * @public
155
- */
156
- constructor(input: CreateTableCommandInput);
157
- /**
158
- * @internal
159
- */
160
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TimestreamWriteClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateTableCommandInput, CreateTableCommandOutput>;
161
- /**
162
- * @internal
163
- */
164
- private serialize;
165
- /**
166
- * @internal
167
- */
168
- private deserialize;
153
+ export declare class CreateTableCommand extends CreateTableCommand_base {
169
154
  }
@@ -1,6 +1,5 @@
1
- import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
1
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
3
  import { DeleteDatabaseRequest } from "../models/models_0";
5
4
  import { ServiceInputTypes, ServiceOutputTypes, TimestreamWriteClientResolvedConfig } from "../TimestreamWriteClient";
6
5
  /**
@@ -21,6 +20,10 @@ export interface DeleteDatabaseCommandInput extends DeleteDatabaseRequest {
21
20
  */
22
21
  export interface DeleteDatabaseCommandOutput extends __MetadataBearer {
23
22
  }
23
+ declare const DeleteDatabaseCommand_base: {
24
+ new (input: DeleteDatabaseCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteDatabaseCommandInput, DeleteDatabaseCommandOutput, TimestreamWriteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
26
+ };
24
27
  /**
25
28
  * @public
26
29
  * <p>Deletes a given Timestream database. <i>This is an irreversible
@@ -82,23 +85,5 @@ export interface DeleteDatabaseCommandOutput extends __MetadataBearer {
82
85
  * <p>Base exception class for all service exceptions from TimestreamWrite service.</p>
83
86
  *
84
87
  */
85
- export declare class DeleteDatabaseCommand extends $Command<DeleteDatabaseCommandInput, DeleteDatabaseCommandOutput, TimestreamWriteClientResolvedConfig> {
86
- readonly input: DeleteDatabaseCommandInput;
87
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
88
- /**
89
- * @public
90
- */
91
- constructor(input: DeleteDatabaseCommandInput);
92
- /**
93
- * @internal
94
- */
95
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TimestreamWriteClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteDatabaseCommandInput, DeleteDatabaseCommandOutput>;
96
- /**
97
- * @internal
98
- */
99
- private serialize;
100
- /**
101
- * @internal
102
- */
103
- private deserialize;
88
+ export declare class DeleteDatabaseCommand extends DeleteDatabaseCommand_base {
104
89
  }
@@ -1,6 +1,5 @@
1
- import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
1
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
3
  import { DeleteTableRequest } from "../models/models_0";
5
4
  import { ServiceInputTypes, ServiceOutputTypes, TimestreamWriteClientResolvedConfig } from "../TimestreamWriteClient";
6
5
  /**
@@ -21,6 +20,10 @@ export interface DeleteTableCommandInput extends DeleteTableRequest {
21
20
  */
22
21
  export interface DeleteTableCommandOutput extends __MetadataBearer {
23
22
  }
23
+ declare const DeleteTableCommand_base: {
24
+ new (input: DeleteTableCommandInput): import("@smithy/smithy-client").CommandImpl<DeleteTableCommandInput, DeleteTableCommandOutput, TimestreamWriteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
26
+ };
24
27
  /**
25
28
  * @public
26
29
  * <p>Deletes a given Timestream table. This is an irreversible operation. After a
@@ -80,23 +83,5 @@ export interface DeleteTableCommandOutput extends __MetadataBearer {
80
83
  * <p>Base exception class for all service exceptions from TimestreamWrite service.</p>
81
84
  *
82
85
  */
83
- export declare class DeleteTableCommand extends $Command<DeleteTableCommandInput, DeleteTableCommandOutput, TimestreamWriteClientResolvedConfig> {
84
- readonly input: DeleteTableCommandInput;
85
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
86
- /**
87
- * @public
88
- */
89
- constructor(input: DeleteTableCommandInput);
90
- /**
91
- * @internal
92
- */
93
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TimestreamWriteClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DeleteTableCommandInput, DeleteTableCommandOutput>;
94
- /**
95
- * @internal
96
- */
97
- private serialize;
98
- /**
99
- * @internal
100
- */
101
- private deserialize;
86
+ export declare class DeleteTableCommand extends DeleteTableCommand_base {
102
87
  }
@@ -1,6 +1,5 @@
1
- import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
1
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4
3
  import { DescribeBatchLoadTaskRequest, DescribeBatchLoadTaskResponse } from "../models/models_0";
5
4
  import { ServiceInputTypes, ServiceOutputTypes, TimestreamWriteClientResolvedConfig } from "../TimestreamWriteClient";
6
5
  /**
@@ -21,6 +20,10 @@ export interface DescribeBatchLoadTaskCommandInput extends DescribeBatchLoadTask
21
20
  */
22
21
  export interface DescribeBatchLoadTaskCommandOutput extends DescribeBatchLoadTaskResponse, __MetadataBearer {
23
22
  }
23
+ declare const DescribeBatchLoadTaskCommand_base: {
24
+ new (input: DescribeBatchLoadTaskCommandInput): import("@smithy/smithy-client").CommandImpl<DescribeBatchLoadTaskCommandInput, DescribeBatchLoadTaskCommandOutput, TimestreamWriteClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
26
+ };
24
27
  /**
25
28
  * @public
26
29
  * <p>Returns information about the batch load task, including configurations, mappings,
@@ -155,23 +158,5 @@ export interface DescribeBatchLoadTaskCommandOutput extends DescribeBatchLoadTas
155
158
  * <p>Base exception class for all service exceptions from TimestreamWrite service.</p>
156
159
  *
157
160
  */
158
- export declare class DescribeBatchLoadTaskCommand extends $Command<DescribeBatchLoadTaskCommandInput, DescribeBatchLoadTaskCommandOutput, TimestreamWriteClientResolvedConfig> {
159
- readonly input: DescribeBatchLoadTaskCommandInput;
160
- static getEndpointParameterInstructions(): EndpointParameterInstructions;
161
- /**
162
- * @public
163
- */
164
- constructor(input: DescribeBatchLoadTaskCommandInput);
165
- /**
166
- * @internal
167
- */
168
- resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TimestreamWriteClientResolvedConfig, options?: __HttpHandlerOptions): Handler<DescribeBatchLoadTaskCommandInput, DescribeBatchLoadTaskCommandOutput>;
169
- /**
170
- * @internal
171
- */
172
- private serialize;
173
- /**
174
- * @internal
175
- */
176
- private deserialize;
161
+ export declare class DescribeBatchLoadTaskCommand extends DescribeBatchLoadTaskCommand_base {
177
162
  }