@aws-sdk/client-application-auto-scaling 3.183.0 → 3.185.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +2 -2
  3. package/dist-es/ApplicationAutoScaling.js +49 -42
  4. package/dist-es/ApplicationAutoScalingClient.js +28 -22
  5. package/dist-es/commands/DeleteScalingPolicyCommand.js +28 -21
  6. package/dist-es/commands/DeleteScheduledActionCommand.js +28 -21
  7. package/dist-es/commands/DeregisterScalableTargetCommand.js +28 -21
  8. package/dist-es/commands/DescribeScalableTargetsCommand.js +28 -21
  9. package/dist-es/commands/DescribeScalingActivitiesCommand.js +28 -21
  10. package/dist-es/commands/DescribeScalingPoliciesCommand.js +28 -21
  11. package/dist-es/commands/DescribeScheduledActionsCommand.js +28 -21
  12. package/dist-es/commands/PutScalingPolicyCommand.js +28 -21
  13. package/dist-es/commands/PutScheduledActionCommand.js +28 -21
  14. package/dist-es/commands/RegisterScalableTargetCommand.js +28 -21
  15. package/dist-es/endpoints.js +8 -8
  16. package/dist-es/models/ApplicationAutoScalingServiceException.js +10 -5
  17. package/dist-es/models/models_0.js +118 -183
  18. package/dist-es/pagination/DescribeScalableTargetsPaginator.js +68 -25
  19. package/dist-es/pagination/DescribeScalingActivitiesPaginator.js +68 -25
  20. package/dist-es/pagination/DescribeScalingPoliciesPaginator.js +68 -25
  21. package/dist-es/pagination/DescribeScheduledActionsPaginator.js +68 -25
  22. package/dist-es/protocols/Aws_json1_1.js +1004 -848
  23. package/dist-es/runtimeConfig.browser.js +12 -26
  24. package/dist-es/runtimeConfig.js +12 -30
  25. package/dist-es/runtimeConfig.native.js +5 -8
  26. package/dist-es/runtimeConfig.shared.js +11 -8
  27. package/package.json +5 -5
@@ -1,3 +1,4 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { ApplicationAutoScalingServiceException as __BaseException } from "./ApplicationAutoScalingServiceException";
2
3
  export var AdjustmentType;
3
4
  (function (AdjustmentType) {
@@ -5,19 +6,19 @@ export var AdjustmentType;
5
6
  AdjustmentType["ExactCapacity"] = "ExactCapacity";
6
7
  AdjustmentType["PercentChangeInCapacity"] = "PercentChangeInCapacity";
7
8
  })(AdjustmentType || (AdjustmentType = {}));
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;
9
+ var ConcurrentUpdateException = (function (_super) {
10
+ __extends(ConcurrentUpdateException, _super);
11
+ function ConcurrentUpdateException(opts) {
12
+ var _this = _super.call(this, __assign({ name: "ConcurrentUpdateException", $fault: "server" }, opts)) || this;
13
+ _this.name = "ConcurrentUpdateException";
14
+ _this.$fault = "server";
15
+ Object.setPrototypeOf(_this, ConcurrentUpdateException.prototype);
16
+ _this.Message = opts.Message;
17
+ return _this;
19
18
  }
20
- }
19
+ return ConcurrentUpdateException;
20
+ }(__BaseException));
21
+ export { ConcurrentUpdateException };
21
22
  export var ScalableDimension;
22
23
  (function (ScalableDimension) {
23
24
  ScalableDimension["AppstreamFleetDesiredCapacity"] = "appstream:fleet:DesiredCapacity";
@@ -58,58 +59,58 @@ export var ServiceNamespace;
58
59
  ServiceNamespace["RDS"] = "rds";
59
60
  ServiceNamespace["SAGEMAKER"] = "sagemaker";
60
61
  })(ServiceNamespace || (ServiceNamespace = {}));
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;
62
+ var InternalServiceException = (function (_super) {
63
+ __extends(InternalServiceException, _super);
64
+ function InternalServiceException(opts) {
65
+ var _this = _super.call(this, __assign({ name: "InternalServiceException", $fault: "server" }, opts)) || this;
66
+ _this.name = "InternalServiceException";
67
+ _this.$fault = "server";
68
+ Object.setPrototypeOf(_this, InternalServiceException.prototype);
69
+ _this.Message = opts.Message;
70
+ return _this;
72
71
  }
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;
72
+ return InternalServiceException;
73
+ }(__BaseException));
74
+ export { InternalServiceException };
75
+ var ObjectNotFoundException = (function (_super) {
76
+ __extends(ObjectNotFoundException, _super);
77
+ function ObjectNotFoundException(opts) {
78
+ var _this = _super.call(this, __assign({ name: "ObjectNotFoundException", $fault: "client" }, opts)) || this;
79
+ _this.name = "ObjectNotFoundException";
80
+ _this.$fault = "client";
81
+ Object.setPrototypeOf(_this, ObjectNotFoundException.prototype);
82
+ _this.Message = opts.Message;
83
+ return _this;
85
84
  }
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;
85
+ return ObjectNotFoundException;
86
+ }(__BaseException));
87
+ export { ObjectNotFoundException };
88
+ var ValidationException = (function (_super) {
89
+ __extends(ValidationException, _super);
90
+ function ValidationException(opts) {
91
+ var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
92
+ _this.name = "ValidationException";
93
+ _this.$fault = "client";
94
+ Object.setPrototypeOf(_this, ValidationException.prototype);
95
+ _this.Message = opts.Message;
96
+ return _this;
98
97
  }
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;
98
+ return ValidationException;
99
+ }(__BaseException));
100
+ export { ValidationException };
101
+ var InvalidNextTokenException = (function (_super) {
102
+ __extends(InvalidNextTokenException, _super);
103
+ function InvalidNextTokenException(opts) {
104
+ var _this = _super.call(this, __assign({ name: "InvalidNextTokenException", $fault: "client" }, opts)) || this;
105
+ _this.name = "InvalidNextTokenException";
106
+ _this.$fault = "client";
107
+ Object.setPrototypeOf(_this, InvalidNextTokenException.prototype);
108
+ _this.Message = opts.Message;
109
+ return _this;
111
110
  }
112
- }
111
+ return InvalidNextTokenException;
112
+ }(__BaseException));
113
+ export { InvalidNextTokenException };
113
114
  export var ScalingActivityStatusCode;
114
115
  (function (ScalingActivityStatusCode) {
115
116
  ScalingActivityStatusCode["Failed"] = "Failed";
@@ -162,128 +163,62 @@ export var MetricType;
162
163
  MetricType["RDSReaderAverageDatabaseConnections"] = "RDSReaderAverageDatabaseConnections";
163
164
  MetricType["SageMakerVariantInvocationsPerInstance"] = "SageMakerVariantInvocationsPerInstance";
164
165
  })(MetricType || (MetricType = {}));
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;
166
+ var FailedResourceAccessException = (function (_super) {
167
+ __extends(FailedResourceAccessException, _super);
168
+ function FailedResourceAccessException(opts) {
169
+ var _this = _super.call(this, __assign({ name: "FailedResourceAccessException", $fault: "client" }, opts)) || this;
170
+ _this.name = "FailedResourceAccessException";
171
+ _this.$fault = "client";
172
+ Object.setPrototypeOf(_this, FailedResourceAccessException.prototype);
173
+ _this.Message = opts.Message;
174
+ return _this;
176
175
  }
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;
176
+ return FailedResourceAccessException;
177
+ }(__BaseException));
178
+ export { FailedResourceAccessException };
179
+ var LimitExceededException = (function (_super) {
180
+ __extends(LimitExceededException, _super);
181
+ function LimitExceededException(opts) {
182
+ var _this = _super.call(this, __assign({ name: "LimitExceededException", $fault: "client" }, opts)) || this;
183
+ _this.name = "LimitExceededException";
184
+ _this.$fault = "client";
185
+ Object.setPrototypeOf(_this, LimitExceededException.prototype);
186
+ _this.Message = opts.Message;
187
+ return _this;
189
188
  }
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
- });
189
+ return LimitExceededException;
190
+ }(__BaseException));
191
+ export { LimitExceededException };
192
+ export var AlarmFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
193
+ export var DeleteScalingPolicyRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
194
+ export var DeleteScalingPolicyResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
195
+ export var DeleteScheduledActionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
196
+ export var DeleteScheduledActionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
197
+ export var DeregisterScalableTargetRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
198
+ export var DeregisterScalableTargetResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
199
+ export var DescribeScalableTargetsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
200
+ export var SuspendedStateFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
201
+ export var ScalableTargetFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
202
+ export var DescribeScalableTargetsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
203
+ export var DescribeScalingActivitiesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
204
+ export var ScalingActivityFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
205
+ export var DescribeScalingActivitiesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
206
+ export var DescribeScalingPoliciesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
207
+ export var StepAdjustmentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
208
+ export var StepScalingPolicyConfigurationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
209
+ export var MetricDimensionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
210
+ export var CustomizedMetricSpecificationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
211
+ export var PredefinedMetricSpecificationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
212
+ export var TargetTrackingScalingPolicyConfigurationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
213
+ export var ScalingPolicyFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
214
+ export var DescribeScalingPoliciesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
215
+ export var DescribeScheduledActionsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
216
+ export var ScalableTargetActionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
217
+ export var ScheduledActionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
218
+ export var DescribeScheduledActionsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
219
+ export var PutScalingPolicyRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
220
+ export var PutScalingPolicyResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
221
+ export var PutScheduledActionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
222
+ export var PutScheduledActionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
223
+ export var RegisterScalableTargetRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
224
+ export var RegisterScalableTargetResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { ApplicationAutoScaling } from "../ApplicationAutoScaling";
2
3
  import { ApplicationAutoScalingClient } from "../ApplicationAutoScalingClient";
3
4
  import { DescribeScalableTargetsCommand, } from "../commands/DescribeScalableTargetsCommand";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new DescribeScalableTargetsCommand(input), ...args);
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
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
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.describeScalableTargets(input, ...args);
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
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
+ });
9
32
  };
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));
33
+ export function paginateDescribeScalableTargets(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateDescribeScalableTargets_1() {
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
+ });
32
75
  }
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { ApplicationAutoScaling } from "../ApplicationAutoScaling";
2
3
  import { ApplicationAutoScalingClient } from "../ApplicationAutoScalingClient";
3
4
  import { DescribeScalingActivitiesCommand, } from "../commands/DescribeScalingActivitiesCommand";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new DescribeScalingActivitiesCommand(input), ...args);
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
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
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.describeScalingActivities(input, ...args);
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
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
+ });
9
32
  };
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));
33
+ export function paginateDescribeScalingActivities(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateDescribeScalingActivities_1() {
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
+ });
32
75
  }
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { ApplicationAutoScaling } from "../ApplicationAutoScaling";
2
3
  import { ApplicationAutoScalingClient } from "../ApplicationAutoScalingClient";
3
4
  import { DescribeScalingPoliciesCommand, } from "../commands/DescribeScalingPoliciesCommand";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new DescribeScalingPoliciesCommand(input), ...args);
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
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
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.describeScalingPolicies(input, ...args);
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
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
+ });
9
32
  };
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));
33
+ export function paginateDescribeScalingPolicies(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateDescribeScalingPolicies_1() {
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
+ });
32
75
  }