@aws-sdk/client-scheduler 3.208.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/LICENSE +201 -0
- package/README.md +209 -0
- package/dist-cjs/Scheduler.js +187 -0
- package/dist-cjs/SchedulerClient.js +40 -0
- package/dist-cjs/commands/CreateScheduleCommand.js +46 -0
- package/dist-cjs/commands/CreateScheduleGroupCommand.js +46 -0
- package/dist-cjs/commands/DeleteScheduleCommand.js +46 -0
- package/dist-cjs/commands/DeleteScheduleGroupCommand.js +46 -0
- package/dist-cjs/commands/GetScheduleCommand.js +46 -0
- package/dist-cjs/commands/GetScheduleGroupCommand.js +46 -0
- package/dist-cjs/commands/ListScheduleGroupsCommand.js +46 -0
- package/dist-cjs/commands/ListSchedulesCommand.js +46 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +46 -0
- package/dist-cjs/commands/UntagResourceCommand.js +46 -0
- package/dist-cjs/commands/UpdateScheduleCommand.js +46 -0
- package/dist-cjs/commands/index.js +15 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +312 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/SchedulerServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +302 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListScheduleGroupsPaginator.js +36 -0
- package/dist-cjs/pagination/ListSchedulesPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1494 -0
- package/dist-cjs/runtimeConfig.browser.js +42 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/Scheduler.js +183 -0
- package/dist-es/SchedulerClient.js +36 -0
- package/dist-es/commands/CreateScheduleCommand.js +42 -0
- package/dist-es/commands/CreateScheduleGroupCommand.js +42 -0
- package/dist-es/commands/DeleteScheduleCommand.js +42 -0
- package/dist-es/commands/DeleteScheduleGroupCommand.js +42 -0
- package/dist-es/commands/GetScheduleCommand.js +42 -0
- package/dist-es/commands/GetScheduleGroupCommand.js +42 -0
- package/dist-es/commands/ListScheduleGroupsCommand.js +42 -0
- package/dist-es/commands/ListSchedulesCommand.js +42 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +42 -0
- package/dist-es/commands/UntagResourceCommand.js +42 -0
- package/dist-es/commands/UpdateScheduleCommand.js +42 -0
- package/dist-es/commands/index.js +12 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +309 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/SchedulerServiceException.js +7 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +249 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListScheduleGroupsPaginator.js +32 -0
- package/dist-es/pagination/ListSchedulesPaginator.js +32 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +1467 -0
- package/dist-es/runtimeConfig.browser.js +37 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +13 -0
- package/dist-types/Scheduler.d.ts +111 -0
- package/dist-types/SchedulerClient.d.ts +157 -0
- package/dist-types/commands/CreateScheduleCommand.d.ts +37 -0
- package/dist-types/commands/CreateScheduleGroupCommand.d.ts +37 -0
- package/dist-types/commands/DeleteScheduleCommand.d.ts +37 -0
- package/dist-types/commands/DeleteScheduleGroupCommand.d.ts +45 -0
- package/dist-types/commands/GetScheduleCommand.d.ts +37 -0
- package/dist-types/commands/GetScheduleGroupCommand.d.ts +37 -0
- package/dist-types/commands/ListScheduleGroupsCommand.d.ts +37 -0
- package/dist-types/commands/ListSchedulesCommand.d.ts +37 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +37 -0
- package/dist-types/commands/TagResourceCommand.d.ts +37 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
- package/dist-types/commands/UpdateScheduleCommand.d.ts +45 -0
- package/dist-types/commands/index.d.ts +12 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/SchedulerServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1148 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListScheduleGroupsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListSchedulesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +38 -0
- package/dist-types/runtimeConfig.browser.d.ts +42 -0
- package/dist-types/runtimeConfig.d.ts +42 -0
- package/dist-types/runtimeConfig.native.d.ts +41 -0
- package/dist-types/runtimeConfig.shared.d.ts +17 -0
- package/dist-types/ts3.4/Scheduler.d.ts +208 -0
- package/dist-types/ts3.4/SchedulerClient.d.ts +183 -0
- package/dist-types/ts3.4/commands/CreateScheduleCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/CreateScheduleGroupCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteScheduleCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/DeleteScheduleGroupCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetScheduleCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/GetScheduleGroupCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/ListScheduleGroupsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListSchedulesCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/UpdateScheduleCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/index.d.ts +12 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/SchedulerServiceException.d.ts +7 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +423 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +7 -0
- package/dist-types/ts3.4/pagination/ListScheduleGroupsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListSchedulesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +149 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +86 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +86 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +75 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +17 -0
- package/package.json +105 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { SchedulerServiceException as __BaseException } from "./SchedulerServiceException";
|
|
2
|
+
export var AssignPublicIp;
|
|
3
|
+
(function (AssignPublicIp) {
|
|
4
|
+
AssignPublicIp["DISABLED"] = "DISABLED";
|
|
5
|
+
AssignPublicIp["ENABLED"] = "ENABLED";
|
|
6
|
+
})(AssignPublicIp || (AssignPublicIp = {}));
|
|
7
|
+
export class InternalServerException extends __BaseException {
|
|
8
|
+
constructor(opts) {
|
|
9
|
+
super({
|
|
10
|
+
name: "InternalServerException",
|
|
11
|
+
$fault: "server",
|
|
12
|
+
...opts,
|
|
13
|
+
});
|
|
14
|
+
this.name = "InternalServerException";
|
|
15
|
+
this.$fault = "server";
|
|
16
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
17
|
+
this.Message = opts.Message;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
21
|
+
constructor(opts) {
|
|
22
|
+
super({
|
|
23
|
+
name: "ResourceNotFoundException",
|
|
24
|
+
$fault: "client",
|
|
25
|
+
...opts,
|
|
26
|
+
});
|
|
27
|
+
this.name = "ResourceNotFoundException";
|
|
28
|
+
this.$fault = "client";
|
|
29
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
30
|
+
this.Message = opts.Message;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export class ThrottlingException extends __BaseException {
|
|
34
|
+
constructor(opts) {
|
|
35
|
+
super({
|
|
36
|
+
name: "ThrottlingException",
|
|
37
|
+
$fault: "client",
|
|
38
|
+
...opts,
|
|
39
|
+
});
|
|
40
|
+
this.name = "ThrottlingException";
|
|
41
|
+
this.$fault = "client";
|
|
42
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
43
|
+
this.Message = opts.Message;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export class ValidationException extends __BaseException {
|
|
47
|
+
constructor(opts) {
|
|
48
|
+
super({
|
|
49
|
+
name: "ValidationException",
|
|
50
|
+
$fault: "client",
|
|
51
|
+
...opts,
|
|
52
|
+
});
|
|
53
|
+
this.name = "ValidationException";
|
|
54
|
+
this.$fault = "client";
|
|
55
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
56
|
+
this.Message = opts.Message;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export class ConflictException extends __BaseException {
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "ConflictException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
this.name = "ConflictException";
|
|
67
|
+
this.$fault = "client";
|
|
68
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
69
|
+
this.Message = opts.Message;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export var FlexibleTimeWindowMode;
|
|
73
|
+
(function (FlexibleTimeWindowMode) {
|
|
74
|
+
FlexibleTimeWindowMode["FLEXIBLE"] = "FLEXIBLE";
|
|
75
|
+
FlexibleTimeWindowMode["OFF"] = "OFF";
|
|
76
|
+
})(FlexibleTimeWindowMode || (FlexibleTimeWindowMode = {}));
|
|
77
|
+
export var ScheduleState;
|
|
78
|
+
(function (ScheduleState) {
|
|
79
|
+
ScheduleState["DISABLED"] = "DISABLED";
|
|
80
|
+
ScheduleState["ENABLED"] = "ENABLED";
|
|
81
|
+
})(ScheduleState || (ScheduleState = {}));
|
|
82
|
+
export var LaunchType;
|
|
83
|
+
(function (LaunchType) {
|
|
84
|
+
LaunchType["EC2"] = "EC2";
|
|
85
|
+
LaunchType["EXTERNAL"] = "EXTERNAL";
|
|
86
|
+
LaunchType["FARGATE"] = "FARGATE";
|
|
87
|
+
})(LaunchType || (LaunchType = {}));
|
|
88
|
+
export var PlacementConstraintType;
|
|
89
|
+
(function (PlacementConstraintType) {
|
|
90
|
+
PlacementConstraintType["DISTINCT_INSTANCE"] = "distinctInstance";
|
|
91
|
+
PlacementConstraintType["MEMBER_OF"] = "memberOf";
|
|
92
|
+
})(PlacementConstraintType || (PlacementConstraintType = {}));
|
|
93
|
+
export var PlacementStrategyType;
|
|
94
|
+
(function (PlacementStrategyType) {
|
|
95
|
+
PlacementStrategyType["BINPACK"] = "binpack";
|
|
96
|
+
PlacementStrategyType["RANDOM"] = "random";
|
|
97
|
+
PlacementStrategyType["SPREAD"] = "spread";
|
|
98
|
+
})(PlacementStrategyType || (PlacementStrategyType = {}));
|
|
99
|
+
export var PropagateTags;
|
|
100
|
+
(function (PropagateTags) {
|
|
101
|
+
PropagateTags["TASK_DEFINITION"] = "TASK_DEFINITION";
|
|
102
|
+
})(PropagateTags || (PropagateTags = {}));
|
|
103
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
104
|
+
constructor(opts) {
|
|
105
|
+
super({
|
|
106
|
+
name: "ServiceQuotaExceededException",
|
|
107
|
+
$fault: "client",
|
|
108
|
+
...opts,
|
|
109
|
+
});
|
|
110
|
+
this.name = "ServiceQuotaExceededException";
|
|
111
|
+
this.$fault = "client";
|
|
112
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
113
|
+
this.Message = opts.Message;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export var ScheduleGroupState;
|
|
117
|
+
(function (ScheduleGroupState) {
|
|
118
|
+
ScheduleGroupState["ACTIVE"] = "ACTIVE";
|
|
119
|
+
ScheduleGroupState["DELETING"] = "DELETING";
|
|
120
|
+
})(ScheduleGroupState || (ScheduleGroupState = {}));
|
|
121
|
+
export const ListTagsForResourceInputFilterSensitiveLog = (obj) => ({
|
|
122
|
+
...obj,
|
|
123
|
+
});
|
|
124
|
+
export const TagFilterSensitiveLog = (obj) => ({
|
|
125
|
+
...obj,
|
|
126
|
+
});
|
|
127
|
+
export const ListTagsForResourceOutputFilterSensitiveLog = (obj) => ({
|
|
128
|
+
...obj,
|
|
129
|
+
});
|
|
130
|
+
export const FlexibleTimeWindowFilterSensitiveLog = (obj) => ({
|
|
131
|
+
...obj,
|
|
132
|
+
});
|
|
133
|
+
export const DeadLetterConfigFilterSensitiveLog = (obj) => ({
|
|
134
|
+
...obj,
|
|
135
|
+
});
|
|
136
|
+
export const CapacityProviderStrategyItemFilterSensitiveLog = (obj) => ({
|
|
137
|
+
...obj,
|
|
138
|
+
});
|
|
139
|
+
export const AwsVpcConfigurationFilterSensitiveLog = (obj) => ({
|
|
140
|
+
...obj,
|
|
141
|
+
});
|
|
142
|
+
export const NetworkConfigurationFilterSensitiveLog = (obj) => ({
|
|
143
|
+
...obj,
|
|
144
|
+
});
|
|
145
|
+
export const PlacementConstraintFilterSensitiveLog = (obj) => ({
|
|
146
|
+
...obj,
|
|
147
|
+
});
|
|
148
|
+
export const PlacementStrategyFilterSensitiveLog = (obj) => ({
|
|
149
|
+
...obj,
|
|
150
|
+
});
|
|
151
|
+
export const EcsParametersFilterSensitiveLog = (obj) => ({
|
|
152
|
+
...obj,
|
|
153
|
+
});
|
|
154
|
+
export const EventBridgeParametersFilterSensitiveLog = (obj) => ({
|
|
155
|
+
...obj,
|
|
156
|
+
});
|
|
157
|
+
export const KinesisParametersFilterSensitiveLog = (obj) => ({
|
|
158
|
+
...obj,
|
|
159
|
+
});
|
|
160
|
+
export const RetryPolicyFilterSensitiveLog = (obj) => ({
|
|
161
|
+
...obj,
|
|
162
|
+
});
|
|
163
|
+
export const SageMakerPipelineParameterFilterSensitiveLog = (obj) => ({
|
|
164
|
+
...obj,
|
|
165
|
+
});
|
|
166
|
+
export const SageMakerPipelineParametersFilterSensitiveLog = (obj) => ({
|
|
167
|
+
...obj,
|
|
168
|
+
});
|
|
169
|
+
export const SqsParametersFilterSensitiveLog = (obj) => ({
|
|
170
|
+
...obj,
|
|
171
|
+
});
|
|
172
|
+
export const TargetFilterSensitiveLog = (obj) => ({
|
|
173
|
+
...obj,
|
|
174
|
+
});
|
|
175
|
+
export const CreateScheduleInputFilterSensitiveLog = (obj) => ({
|
|
176
|
+
...obj,
|
|
177
|
+
});
|
|
178
|
+
export const CreateScheduleOutputFilterSensitiveLog = (obj) => ({
|
|
179
|
+
...obj,
|
|
180
|
+
});
|
|
181
|
+
export const DeleteScheduleInputFilterSensitiveLog = (obj) => ({
|
|
182
|
+
...obj,
|
|
183
|
+
});
|
|
184
|
+
export const DeleteScheduleOutputFilterSensitiveLog = (obj) => ({
|
|
185
|
+
...obj,
|
|
186
|
+
});
|
|
187
|
+
export const GetScheduleInputFilterSensitiveLog = (obj) => ({
|
|
188
|
+
...obj,
|
|
189
|
+
});
|
|
190
|
+
export const GetScheduleOutputFilterSensitiveLog = (obj) => ({
|
|
191
|
+
...obj,
|
|
192
|
+
});
|
|
193
|
+
export const ListSchedulesInputFilterSensitiveLog = (obj) => ({
|
|
194
|
+
...obj,
|
|
195
|
+
});
|
|
196
|
+
export const TargetSummaryFilterSensitiveLog = (obj) => ({
|
|
197
|
+
...obj,
|
|
198
|
+
});
|
|
199
|
+
export const ScheduleSummaryFilterSensitiveLog = (obj) => ({
|
|
200
|
+
...obj,
|
|
201
|
+
});
|
|
202
|
+
export const ListSchedulesOutputFilterSensitiveLog = (obj) => ({
|
|
203
|
+
...obj,
|
|
204
|
+
});
|
|
205
|
+
export const UpdateScheduleInputFilterSensitiveLog = (obj) => ({
|
|
206
|
+
...obj,
|
|
207
|
+
});
|
|
208
|
+
export const UpdateScheduleOutputFilterSensitiveLog = (obj) => ({
|
|
209
|
+
...obj,
|
|
210
|
+
});
|
|
211
|
+
export const CreateScheduleGroupInputFilterSensitiveLog = (obj) => ({
|
|
212
|
+
...obj,
|
|
213
|
+
});
|
|
214
|
+
export const CreateScheduleGroupOutputFilterSensitiveLog = (obj) => ({
|
|
215
|
+
...obj,
|
|
216
|
+
});
|
|
217
|
+
export const DeleteScheduleGroupInputFilterSensitiveLog = (obj) => ({
|
|
218
|
+
...obj,
|
|
219
|
+
});
|
|
220
|
+
export const DeleteScheduleGroupOutputFilterSensitiveLog = (obj) => ({
|
|
221
|
+
...obj,
|
|
222
|
+
});
|
|
223
|
+
export const GetScheduleGroupInputFilterSensitiveLog = (obj) => ({
|
|
224
|
+
...obj,
|
|
225
|
+
});
|
|
226
|
+
export const GetScheduleGroupOutputFilterSensitiveLog = (obj) => ({
|
|
227
|
+
...obj,
|
|
228
|
+
});
|
|
229
|
+
export const ListScheduleGroupsInputFilterSensitiveLog = (obj) => ({
|
|
230
|
+
...obj,
|
|
231
|
+
});
|
|
232
|
+
export const ScheduleGroupSummaryFilterSensitiveLog = (obj) => ({
|
|
233
|
+
...obj,
|
|
234
|
+
});
|
|
235
|
+
export const ListScheduleGroupsOutputFilterSensitiveLog = (obj) => ({
|
|
236
|
+
...obj,
|
|
237
|
+
});
|
|
238
|
+
export const TagResourceInputFilterSensitiveLog = (obj) => ({
|
|
239
|
+
...obj,
|
|
240
|
+
});
|
|
241
|
+
export const TagResourceOutputFilterSensitiveLog = (obj) => ({
|
|
242
|
+
...obj,
|
|
243
|
+
});
|
|
244
|
+
export const UntagResourceInputFilterSensitiveLog = (obj) => ({
|
|
245
|
+
...obj,
|
|
246
|
+
});
|
|
247
|
+
export const UntagResourceOutputFilterSensitiveLog = (obj) => ({
|
|
248
|
+
...obj,
|
|
249
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListScheduleGroupsCommand, } from "../commands/ListScheduleGroupsCommand";
|
|
2
|
+
import { Scheduler } from "../Scheduler";
|
|
3
|
+
import { SchedulerClient } from "../SchedulerClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListScheduleGroupsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listScheduleGroups(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListScheduleGroups(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.NextToken = token;
|
|
16
|
+
input["MaxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof Scheduler) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof SchedulerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Scheduler | SchedulerClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.NextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListSchedulesCommand, } from "../commands/ListSchedulesCommand";
|
|
2
|
+
import { Scheduler } from "../Scheduler";
|
|
3
|
+
import { SchedulerClient } from "../SchedulerClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListSchedulesCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listSchedules(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListSchedules(config, input, ...additionalArguments) {
|
|
11
|
+
let token = config.startingToken || undefined;
|
|
12
|
+
let hasNext = true;
|
|
13
|
+
let page;
|
|
14
|
+
while (hasNext) {
|
|
15
|
+
input.NextToken = token;
|
|
16
|
+
input["MaxResults"] = config.pageSize;
|
|
17
|
+
if (config.client instanceof Scheduler) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof SchedulerClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Scheduler | SchedulerClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.NextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|