@aws-sdk/client-scheduler 3.476.0 → 3.478.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.
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListScheduleGroups = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListScheduleGroupsCommand_1 = require("../commands/ListScheduleGroupsCommand");
5
6
  const SchedulerClient_1 = require("../SchedulerClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListScheduleGroupsCommand_1.ListScheduleGroupsCommand(input), ...args);
8
- };
9
- async function* paginateListScheduleGroups(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SchedulerClient_1.SchedulerClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Scheduler | SchedulerClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListScheduleGroups = paginateListScheduleGroups;
7
+ exports.paginateListScheduleGroups = (0, core_1.createPaginator)(SchedulerClient_1.SchedulerClient, ListScheduleGroupsCommand_1.ListScheduleGroupsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListSchedules = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListSchedulesCommand_1 = require("../commands/ListSchedulesCommand");
5
6
  const SchedulerClient_1 = require("../SchedulerClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListSchedulesCommand_1.ListSchedulesCommand(input), ...args);
8
- };
9
- async function* paginateListSchedules(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof SchedulerClient_1.SchedulerClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Scheduler | SchedulerClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListSchedules = paginateListSchedules;
7
+ exports.paginateListSchedules = (0, core_1.createPaginator)(SchedulerClient_1.SchedulerClient, ListSchedulesCommand_1.ListSchedulesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateScheduleCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSchedulesCommand = exports.de_ListScheduleGroupsCommand = exports.de_GetScheduleGroupCommand = exports.de_GetScheduleCommand = exports.de_DeleteScheduleGroupCommand = exports.de_DeleteScheduleCommand = exports.de_CreateScheduleGroupCommand = exports.de_CreateScheduleCommand = exports.se_UpdateScheduleCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSchedulesCommand = exports.se_ListScheduleGroupsCommand = exports.se_GetScheduleGroupCommand = exports.se_GetScheduleCommand = exports.se_DeleteScheduleGroupCommand = exports.se_DeleteScheduleCommand = exports.se_CreateScheduleGroupCommand = exports.se_CreateScheduleCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const SchedulerServiceException_1 = require("../models/SchedulerServiceException");
9
9
  const se_CreateScheduleCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
15
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
14
+ b.bp("/schedules/{Name}");
15
+ b.p("Name", () => input.Name, "{Name}", false);
16
16
  let body;
17
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
18
18
  ActionAfterCompletion: [],
@@ -28,237 +28,154 @@ const se_CreateScheduleCommand = async (input, context) => {
28
28
  State: [],
29
29
  Target: (_) => (0, smithy_client_1._json)(_),
30
30
  }));
31
- return new protocol_http_1.HttpRequest({
32
- protocol,
33
- hostname,
34
- port,
35
- method: "POST",
36
- headers,
37
- path: resolvedPath,
38
- body,
39
- });
31
+ b.m("POST").h(headers).b(body);
32
+ return b.build();
40
33
  };
41
34
  exports.se_CreateScheduleCommand = se_CreateScheduleCommand;
42
35
  const se_CreateScheduleGroupCommand = async (input, context) => {
43
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
36
+ const b = (0, core_1.requestBuilder)(input, context);
44
37
  const headers = {
45
38
  "content-type": "application/json",
46
39
  };
47
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
48
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
40
+ b.bp("/schedule-groups/{Name}");
41
+ b.p("Name", () => input.Name, "{Name}", false);
49
42
  let body;
50
43
  body = JSON.stringify((0, smithy_client_1.take)(input, {
51
44
  ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
52
45
  Tags: (_) => (0, smithy_client_1._json)(_),
53
46
  }));
54
- return new protocol_http_1.HttpRequest({
55
- protocol,
56
- hostname,
57
- port,
58
- method: "POST",
59
- headers,
60
- path: resolvedPath,
61
- body,
62
- });
47
+ b.m("POST").h(headers).b(body);
48
+ return b.build();
63
49
  };
64
50
  exports.se_CreateScheduleGroupCommand = se_CreateScheduleGroupCommand;
65
51
  const se_DeleteScheduleCommand = async (input, context) => {
66
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
+ const b = (0, core_1.requestBuilder)(input, context);
67
53
  const headers = {};
68
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
69
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
54
+ b.bp("/schedules/{Name}");
55
+ b.p("Name", () => input.Name, "{Name}", false);
70
56
  const query = (0, smithy_client_1.map)({
71
- groupName: [, input.GroupName],
72
- clientToken: [, input.ClientToken ?? (0, uuid_1.v4)()],
57
+ [_gN]: [, input[_GN]],
58
+ [_cT]: [, input[_CT] ?? (0, uuid_1.v4)()],
73
59
  });
74
60
  let body;
75
- return new protocol_http_1.HttpRequest({
76
- protocol,
77
- hostname,
78
- port,
79
- method: "DELETE",
80
- headers,
81
- path: resolvedPath,
82
- query,
83
- body,
84
- });
61
+ b.m("DELETE").h(headers).q(query).b(body);
62
+ return b.build();
85
63
  };
86
64
  exports.se_DeleteScheduleCommand = se_DeleteScheduleCommand;
87
65
  const se_DeleteScheduleGroupCommand = async (input, context) => {
88
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
66
+ const b = (0, core_1.requestBuilder)(input, context);
89
67
  const headers = {};
90
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
91
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
68
+ b.bp("/schedule-groups/{Name}");
69
+ b.p("Name", () => input.Name, "{Name}", false);
92
70
  const query = (0, smithy_client_1.map)({
93
- clientToken: [, input.ClientToken ?? (0, uuid_1.v4)()],
71
+ [_cT]: [, input[_CT] ?? (0, uuid_1.v4)()],
94
72
  });
95
73
  let body;
96
- return new protocol_http_1.HttpRequest({
97
- protocol,
98
- hostname,
99
- port,
100
- method: "DELETE",
101
- headers,
102
- path: resolvedPath,
103
- query,
104
- body,
105
- });
74
+ b.m("DELETE").h(headers).q(query).b(body);
75
+ return b.build();
106
76
  };
107
77
  exports.se_DeleteScheduleGroupCommand = se_DeleteScheduleGroupCommand;
108
78
  const se_GetScheduleCommand = async (input, context) => {
109
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
79
+ const b = (0, core_1.requestBuilder)(input, context);
110
80
  const headers = {};
111
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
112
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
81
+ b.bp("/schedules/{Name}");
82
+ b.p("Name", () => input.Name, "{Name}", false);
113
83
  const query = (0, smithy_client_1.map)({
114
- groupName: [, input.GroupName],
84
+ [_gN]: [, input[_GN]],
115
85
  });
116
86
  let body;
117
- return new protocol_http_1.HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "GET",
122
- headers,
123
- path: resolvedPath,
124
- query,
125
- body,
126
- });
87
+ b.m("GET").h(headers).q(query).b(body);
88
+ return b.build();
127
89
  };
128
90
  exports.se_GetScheduleCommand = se_GetScheduleCommand;
129
91
  const se_GetScheduleGroupCommand = async (input, context) => {
130
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const b = (0, core_1.requestBuilder)(input, context);
131
93
  const headers = {};
132
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
133
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
94
+ b.bp("/schedule-groups/{Name}");
95
+ b.p("Name", () => input.Name, "{Name}", false);
134
96
  let body;
135
- return new protocol_http_1.HttpRequest({
136
- protocol,
137
- hostname,
138
- port,
139
- method: "GET",
140
- headers,
141
- path: resolvedPath,
142
- body,
143
- });
97
+ b.m("GET").h(headers).b(body);
98
+ return b.build();
144
99
  };
145
100
  exports.se_GetScheduleGroupCommand = se_GetScheduleGroupCommand;
146
101
  const se_ListScheduleGroupsCommand = async (input, context) => {
147
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = (0, core_1.requestBuilder)(input, context);
148
103
  const headers = {};
149
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups";
104
+ b.bp("/schedule-groups");
150
105
  const query = (0, smithy_client_1.map)({
151
- NamePrefix: [, input.NamePrefix],
152
- NextToken: [, input.NextToken],
153
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
106
+ [_NP]: [, input[_NP]],
107
+ [_NT]: [, input[_NT]],
108
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
154
109
  });
155
110
  let body;
156
- return new protocol_http_1.HttpRequest({
157
- protocol,
158
- hostname,
159
- port,
160
- method: "GET",
161
- headers,
162
- path: resolvedPath,
163
- query,
164
- body,
165
- });
111
+ b.m("GET").h(headers).q(query).b(body);
112
+ return b.build();
166
113
  };
167
114
  exports.se_ListScheduleGroupsCommand = se_ListScheduleGroupsCommand;
168
115
  const se_ListSchedulesCommand = async (input, context) => {
169
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = (0, core_1.requestBuilder)(input, context);
170
117
  const headers = {};
171
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules";
118
+ b.bp("/schedules");
172
119
  const query = (0, smithy_client_1.map)({
173
- ScheduleGroup: [, input.GroupName],
174
- NamePrefix: [, input.NamePrefix],
175
- State: [, input.State],
176
- NextToken: [, input.NextToken],
177
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
120
+ [_SG]: [, input[_GN]],
121
+ [_NP]: [, input[_NP]],
122
+ [_S]: [, input[_S]],
123
+ [_NT]: [, input[_NT]],
124
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
178
125
  });
179
126
  let body;
180
- return new protocol_http_1.HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "GET",
185
- headers,
186
- path: resolvedPath,
187
- query,
188
- body,
189
- });
127
+ b.m("GET").h(headers).q(query).b(body);
128
+ return b.build();
190
129
  };
191
130
  exports.se_ListSchedulesCommand = se_ListSchedulesCommand;
192
131
  const se_ListTagsForResourceCommand = async (input, context) => {
193
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const b = (0, core_1.requestBuilder)(input, context);
194
133
  const headers = {};
195
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
196
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
134
+ b.bp("/tags/{ResourceArn}");
135
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
197
136
  let body;
198
- return new protocol_http_1.HttpRequest({
199
- protocol,
200
- hostname,
201
- port,
202
- method: "GET",
203
- headers,
204
- path: resolvedPath,
205
- body,
206
- });
137
+ b.m("GET").h(headers).b(body);
138
+ return b.build();
207
139
  };
208
140
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
209
141
  const se_TagResourceCommand = async (input, context) => {
210
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
142
+ const b = (0, core_1.requestBuilder)(input, context);
211
143
  const headers = {
212
144
  "content-type": "application/json",
213
145
  };
214
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
215
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
146
+ b.bp("/tags/{ResourceArn}");
147
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
216
148
  let body;
217
149
  body = JSON.stringify((0, smithy_client_1.take)(input, {
218
150
  Tags: (_) => (0, smithy_client_1._json)(_),
219
151
  }));
220
- return new protocol_http_1.HttpRequest({
221
- protocol,
222
- hostname,
223
- port,
224
- method: "POST",
225
- headers,
226
- path: resolvedPath,
227
- body,
228
- });
152
+ b.m("POST").h(headers).b(body);
153
+ return b.build();
229
154
  };
230
155
  exports.se_TagResourceCommand = se_TagResourceCommand;
231
156
  const se_UntagResourceCommand = async (input, context) => {
232
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = (0, core_1.requestBuilder)(input, context);
233
158
  const headers = {};
234
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
235
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
159
+ b.bp("/tags/{ResourceArn}");
160
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
236
161
  const query = (0, smithy_client_1.map)({
237
- TagKeys: [
162
+ [_TK]: [
238
163
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
239
- () => (input.TagKeys || []).map((_entry) => _entry),
164
+ () => (input[_TK] || []).map((_entry) => _entry),
240
165
  ],
241
166
  });
242
167
  let body;
243
- return new protocol_http_1.HttpRequest({
244
- protocol,
245
- hostname,
246
- port,
247
- method: "DELETE",
248
- headers,
249
- path: resolvedPath,
250
- query,
251
- body,
252
- });
168
+ b.m("DELETE").h(headers).q(query).b(body);
169
+ return b.build();
253
170
  };
254
171
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
255
172
  const se_UpdateScheduleCommand = async (input, context) => {
256
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = (0, core_1.requestBuilder)(input, context);
257
174
  const headers = {
258
175
  "content-type": "application/json",
259
176
  };
260
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
261
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
177
+ b.bp("/schedules/{Name}");
178
+ b.p("Name", () => input.Name, "{Name}", false);
262
179
  let body;
263
180
  body = JSON.stringify((0, smithy_client_1.take)(input, {
264
181
  ActionAfterCompletion: [],
@@ -274,15 +191,8 @@ const se_UpdateScheduleCommand = async (input, context) => {
274
191
  State: [],
275
192
  Target: (_) => (0, smithy_client_1._json)(_),
276
193
  }));
277
- return new protocol_http_1.HttpRequest({
278
- protocol,
279
- hostname,
280
- port,
281
- method: "PUT",
282
- headers,
283
- path: resolvedPath,
284
- body,
285
- });
194
+ b.m("PUT").h(headers).b(body);
195
+ return b.build();
286
196
  };
287
197
  exports.se_UpdateScheduleCommand = se_UpdateScheduleCommand;
288
198
  const de_CreateScheduleCommand = async (output, context) => {
@@ -953,6 +863,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
953
863
  value !== "" &&
954
864
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
955
865
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
866
+ const _CT = "ClientToken";
867
+ const _GN = "GroupName";
868
+ const _MR = "MaxResults";
869
+ const _NP = "NamePrefix";
870
+ const _NT = "NextToken";
871
+ const _S = "State";
872
+ const _SG = "ScheduleGroup";
873
+ const _TK = "TagKeys";
874
+ const _cT = "clientToken";
875
+ const _gN = "groupName";
956
876
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
957
877
  if (encoded.length) {
958
878
  return JSON.parse(encoded);
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListScheduleGroupsCommand, } from "../commands/ListScheduleGroupsCommand";
2
3
  import { SchedulerClient } from "../SchedulerClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListScheduleGroupsCommand(input), ...args);
5
- };
6
- export async function* paginateListScheduleGroups(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 SchedulerClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Scheduler | SchedulerClient");
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 paginateListScheduleGroups = createPaginator(SchedulerClient, ListScheduleGroupsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListSchedulesCommand, } from "../commands/ListSchedulesCommand";
2
3
  import { SchedulerClient } from "../SchedulerClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListSchedulesCommand(input), ...args);
5
- };
6
- export async function* paginateListSchedules(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 SchedulerClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Scheduler | SchedulerClient");
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 paginateListSchedules = createPaginator(SchedulerClient, ListSchedulesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,15 +1,15 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  import { SchedulerServiceException as __BaseException } from "../models/SchedulerServiceException";
6
6
  export const se_CreateScheduleCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
12
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
11
+ b.bp("/schedules/{Name}");
12
+ b.p("Name", () => input.Name, "{Name}", false);
13
13
  let body;
14
14
  body = JSON.stringify(take(input, {
15
15
  ActionAfterCompletion: [],
@@ -25,226 +25,143 @@ export const se_CreateScheduleCommand = async (input, context) => {
25
25
  State: [],
26
26
  Target: (_) => _json(_),
27
27
  }));
28
- return new __HttpRequest({
29
- protocol,
30
- hostname,
31
- port,
32
- method: "POST",
33
- headers,
34
- path: resolvedPath,
35
- body,
36
- });
28
+ b.m("POST").h(headers).b(body);
29
+ return b.build();
37
30
  };
38
31
  export const se_CreateScheduleGroupCommand = async (input, context) => {
39
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
32
+ const b = rb(input, context);
40
33
  const headers = {
41
34
  "content-type": "application/json",
42
35
  };
43
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
44
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
36
+ b.bp("/schedule-groups/{Name}");
37
+ b.p("Name", () => input.Name, "{Name}", false);
45
38
  let body;
46
39
  body = JSON.stringify(take(input, {
47
40
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
48
41
  Tags: (_) => _json(_),
49
42
  }));
50
- return new __HttpRequest({
51
- protocol,
52
- hostname,
53
- port,
54
- method: "POST",
55
- headers,
56
- path: resolvedPath,
57
- body,
58
- });
43
+ b.m("POST").h(headers).b(body);
44
+ return b.build();
59
45
  };
60
46
  export const se_DeleteScheduleCommand = async (input, context) => {
61
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
47
+ const b = rb(input, context);
62
48
  const headers = {};
63
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
64
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
49
+ b.bp("/schedules/{Name}");
50
+ b.p("Name", () => input.Name, "{Name}", false);
65
51
  const query = map({
66
- groupName: [, input.GroupName],
67
- clientToken: [, input.ClientToken ?? generateIdempotencyToken()],
52
+ [_gN]: [, input[_GN]],
53
+ [_cT]: [, input[_CT] ?? generateIdempotencyToken()],
68
54
  });
69
55
  let body;
70
- return new __HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "DELETE",
75
- headers,
76
- path: resolvedPath,
77
- query,
78
- body,
79
- });
56
+ b.m("DELETE").h(headers).q(query).b(body);
57
+ return b.build();
80
58
  };
81
59
  export const se_DeleteScheduleGroupCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
60
+ const b = rb(input, context);
83
61
  const headers = {};
84
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
85
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
62
+ b.bp("/schedule-groups/{Name}");
63
+ b.p("Name", () => input.Name, "{Name}", false);
86
64
  const query = map({
87
- clientToken: [, input.ClientToken ?? generateIdempotencyToken()],
65
+ [_cT]: [, input[_CT] ?? generateIdempotencyToken()],
88
66
  });
89
67
  let body;
90
- return new __HttpRequest({
91
- protocol,
92
- hostname,
93
- port,
94
- method: "DELETE",
95
- headers,
96
- path: resolvedPath,
97
- query,
98
- body,
99
- });
68
+ b.m("DELETE").h(headers).q(query).b(body);
69
+ return b.build();
100
70
  };
101
71
  export const se_GetScheduleCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
72
+ const b = rb(input, context);
103
73
  const headers = {};
104
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
105
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
74
+ b.bp("/schedules/{Name}");
75
+ b.p("Name", () => input.Name, "{Name}", false);
106
76
  const query = map({
107
- groupName: [, input.GroupName],
77
+ [_gN]: [, input[_GN]],
108
78
  });
109
79
  let body;
110
- return new __HttpRequest({
111
- protocol,
112
- hostname,
113
- port,
114
- method: "GET",
115
- headers,
116
- path: resolvedPath,
117
- query,
118
- body,
119
- });
80
+ b.m("GET").h(headers).q(query).b(body);
81
+ return b.build();
120
82
  };
121
83
  export const se_GetScheduleGroupCommand = async (input, context) => {
122
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = rb(input, context);
123
85
  const headers = {};
124
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}";
125
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
86
+ b.bp("/schedule-groups/{Name}");
87
+ b.p("Name", () => input.Name, "{Name}", false);
126
88
  let body;
127
- return new __HttpRequest({
128
- protocol,
129
- hostname,
130
- port,
131
- method: "GET",
132
- headers,
133
- path: resolvedPath,
134
- body,
135
- });
89
+ b.m("GET").h(headers).b(body);
90
+ return b.build();
136
91
  };
137
92
  export const se_ListScheduleGroupsCommand = async (input, context) => {
138
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
93
+ const b = rb(input, context);
139
94
  const headers = {};
140
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups";
95
+ b.bp("/schedule-groups");
141
96
  const query = map({
142
- NamePrefix: [, input.NamePrefix],
143
- NextToken: [, input.NextToken],
144
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
97
+ [_NP]: [, input[_NP]],
98
+ [_NT]: [, input[_NT]],
99
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
145
100
  });
146
101
  let body;
147
- return new __HttpRequest({
148
- protocol,
149
- hostname,
150
- port,
151
- method: "GET",
152
- headers,
153
- path: resolvedPath,
154
- query,
155
- body,
156
- });
102
+ b.m("GET").h(headers).q(query).b(body);
103
+ return b.build();
157
104
  };
158
105
  export const se_ListSchedulesCommand = async (input, context) => {
159
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
106
+ const b = rb(input, context);
160
107
  const headers = {};
161
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules";
108
+ b.bp("/schedules");
162
109
  const query = map({
163
- ScheduleGroup: [, input.GroupName],
164
- NamePrefix: [, input.NamePrefix],
165
- State: [, input.State],
166
- NextToken: [, input.NextToken],
167
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
110
+ [_SG]: [, input[_GN]],
111
+ [_NP]: [, input[_NP]],
112
+ [_S]: [, input[_S]],
113
+ [_NT]: [, input[_NT]],
114
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
168
115
  });
169
116
  let body;
170
- return new __HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "GET",
175
- headers,
176
- path: resolvedPath,
177
- query,
178
- body,
179
- });
117
+ b.m("GET").h(headers).q(query).b(body);
118
+ return b.build();
180
119
  };
181
120
  export const se_ListTagsForResourceCommand = async (input, context) => {
182
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
+ const b = rb(input, context);
183
122
  const headers = {};
184
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
185
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
123
+ b.bp("/tags/{ResourceArn}");
124
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
186
125
  let body;
187
- return new __HttpRequest({
188
- protocol,
189
- hostname,
190
- port,
191
- method: "GET",
192
- headers,
193
- path: resolvedPath,
194
- body,
195
- });
126
+ b.m("GET").h(headers).b(body);
127
+ return b.build();
196
128
  };
197
129
  export const se_TagResourceCommand = async (input, context) => {
198
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const b = rb(input, context);
199
131
  const headers = {
200
132
  "content-type": "application/json",
201
133
  };
202
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
203
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
134
+ b.bp("/tags/{ResourceArn}");
135
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
204
136
  let body;
205
137
  body = JSON.stringify(take(input, {
206
138
  Tags: (_) => _json(_),
207
139
  }));
208
- return new __HttpRequest({
209
- protocol,
210
- hostname,
211
- port,
212
- method: "POST",
213
- headers,
214
- path: resolvedPath,
215
- body,
216
- });
140
+ b.m("POST").h(headers).b(body);
141
+ return b.build();
217
142
  };
218
143
  export const se_UntagResourceCommand = async (input, context) => {
219
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
144
+ const b = rb(input, context);
220
145
  const headers = {};
221
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
222
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
146
+ b.bp("/tags/{ResourceArn}");
147
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
223
148
  const query = map({
224
- TagKeys: [
149
+ [_TK]: [
225
150
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
226
- () => (input.TagKeys || []).map((_entry) => _entry),
151
+ () => (input[_TK] || []).map((_entry) => _entry),
227
152
  ],
228
153
  });
229
154
  let body;
230
- return new __HttpRequest({
231
- protocol,
232
- hostname,
233
- port,
234
- method: "DELETE",
235
- headers,
236
- path: resolvedPath,
237
- query,
238
- body,
239
- });
155
+ b.m("DELETE").h(headers).q(query).b(body);
156
+ return b.build();
240
157
  };
241
158
  export const se_UpdateScheduleCommand = async (input, context) => {
242
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
159
+ const b = rb(input, context);
243
160
  const headers = {
244
161
  "content-type": "application/json",
245
162
  };
246
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}";
247
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
163
+ b.bp("/schedules/{Name}");
164
+ b.p("Name", () => input.Name, "{Name}", false);
248
165
  let body;
249
166
  body = JSON.stringify(take(input, {
250
167
  ActionAfterCompletion: [],
@@ -260,15 +177,8 @@ export const se_UpdateScheduleCommand = async (input, context) => {
260
177
  State: [],
261
178
  Target: (_) => _json(_),
262
179
  }));
263
- return new __HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "PUT",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
180
+ b.m("PUT").h(headers).b(body);
181
+ return b.build();
272
182
  };
273
183
  export const de_CreateScheduleCommand = async (output, context) => {
274
184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -926,6 +836,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
926
836
  value !== "" &&
927
837
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
928
838
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
839
+ const _CT = "ClientToken";
840
+ const _GN = "GroupName";
841
+ const _MR = "MaxResults";
842
+ const _NP = "NamePrefix";
843
+ const _NT = "NextToken";
844
+ const _S = "State";
845
+ const _SG = "ScheduleGroup";
846
+ const _TK = "TagKeys";
847
+ const _cT = "clientToken";
848
+ const _gN = "groupName";
929
849
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
930
850
  if (encoded.length) {
931
851
  return JSON.parse(encoded);
@@ -4,4 +4,4 @@ import { SchedulerPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListScheduleGroups(config: SchedulerPaginationConfiguration, input: ListScheduleGroupsCommandInput, ...additionalArguments: any): Paginator<ListScheduleGroupsCommandOutput>;
7
+ export declare const paginateListScheduleGroups: (config: SchedulerPaginationConfiguration, input: ListScheduleGroupsCommandInput, ...rest: any[]) => Paginator<ListScheduleGroupsCommandOutput>;
@@ -4,4 +4,4 @@ import { SchedulerPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListSchedules(config: SchedulerPaginationConfiguration, input: ListSchedulesCommandInput, ...additionalArguments: any): Paginator<ListSchedulesCommandOutput>;
7
+ export declare const paginateListSchedules: (config: SchedulerPaginationConfiguration, input: ListSchedulesCommandInput, ...rest: any[]) => Paginator<ListSchedulesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListScheduleGroupsCommandOutput,
5
5
  } from "../commands/ListScheduleGroupsCommand";
6
6
  import { SchedulerPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListScheduleGroups(
7
+ export declare const paginateListScheduleGroups: (
8
8
  config: SchedulerPaginationConfiguration,
9
9
  input: ListScheduleGroupsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListScheduleGroupsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListScheduleGroupsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListSchedulesCommandOutput,
5
5
  } from "../commands/ListSchedulesCommand";
6
6
  import { SchedulerPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListSchedules(
7
+ export declare const paginateListSchedules: (
8
8
  config: SchedulerPaginationConfiguration,
9
9
  input: ListSchedulesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListSchedulesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListSchedulesCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-scheduler",
3
3
  "description": "AWS SDK for JavaScript Scheduler Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.478.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,20 +20,21 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",