@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.
- package/dist-cjs/pagination/ListScheduleGroupsPaginator.js +2 -24
- package/dist-cjs/pagination/ListSchedulesPaginator.js +2 -24
- package/dist-cjs/protocols/Aws_restJson1.js +83 -163
- package/dist-es/pagination/ListScheduleGroupsPaginator.js +2 -23
- package/dist-es/pagination/ListSchedulesPaginator.js +2 -23
- package/dist-es/protocols/Aws_restJson1.js +84 -164
- package/dist-types/pagination/ListScheduleGroupsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListSchedulesPaginator.d.ts +1 -1
- package/dist-types/ts3.4/pagination/ListScheduleGroupsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListSchedulesPaginator.d.ts +3 -3
- package/package.json +7 -6
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
10
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
11
|
const headers = {
|
|
12
12
|
"content-type": "application/json",
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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
|
|
36
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
44
37
|
const headers = {
|
|
45
38
|
"content-type": "application/json",
|
|
46
39
|
};
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
55
|
-
|
|
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
|
|
52
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
67
53
|
const headers = {};
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
b.bp("/schedules/{Name}");
|
|
55
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
70
56
|
const query = (0, smithy_client_1.map)({
|
|
71
|
-
|
|
72
|
-
|
|
57
|
+
[_gN]: [, input[_GN]],
|
|
58
|
+
[_cT]: [, input[_CT] ?? (0, uuid_1.v4)()],
|
|
73
59
|
});
|
|
74
60
|
let body;
|
|
75
|
-
|
|
76
|
-
|
|
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
|
|
66
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
89
67
|
const headers = {};
|
|
90
|
-
|
|
91
|
-
|
|
68
|
+
b.bp("/schedule-groups/{Name}");
|
|
69
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
92
70
|
const query = (0, smithy_client_1.map)({
|
|
93
|
-
|
|
71
|
+
[_cT]: [, input[_CT] ?? (0, uuid_1.v4)()],
|
|
94
72
|
});
|
|
95
73
|
let body;
|
|
96
|
-
|
|
97
|
-
|
|
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
|
|
79
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
110
80
|
const headers = {};
|
|
111
|
-
|
|
112
|
-
|
|
81
|
+
b.bp("/schedules/{Name}");
|
|
82
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
113
83
|
const query = (0, smithy_client_1.map)({
|
|
114
|
-
|
|
84
|
+
[_gN]: [, input[_GN]],
|
|
115
85
|
});
|
|
116
86
|
let body;
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|
92
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
131
93
|
const headers = {};
|
|
132
|
-
|
|
133
|
-
|
|
94
|
+
b.bp("/schedule-groups/{Name}");
|
|
95
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
134
96
|
let body;
|
|
135
|
-
|
|
136
|
-
|
|
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
|
|
102
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
148
103
|
const headers = {};
|
|
149
|
-
|
|
104
|
+
b.bp("/schedule-groups");
|
|
150
105
|
const query = (0, smithy_client_1.map)({
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
106
|
+
[_NP]: [, input[_NP]],
|
|
107
|
+
[_NT]: [, input[_NT]],
|
|
108
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
154
109
|
});
|
|
155
110
|
let body;
|
|
156
|
-
|
|
157
|
-
|
|
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
|
|
116
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
170
117
|
const headers = {};
|
|
171
|
-
|
|
118
|
+
b.bp("/schedules");
|
|
172
119
|
const query = (0, smithy_client_1.map)({
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
181
|
-
|
|
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
|
|
132
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
194
133
|
const headers = {};
|
|
195
|
-
|
|
196
|
-
|
|
134
|
+
b.bp("/tags/{ResourceArn}");
|
|
135
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
197
136
|
let body;
|
|
198
|
-
|
|
199
|
-
|
|
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
|
|
142
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
211
143
|
const headers = {
|
|
212
144
|
"content-type": "application/json",
|
|
213
145
|
};
|
|
214
|
-
|
|
215
|
-
|
|
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
|
-
|
|
221
|
-
|
|
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
|
|
157
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
233
158
|
const headers = {};
|
|
234
|
-
|
|
235
|
-
|
|
159
|
+
b.bp("/tags/{ResourceArn}");
|
|
160
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
236
161
|
const query = (0, smithy_client_1.map)({
|
|
237
|
-
|
|
162
|
+
[_TK]: [
|
|
238
163
|
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
239
|
-
() => (input
|
|
164
|
+
() => (input[_TK] || []).map((_entry) => _entry),
|
|
240
165
|
],
|
|
241
166
|
});
|
|
242
167
|
let body;
|
|
243
|
-
|
|
244
|
-
|
|
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
|
|
173
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
257
174
|
const headers = {
|
|
258
175
|
"content-type": "application/json",
|
|
259
176
|
};
|
|
260
|
-
|
|
261
|
-
|
|
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
|
-
|
|
278
|
-
|
|
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
|
|
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
|
|
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 {
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp,
|
|
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
|
|
7
|
+
const b = rb(input, context);
|
|
8
8
|
const headers = {
|
|
9
9
|
"content-type": "application/json",
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
29
|
-
|
|
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
|
|
32
|
+
const b = rb(input, context);
|
|
40
33
|
const headers = {
|
|
41
34
|
"content-type": "application/json",
|
|
42
35
|
};
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
51
|
-
|
|
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
|
|
47
|
+
const b = rb(input, context);
|
|
62
48
|
const headers = {};
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
b.bp("/schedules/{Name}");
|
|
50
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
65
51
|
const query = map({
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
[_gN]: [, input[_GN]],
|
|
53
|
+
[_cT]: [, input[_CT] ?? generateIdempotencyToken()],
|
|
68
54
|
});
|
|
69
55
|
let body;
|
|
70
|
-
|
|
71
|
-
|
|
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
|
|
60
|
+
const b = rb(input, context);
|
|
83
61
|
const headers = {};
|
|
84
|
-
|
|
85
|
-
|
|
62
|
+
b.bp("/schedule-groups/{Name}");
|
|
63
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
86
64
|
const query = map({
|
|
87
|
-
|
|
65
|
+
[_cT]: [, input[_CT] ?? generateIdempotencyToken()],
|
|
88
66
|
});
|
|
89
67
|
let body;
|
|
90
|
-
|
|
91
|
-
|
|
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
|
|
72
|
+
const b = rb(input, context);
|
|
103
73
|
const headers = {};
|
|
104
|
-
|
|
105
|
-
|
|
74
|
+
b.bp("/schedules/{Name}");
|
|
75
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
106
76
|
const query = map({
|
|
107
|
-
|
|
77
|
+
[_gN]: [, input[_GN]],
|
|
108
78
|
});
|
|
109
79
|
let body;
|
|
110
|
-
|
|
111
|
-
|
|
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
|
|
84
|
+
const b = rb(input, context);
|
|
123
85
|
const headers = {};
|
|
124
|
-
|
|
125
|
-
|
|
86
|
+
b.bp("/schedule-groups/{Name}");
|
|
87
|
+
b.p("Name", () => input.Name, "{Name}", false);
|
|
126
88
|
let body;
|
|
127
|
-
|
|
128
|
-
|
|
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
|
|
93
|
+
const b = rb(input, context);
|
|
139
94
|
const headers = {};
|
|
140
|
-
|
|
95
|
+
b.bp("/schedule-groups");
|
|
141
96
|
const query = map({
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
97
|
+
[_NP]: [, input[_NP]],
|
|
98
|
+
[_NT]: [, input[_NT]],
|
|
99
|
+
[_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
145
100
|
});
|
|
146
101
|
let body;
|
|
147
|
-
|
|
148
|
-
|
|
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
|
|
106
|
+
const b = rb(input, context);
|
|
160
107
|
const headers = {};
|
|
161
|
-
|
|
108
|
+
b.bp("/schedules");
|
|
162
109
|
const query = map({
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
171
|
-
|
|
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
|
|
121
|
+
const b = rb(input, context);
|
|
183
122
|
const headers = {};
|
|
184
|
-
|
|
185
|
-
|
|
123
|
+
b.bp("/tags/{ResourceArn}");
|
|
124
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
186
125
|
let body;
|
|
187
|
-
|
|
188
|
-
|
|
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
|
|
130
|
+
const b = rb(input, context);
|
|
199
131
|
const headers = {
|
|
200
132
|
"content-type": "application/json",
|
|
201
133
|
};
|
|
202
|
-
|
|
203
|
-
|
|
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
|
-
|
|
209
|
-
|
|
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
|
|
144
|
+
const b = rb(input, context);
|
|
220
145
|
const headers = {};
|
|
221
|
-
|
|
222
|
-
|
|
146
|
+
b.bp("/tags/{ResourceArn}");
|
|
147
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
223
148
|
const query = map({
|
|
224
|
-
|
|
149
|
+
[_TK]: [
|
|
225
150
|
__expectNonNull(input.TagKeys, `TagKeys`) != null,
|
|
226
|
-
() => (input
|
|
151
|
+
() => (input[_TK] || []).map((_entry) => _entry),
|
|
227
152
|
],
|
|
228
153
|
});
|
|
229
154
|
let body;
|
|
230
|
-
|
|
231
|
-
|
|
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
|
|
159
|
+
const b = rb(input, context);
|
|
243
160
|
const headers = {
|
|
244
161
|
"content-type": "application/json",
|
|
245
162
|
};
|
|
246
|
-
|
|
247
|
-
|
|
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
|
-
|
|
264
|
-
|
|
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
|
|
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
|
|
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
|
|
7
|
+
export declare const paginateListScheduleGroups: (
|
|
8
8
|
config: SchedulerPaginationConfiguration,
|
|
9
9
|
input: ListScheduleGroupsCommandInput,
|
|
10
|
-
...
|
|
11
|
-
)
|
|
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
|
|
7
|
+
export declare const paginateListSchedules: (
|
|
8
8
|
config: SchedulerPaginationConfiguration,
|
|
9
9
|
input: ListSchedulesCommandInput,
|
|
10
|
-
...
|
|
11
|
-
)
|
|
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.
|
|
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.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
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.
|
|
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.
|
|
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",
|