@aws-sdk/client-application-auto-scaling 3.181.0 → 3.183.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist-es/ApplicationAutoScaling.js +42 -49
- package/dist-es/ApplicationAutoScalingClient.js +22 -28
- package/dist-es/commands/DeleteScalingPolicyCommand.js +21 -28
- package/dist-es/commands/DeleteScheduledActionCommand.js +21 -28
- package/dist-es/commands/DeregisterScalableTargetCommand.js +21 -28
- package/dist-es/commands/DescribeScalableTargetsCommand.js +21 -28
- package/dist-es/commands/DescribeScalingActivitiesCommand.js +21 -28
- package/dist-es/commands/DescribeScalingPoliciesCommand.js +21 -28
- package/dist-es/commands/DescribeScheduledActionsCommand.js +21 -28
- package/dist-es/commands/PutScalingPolicyCommand.js +21 -28
- package/dist-es/commands/PutScheduledActionCommand.js +21 -28
- package/dist-es/commands/RegisterScalableTargetCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ApplicationAutoScalingServiceException.js +5 -10
- package/dist-es/models/models_0.js +183 -118
- package/dist-es/pagination/DescribeScalableTargetsPaginator.js +25 -68
- package/dist-es/pagination/DescribeScalingActivitiesPaginator.js +25 -68
- package/dist-es/pagination/DescribeScalingPoliciesPaginator.js +25 -68
- package/dist-es/pagination/DescribeScheduledActionsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +848 -1004
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { ApplicationAutoScalingServiceException as __BaseException } from "./ApplicationAutoScalingServiceException";
|
|
3
2
|
export var AdjustmentType;
|
|
4
3
|
(function (AdjustmentType) {
|
|
@@ -6,19 +5,19 @@ export var AdjustmentType;
|
|
|
6
5
|
AdjustmentType["ExactCapacity"] = "ExactCapacity";
|
|
7
6
|
AdjustmentType["PercentChangeInCapacity"] = "PercentChangeInCapacity";
|
|
8
7
|
})(AdjustmentType || (AdjustmentType = {}));
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
export class ConcurrentUpdateException extends __BaseException {
|
|
9
|
+
constructor(opts) {
|
|
10
|
+
super({
|
|
11
|
+
name: "ConcurrentUpdateException",
|
|
12
|
+
$fault: "server",
|
|
13
|
+
...opts,
|
|
14
|
+
});
|
|
15
|
+
this.name = "ConcurrentUpdateException";
|
|
16
|
+
this.$fault = "server";
|
|
17
|
+
Object.setPrototypeOf(this, ConcurrentUpdateException.prototype);
|
|
18
|
+
this.Message = opts.Message;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
}(__BaseException));
|
|
21
|
-
export { ConcurrentUpdateException };
|
|
20
|
+
}
|
|
22
21
|
export var ScalableDimension;
|
|
23
22
|
(function (ScalableDimension) {
|
|
24
23
|
ScalableDimension["AppstreamFleetDesiredCapacity"] = "appstream:fleet:DesiredCapacity";
|
|
@@ -59,58 +58,58 @@ export var ServiceNamespace;
|
|
|
59
58
|
ServiceNamespace["RDS"] = "rds";
|
|
60
59
|
ServiceNamespace["SAGEMAKER"] = "sagemaker";
|
|
61
60
|
})(ServiceNamespace || (ServiceNamespace = {}));
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
export class InternalServiceException extends __BaseException {
|
|
62
|
+
constructor(opts) {
|
|
63
|
+
super({
|
|
64
|
+
name: "InternalServiceException",
|
|
65
|
+
$fault: "server",
|
|
66
|
+
...opts,
|
|
67
|
+
});
|
|
68
|
+
this.name = "InternalServiceException";
|
|
69
|
+
this.$fault = "server";
|
|
70
|
+
Object.setPrototypeOf(this, InternalServiceException.prototype);
|
|
71
|
+
this.Message = opts.Message;
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
}
|
|
74
|
+
export class ObjectNotFoundException extends __BaseException {
|
|
75
|
+
constructor(opts) {
|
|
76
|
+
super({
|
|
77
|
+
name: "ObjectNotFoundException",
|
|
78
|
+
$fault: "client",
|
|
79
|
+
...opts,
|
|
80
|
+
});
|
|
81
|
+
this.name = "ObjectNotFoundException";
|
|
82
|
+
this.$fault = "client";
|
|
83
|
+
Object.setPrototypeOf(this, ObjectNotFoundException.prototype);
|
|
84
|
+
this.Message = opts.Message;
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
}
|
|
87
|
+
export class ValidationException extends __BaseException {
|
|
88
|
+
constructor(opts) {
|
|
89
|
+
super({
|
|
90
|
+
name: "ValidationException",
|
|
91
|
+
$fault: "client",
|
|
92
|
+
...opts,
|
|
93
|
+
});
|
|
94
|
+
this.name = "ValidationException";
|
|
95
|
+
this.$fault = "client";
|
|
96
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
97
|
+
this.Message = opts.Message;
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
}
|
|
100
|
+
export class InvalidNextTokenException extends __BaseException {
|
|
101
|
+
constructor(opts) {
|
|
102
|
+
super({
|
|
103
|
+
name: "InvalidNextTokenException",
|
|
104
|
+
$fault: "client",
|
|
105
|
+
...opts,
|
|
106
|
+
});
|
|
107
|
+
this.name = "InvalidNextTokenException";
|
|
108
|
+
this.$fault = "client";
|
|
109
|
+
Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
|
|
110
|
+
this.Message = opts.Message;
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
-
}(__BaseException));
|
|
113
|
-
export { InvalidNextTokenException };
|
|
112
|
+
}
|
|
114
113
|
export var ScalingActivityStatusCode;
|
|
115
114
|
(function (ScalingActivityStatusCode) {
|
|
116
115
|
ScalingActivityStatusCode["Failed"] = "Failed";
|
|
@@ -163,62 +162,128 @@ export var MetricType;
|
|
|
163
162
|
MetricType["RDSReaderAverageDatabaseConnections"] = "RDSReaderAverageDatabaseConnections";
|
|
164
163
|
MetricType["SageMakerVariantInvocationsPerInstance"] = "SageMakerVariantInvocationsPerInstance";
|
|
165
164
|
})(MetricType || (MetricType = {}));
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
165
|
+
export class FailedResourceAccessException extends __BaseException {
|
|
166
|
+
constructor(opts) {
|
|
167
|
+
super({
|
|
168
|
+
name: "FailedResourceAccessException",
|
|
169
|
+
$fault: "client",
|
|
170
|
+
...opts,
|
|
171
|
+
});
|
|
172
|
+
this.name = "FailedResourceAccessException";
|
|
173
|
+
this.$fault = "client";
|
|
174
|
+
Object.setPrototypeOf(this, FailedResourceAccessException.prototype);
|
|
175
|
+
this.Message = opts.Message;
|
|
175
176
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
177
|
+
}
|
|
178
|
+
export class LimitExceededException extends __BaseException {
|
|
179
|
+
constructor(opts) {
|
|
180
|
+
super({
|
|
181
|
+
name: "LimitExceededException",
|
|
182
|
+
$fault: "client",
|
|
183
|
+
...opts,
|
|
184
|
+
});
|
|
185
|
+
this.name = "LimitExceededException";
|
|
186
|
+
this.$fault = "client";
|
|
187
|
+
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
188
|
+
this.Message = opts.Message;
|
|
188
189
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
export
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
export
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
export
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
export
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
export
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
export
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
export
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
export
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
export
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
export
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
export
|
|
224
|
-
|
|
190
|
+
}
|
|
191
|
+
export const AlarmFilterSensitiveLog = (obj) => ({
|
|
192
|
+
...obj,
|
|
193
|
+
});
|
|
194
|
+
export const DeleteScalingPolicyRequestFilterSensitiveLog = (obj) => ({
|
|
195
|
+
...obj,
|
|
196
|
+
});
|
|
197
|
+
export const DeleteScalingPolicyResponseFilterSensitiveLog = (obj) => ({
|
|
198
|
+
...obj,
|
|
199
|
+
});
|
|
200
|
+
export const DeleteScheduledActionRequestFilterSensitiveLog = (obj) => ({
|
|
201
|
+
...obj,
|
|
202
|
+
});
|
|
203
|
+
export const DeleteScheduledActionResponseFilterSensitiveLog = (obj) => ({
|
|
204
|
+
...obj,
|
|
205
|
+
});
|
|
206
|
+
export const DeregisterScalableTargetRequestFilterSensitiveLog = (obj) => ({
|
|
207
|
+
...obj,
|
|
208
|
+
});
|
|
209
|
+
export const DeregisterScalableTargetResponseFilterSensitiveLog = (obj) => ({
|
|
210
|
+
...obj,
|
|
211
|
+
});
|
|
212
|
+
export const DescribeScalableTargetsRequestFilterSensitiveLog = (obj) => ({
|
|
213
|
+
...obj,
|
|
214
|
+
});
|
|
215
|
+
export const SuspendedStateFilterSensitiveLog = (obj) => ({
|
|
216
|
+
...obj,
|
|
217
|
+
});
|
|
218
|
+
export const ScalableTargetFilterSensitiveLog = (obj) => ({
|
|
219
|
+
...obj,
|
|
220
|
+
});
|
|
221
|
+
export const DescribeScalableTargetsResponseFilterSensitiveLog = (obj) => ({
|
|
222
|
+
...obj,
|
|
223
|
+
});
|
|
224
|
+
export const DescribeScalingActivitiesRequestFilterSensitiveLog = (obj) => ({
|
|
225
|
+
...obj,
|
|
226
|
+
});
|
|
227
|
+
export const ScalingActivityFilterSensitiveLog = (obj) => ({
|
|
228
|
+
...obj,
|
|
229
|
+
});
|
|
230
|
+
export const DescribeScalingActivitiesResponseFilterSensitiveLog = (obj) => ({
|
|
231
|
+
...obj,
|
|
232
|
+
});
|
|
233
|
+
export const DescribeScalingPoliciesRequestFilterSensitiveLog = (obj) => ({
|
|
234
|
+
...obj,
|
|
235
|
+
});
|
|
236
|
+
export const StepAdjustmentFilterSensitiveLog = (obj) => ({
|
|
237
|
+
...obj,
|
|
238
|
+
});
|
|
239
|
+
export const StepScalingPolicyConfigurationFilterSensitiveLog = (obj) => ({
|
|
240
|
+
...obj,
|
|
241
|
+
});
|
|
242
|
+
export const MetricDimensionFilterSensitiveLog = (obj) => ({
|
|
243
|
+
...obj,
|
|
244
|
+
});
|
|
245
|
+
export const CustomizedMetricSpecificationFilterSensitiveLog = (obj) => ({
|
|
246
|
+
...obj,
|
|
247
|
+
});
|
|
248
|
+
export const PredefinedMetricSpecificationFilterSensitiveLog = (obj) => ({
|
|
249
|
+
...obj,
|
|
250
|
+
});
|
|
251
|
+
export const TargetTrackingScalingPolicyConfigurationFilterSensitiveLog = (obj) => ({
|
|
252
|
+
...obj,
|
|
253
|
+
});
|
|
254
|
+
export const ScalingPolicyFilterSensitiveLog = (obj) => ({
|
|
255
|
+
...obj,
|
|
256
|
+
});
|
|
257
|
+
export const DescribeScalingPoliciesResponseFilterSensitiveLog = (obj) => ({
|
|
258
|
+
...obj,
|
|
259
|
+
});
|
|
260
|
+
export const DescribeScheduledActionsRequestFilterSensitiveLog = (obj) => ({
|
|
261
|
+
...obj,
|
|
262
|
+
});
|
|
263
|
+
export const ScalableTargetActionFilterSensitiveLog = (obj) => ({
|
|
264
|
+
...obj,
|
|
265
|
+
});
|
|
266
|
+
export const ScheduledActionFilterSensitiveLog = (obj) => ({
|
|
267
|
+
...obj,
|
|
268
|
+
});
|
|
269
|
+
export const DescribeScheduledActionsResponseFilterSensitiveLog = (obj) => ({
|
|
270
|
+
...obj,
|
|
271
|
+
});
|
|
272
|
+
export const PutScalingPolicyRequestFilterSensitiveLog = (obj) => ({
|
|
273
|
+
...obj,
|
|
274
|
+
});
|
|
275
|
+
export const PutScalingPolicyResponseFilterSensitiveLog = (obj) => ({
|
|
276
|
+
...obj,
|
|
277
|
+
});
|
|
278
|
+
export const PutScheduledActionRequestFilterSensitiveLog = (obj) => ({
|
|
279
|
+
...obj,
|
|
280
|
+
});
|
|
281
|
+
export const PutScheduledActionResponseFilterSensitiveLog = (obj) => ({
|
|
282
|
+
...obj,
|
|
283
|
+
});
|
|
284
|
+
export const RegisterScalableTargetRequestFilterSensitiveLog = (obj) => ({
|
|
285
|
+
...obj,
|
|
286
|
+
});
|
|
287
|
+
export const RegisterScalableTargetResponseFilterSensitiveLog = (obj) => ({
|
|
288
|
+
...obj,
|
|
289
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { ApplicationAutoScaling } from "../ApplicationAutoScaling";
|
|
3
2
|
import { ApplicationAutoScalingClient } from "../ApplicationAutoScalingClient";
|
|
4
3
|
import { DescribeScalableTargetsCommand, } from "../commands/DescribeScalableTargetsCommand";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
-
args[_i - 2] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
-
return __generator(this, function (_a) {
|
|
12
|
-
switch (_a.label) {
|
|
13
|
-
case 0: return [4, client.send.apply(client, __spreadArray([new DescribeScalableTargetsCommand(input)], __read(args), false))];
|
|
14
|
-
case 1: return [2, _a.sent()];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new DescribeScalableTargetsCommand(input), ...args);
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
-
args[_i - 2] = arguments[_i];
|
|
23
|
-
}
|
|
24
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
-
return __generator(this, function (_a) {
|
|
26
|
-
switch (_a.label) {
|
|
27
|
-
case 0: return [4, client.describeScalableTargets.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
-
case 1: return [2, _a.sent()];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.describeScalableTargets(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateDescribeScalableTargets(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateDescribeScalableTargets(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 ApplicationAutoScaling) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ApplicationAutoScalingClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ApplicationAutoScaling | ApplicationAutoScalingClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.NextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
37
30
|
}
|
|
38
|
-
return
|
|
39
|
-
var token, hasNext, page, prevToken;
|
|
40
|
-
return __generator(this, function (_a) {
|
|
41
|
-
switch (_a.label) {
|
|
42
|
-
case 0:
|
|
43
|
-
token = config.startingToken || undefined;
|
|
44
|
-
hasNext = true;
|
|
45
|
-
_a.label = 1;
|
|
46
|
-
case 1:
|
|
47
|
-
if (!hasNext) return [3, 9];
|
|
48
|
-
input.NextToken = token;
|
|
49
|
-
input["MaxResults"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof ApplicationAutoScaling)) return [3, 3];
|
|
51
|
-
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
-
case 2:
|
|
53
|
-
page = _a.sent();
|
|
54
|
-
return [3, 6];
|
|
55
|
-
case 3:
|
|
56
|
-
if (!(config.client instanceof ApplicationAutoScalingClient)) return [3, 5];
|
|
57
|
-
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
-
case 4:
|
|
59
|
-
page = _a.sent();
|
|
60
|
-
return [3, 6];
|
|
61
|
-
case 5: throw new Error("Invalid client, expected ApplicationAutoScaling | ApplicationAutoScalingClient");
|
|
62
|
-
case 6: return [4, __await(page)];
|
|
63
|
-
case 7: return [4, _a.sent()];
|
|
64
|
-
case 8:
|
|
65
|
-
_a.sent();
|
|
66
|
-
prevToken = token;
|
|
67
|
-
token = page.NextToken;
|
|
68
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
-
return [3, 1];
|
|
70
|
-
case 9: return [4, __await(undefined)];
|
|
71
|
-
case 10: return [2, _a.sent()];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
31
|
+
return undefined;
|
|
75
32
|
}
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { ApplicationAutoScaling } from "../ApplicationAutoScaling";
|
|
3
2
|
import { ApplicationAutoScalingClient } from "../ApplicationAutoScalingClient";
|
|
4
3
|
import { DescribeScalingActivitiesCommand, } from "../commands/DescribeScalingActivitiesCommand";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
-
args[_i - 2] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
-
return __generator(this, function (_a) {
|
|
12
|
-
switch (_a.label) {
|
|
13
|
-
case 0: return [4, client.send.apply(client, __spreadArray([new DescribeScalingActivitiesCommand(input)], __read(args), false))];
|
|
14
|
-
case 1: return [2, _a.sent()];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new DescribeScalingActivitiesCommand(input), ...args);
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
-
args[_i - 2] = arguments[_i];
|
|
23
|
-
}
|
|
24
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
-
return __generator(this, function (_a) {
|
|
26
|
-
switch (_a.label) {
|
|
27
|
-
case 0: return [4, client.describeScalingActivities.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
-
case 1: return [2, _a.sent()];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.describeScalingActivities(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateDescribeScalingActivities(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateDescribeScalingActivities(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 ApplicationAutoScaling) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ApplicationAutoScalingClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ApplicationAutoScaling | ApplicationAutoScalingClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.NextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
37
30
|
}
|
|
38
|
-
return
|
|
39
|
-
var token, hasNext, page, prevToken;
|
|
40
|
-
return __generator(this, function (_a) {
|
|
41
|
-
switch (_a.label) {
|
|
42
|
-
case 0:
|
|
43
|
-
token = config.startingToken || undefined;
|
|
44
|
-
hasNext = true;
|
|
45
|
-
_a.label = 1;
|
|
46
|
-
case 1:
|
|
47
|
-
if (!hasNext) return [3, 9];
|
|
48
|
-
input.NextToken = token;
|
|
49
|
-
input["MaxResults"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof ApplicationAutoScaling)) return [3, 3];
|
|
51
|
-
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
-
case 2:
|
|
53
|
-
page = _a.sent();
|
|
54
|
-
return [3, 6];
|
|
55
|
-
case 3:
|
|
56
|
-
if (!(config.client instanceof ApplicationAutoScalingClient)) return [3, 5];
|
|
57
|
-
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
-
case 4:
|
|
59
|
-
page = _a.sent();
|
|
60
|
-
return [3, 6];
|
|
61
|
-
case 5: throw new Error("Invalid client, expected ApplicationAutoScaling | ApplicationAutoScalingClient");
|
|
62
|
-
case 6: return [4, __await(page)];
|
|
63
|
-
case 7: return [4, _a.sent()];
|
|
64
|
-
case 8:
|
|
65
|
-
_a.sent();
|
|
66
|
-
prevToken = token;
|
|
67
|
-
token = page.NextToken;
|
|
68
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
-
return [3, 1];
|
|
70
|
-
case 9: return [4, __await(undefined)];
|
|
71
|
-
case 10: return [2, _a.sent()];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
31
|
+
return undefined;
|
|
75
32
|
}
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { ApplicationAutoScaling } from "../ApplicationAutoScaling";
|
|
3
2
|
import { ApplicationAutoScalingClient } from "../ApplicationAutoScalingClient";
|
|
4
3
|
import { DescribeScalingPoliciesCommand, } from "../commands/DescribeScalingPoliciesCommand";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
-
args[_i - 2] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
-
return __generator(this, function (_a) {
|
|
12
|
-
switch (_a.label) {
|
|
13
|
-
case 0: return [4, client.send.apply(client, __spreadArray([new DescribeScalingPoliciesCommand(input)], __read(args), false))];
|
|
14
|
-
case 1: return [2, _a.sent()];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
});
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new DescribeScalingPoliciesCommand(input), ...args);
|
|
18
6
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
-
args[_i - 2] = arguments[_i];
|
|
23
|
-
}
|
|
24
|
-
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
-
return __generator(this, function (_a) {
|
|
26
|
-
switch (_a.label) {
|
|
27
|
-
case 0: return [4, client.describeScalingPolicies.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
-
case 1: return [2, _a.sent()];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.describeScalingPolicies(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateDescribeScalingPolicies(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateDescribeScalingPolicies(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 ApplicationAutoScaling) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof ApplicationAutoScalingClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected ApplicationAutoScaling | ApplicationAutoScalingClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.NextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
37
30
|
}
|
|
38
|
-
return
|
|
39
|
-
var token, hasNext, page, prevToken;
|
|
40
|
-
return __generator(this, function (_a) {
|
|
41
|
-
switch (_a.label) {
|
|
42
|
-
case 0:
|
|
43
|
-
token = config.startingToken || undefined;
|
|
44
|
-
hasNext = true;
|
|
45
|
-
_a.label = 1;
|
|
46
|
-
case 1:
|
|
47
|
-
if (!hasNext) return [3, 9];
|
|
48
|
-
input.NextToken = token;
|
|
49
|
-
input["MaxResults"] = config.pageSize;
|
|
50
|
-
if (!(config.client instanceof ApplicationAutoScaling)) return [3, 3];
|
|
51
|
-
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
-
case 2:
|
|
53
|
-
page = _a.sent();
|
|
54
|
-
return [3, 6];
|
|
55
|
-
case 3:
|
|
56
|
-
if (!(config.client instanceof ApplicationAutoScalingClient)) return [3, 5];
|
|
57
|
-
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
-
case 4:
|
|
59
|
-
page = _a.sent();
|
|
60
|
-
return [3, 6];
|
|
61
|
-
case 5: throw new Error("Invalid client, expected ApplicationAutoScaling | ApplicationAutoScalingClient");
|
|
62
|
-
case 6: return [4, __await(page)];
|
|
63
|
-
case 7: return [4, _a.sent()];
|
|
64
|
-
case 8:
|
|
65
|
-
_a.sent();
|
|
66
|
-
prevToken = token;
|
|
67
|
-
token = page.NextToken;
|
|
68
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
-
return [3, 1];
|
|
70
|
-
case 9: return [4, __await(undefined)];
|
|
71
|
-
case 10: return [2, _a.sent()];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
31
|
+
return undefined;
|
|
75
32
|
}
|