@aws-sdk/client-amp 3.186.0 → 3.190.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 +16 -0
- package/dist-es/Amp.js +86 -93
- package/dist-es/AmpClient.js +22 -28
- package/dist-es/commands/CreateAlertManagerDefinitionCommand.js +21 -28
- package/dist-es/commands/CreateLoggingConfigurationCommand.js +21 -28
- package/dist-es/commands/CreateRuleGroupsNamespaceCommand.js +21 -28
- package/dist-es/commands/CreateWorkspaceCommand.js +21 -28
- package/dist-es/commands/DeleteAlertManagerDefinitionCommand.js +22 -29
- package/dist-es/commands/DeleteLoggingConfigurationCommand.js +22 -29
- package/dist-es/commands/DeleteRuleGroupsNamespaceCommand.js +22 -29
- package/dist-es/commands/DeleteWorkspaceCommand.js +22 -29
- package/dist-es/commands/DescribeAlertManagerDefinitionCommand.js +21 -28
- package/dist-es/commands/DescribeLoggingConfigurationCommand.js +21 -28
- package/dist-es/commands/DescribeRuleGroupsNamespaceCommand.js +21 -28
- package/dist-es/commands/DescribeWorkspaceCommand.js +21 -28
- package/dist-es/commands/ListRuleGroupsNamespacesCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListWorkspacesCommand.js +21 -28
- package/dist-es/commands/PutAlertManagerDefinitionCommand.js +21 -28
- package/dist-es/commands/PutRuleGroupsNamespaceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateLoggingConfigurationCommand.js +21 -28
- package/dist-es/commands/UpdateWorkspaceAliasCommand.js +22 -29
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/AmpServiceException.js +5 -10
- package/dist-es/models/models_0.js +237 -142
- package/dist-es/pagination/ListRuleGroupsNamespacesPaginator.js +25 -68
- package/dist-es/pagination/ListWorkspacesPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1569 -2255
- 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/dist-es/waiters/waitForWorkspaceActive.js +45 -65
- package/dist-es/waiters/waitForWorkspaceDeleted.js +30 -50
- package/package.json +34 -34
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { AmpServiceException as __BaseException } from "./AmpServiceException";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AccessDeniedException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AccessDeniedException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
}
|
|
14
|
+
export class ConflictException extends __BaseException {
|
|
15
|
+
constructor(opts) {
|
|
16
|
+
super({
|
|
17
|
+
name: "ConflictException",
|
|
18
|
+
$fault: "client",
|
|
19
|
+
...opts,
|
|
20
|
+
});
|
|
21
|
+
this.name = "ConflictException";
|
|
22
|
+
this.$fault = "client";
|
|
23
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
24
|
+
this.resourceId = opts.resourceId;
|
|
25
|
+
this.resourceType = opts.resourceType;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
}(__BaseException));
|
|
28
|
-
export { ConflictException };
|
|
27
|
+
}
|
|
29
28
|
export var AlertManagerDefinitionStatusCode;
|
|
30
29
|
(function (AlertManagerDefinitionStatusCode) {
|
|
31
30
|
AlertManagerDefinitionStatusCode["ACTIVE"] = "ACTIVE";
|
|
@@ -35,66 +34,66 @@ export var AlertManagerDefinitionStatusCode;
|
|
|
35
34
|
AlertManagerDefinitionStatusCode["UPDATE_FAILED"] = "UPDATE_FAILED";
|
|
36
35
|
AlertManagerDefinitionStatusCode["UPDATING"] = "UPDATING";
|
|
37
36
|
})(AlertManagerDefinitionStatusCode || (AlertManagerDefinitionStatusCode = {}));
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
export class InternalServerException extends __BaseException {
|
|
38
|
+
constructor(opts) {
|
|
39
|
+
super({
|
|
40
|
+
name: "InternalServerException",
|
|
41
|
+
$fault: "server",
|
|
42
|
+
...opts,
|
|
43
|
+
});
|
|
44
|
+
this.name = "InternalServerException";
|
|
45
|
+
this.$fault = "server";
|
|
46
|
+
this.$retryable = {};
|
|
47
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
48
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
}
|
|
51
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
52
|
+
constructor(opts) {
|
|
53
|
+
super({
|
|
54
|
+
name: "ResourceNotFoundException",
|
|
55
|
+
$fault: "client",
|
|
56
|
+
...opts,
|
|
57
|
+
});
|
|
58
|
+
this.name = "ResourceNotFoundException";
|
|
59
|
+
this.$fault = "client";
|
|
60
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
61
|
+
this.resourceId = opts.resourceId;
|
|
62
|
+
this.resourceType = opts.resourceType;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
}
|
|
65
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
66
|
+
constructor(opts) {
|
|
67
|
+
super({
|
|
68
|
+
name: "ServiceQuotaExceededException",
|
|
69
|
+
$fault: "client",
|
|
70
|
+
...opts,
|
|
71
|
+
});
|
|
72
|
+
this.name = "ServiceQuotaExceededException";
|
|
73
|
+
this.$fault = "client";
|
|
74
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
75
|
+
this.resourceId = opts.resourceId;
|
|
76
|
+
this.resourceType = opts.resourceType;
|
|
77
|
+
this.serviceCode = opts.serviceCode;
|
|
78
|
+
this.quotaCode = opts.quotaCode;
|
|
78
79
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
}
|
|
81
|
+
export class ThrottlingException extends __BaseException {
|
|
82
|
+
constructor(opts) {
|
|
83
|
+
super({
|
|
84
|
+
name: "ThrottlingException",
|
|
85
|
+
$fault: "client",
|
|
86
|
+
...opts,
|
|
87
|
+
});
|
|
88
|
+
this.name = "ThrottlingException";
|
|
89
|
+
this.$fault = "client";
|
|
90
|
+
this.$retryable = {};
|
|
91
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
92
|
+
this.serviceCode = opts.serviceCode;
|
|
93
|
+
this.quotaCode = opts.quotaCode;
|
|
94
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
94
95
|
}
|
|
95
|
-
|
|
96
|
-
}(__BaseException));
|
|
97
|
-
export { ThrottlingException };
|
|
96
|
+
}
|
|
98
97
|
export var ValidationExceptionReason;
|
|
99
98
|
(function (ValidationExceptionReason) {
|
|
100
99
|
ValidationExceptionReason["CANNOT_PARSE"] = "CANNOT_PARSE";
|
|
@@ -102,20 +101,20 @@ export var ValidationExceptionReason;
|
|
|
102
101
|
ValidationExceptionReason["OTHER"] = "OTHER";
|
|
103
102
|
ValidationExceptionReason["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
|
|
104
103
|
})(ValidationExceptionReason || (ValidationExceptionReason = {}));
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
export class ValidationException extends __BaseException {
|
|
105
|
+
constructor(opts) {
|
|
106
|
+
super({
|
|
107
|
+
name: "ValidationException",
|
|
108
|
+
$fault: "client",
|
|
109
|
+
...opts,
|
|
110
|
+
});
|
|
111
|
+
this.name = "ValidationException";
|
|
112
|
+
this.$fault = "client";
|
|
113
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
114
|
+
this.reason = opts.reason;
|
|
115
|
+
this.fieldList = opts.fieldList;
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
-
}(__BaseException));
|
|
118
|
-
export { ValidationException };
|
|
117
|
+
}
|
|
119
118
|
export var WorkspaceStatusCode;
|
|
120
119
|
(function (WorkspaceStatusCode) {
|
|
121
120
|
WorkspaceStatusCode["ACTIVE"] = "ACTIVE";
|
|
@@ -142,51 +141,147 @@ export var RuleGroupsNamespaceStatusCode;
|
|
|
142
141
|
RuleGroupsNamespaceStatusCode["UPDATE_FAILED"] = "UPDATE_FAILED";
|
|
143
142
|
RuleGroupsNamespaceStatusCode["UPDATING"] = "UPDATING";
|
|
144
143
|
})(RuleGroupsNamespaceStatusCode || (RuleGroupsNamespaceStatusCode = {}));
|
|
145
|
-
export
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
export
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
export
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
export
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
export
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
export
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
export
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
export
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
export
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
export
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
export
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
export
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
export
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
export
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
export
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
export
|
|
191
|
-
|
|
192
|
-
|
|
144
|
+
export const CreateAlertManagerDefinitionRequestFilterSensitiveLog = (obj) => ({
|
|
145
|
+
...obj,
|
|
146
|
+
});
|
|
147
|
+
export const AlertManagerDefinitionStatusFilterSensitiveLog = (obj) => ({
|
|
148
|
+
...obj,
|
|
149
|
+
});
|
|
150
|
+
export const CreateAlertManagerDefinitionResponseFilterSensitiveLog = (obj) => ({
|
|
151
|
+
...obj,
|
|
152
|
+
});
|
|
153
|
+
export const ValidationExceptionFieldFilterSensitiveLog = (obj) => ({
|
|
154
|
+
...obj,
|
|
155
|
+
});
|
|
156
|
+
export const DeleteAlertManagerDefinitionRequestFilterSensitiveLog = (obj) => ({
|
|
157
|
+
...obj,
|
|
158
|
+
});
|
|
159
|
+
export const DescribeAlertManagerDefinitionRequestFilterSensitiveLog = (obj) => ({
|
|
160
|
+
...obj,
|
|
161
|
+
});
|
|
162
|
+
export const AlertManagerDefinitionDescriptionFilterSensitiveLog = (obj) => ({
|
|
163
|
+
...obj,
|
|
164
|
+
});
|
|
165
|
+
export const DescribeAlertManagerDefinitionResponseFilterSensitiveLog = (obj) => ({
|
|
166
|
+
...obj,
|
|
167
|
+
});
|
|
168
|
+
export const PutAlertManagerDefinitionRequestFilterSensitiveLog = (obj) => ({
|
|
169
|
+
...obj,
|
|
170
|
+
});
|
|
171
|
+
export const PutAlertManagerDefinitionResponseFilterSensitiveLog = (obj) => ({
|
|
172
|
+
...obj,
|
|
173
|
+
});
|
|
174
|
+
export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
|
|
175
|
+
...obj,
|
|
176
|
+
});
|
|
177
|
+
export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
|
|
178
|
+
...obj,
|
|
179
|
+
});
|
|
180
|
+
export const TagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
181
|
+
...obj,
|
|
182
|
+
});
|
|
183
|
+
export const TagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
184
|
+
...obj,
|
|
185
|
+
});
|
|
186
|
+
export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
187
|
+
...obj,
|
|
188
|
+
});
|
|
189
|
+
export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
190
|
+
...obj,
|
|
191
|
+
});
|
|
192
|
+
export const CreateWorkspaceRequestFilterSensitiveLog = (obj) => ({
|
|
193
|
+
...obj,
|
|
194
|
+
});
|
|
195
|
+
export const WorkspaceStatusFilterSensitiveLog = (obj) => ({
|
|
196
|
+
...obj,
|
|
197
|
+
});
|
|
198
|
+
export const CreateWorkspaceResponseFilterSensitiveLog = (obj) => ({
|
|
199
|
+
...obj,
|
|
200
|
+
});
|
|
201
|
+
export const DeleteWorkspaceRequestFilterSensitiveLog = (obj) => ({
|
|
202
|
+
...obj,
|
|
203
|
+
});
|
|
204
|
+
export const DescribeWorkspaceRequestFilterSensitiveLog = (obj) => ({
|
|
205
|
+
...obj,
|
|
206
|
+
});
|
|
207
|
+
export const WorkspaceDescriptionFilterSensitiveLog = (obj) => ({
|
|
208
|
+
...obj,
|
|
209
|
+
});
|
|
210
|
+
export const DescribeWorkspaceResponseFilterSensitiveLog = (obj) => ({
|
|
211
|
+
...obj,
|
|
212
|
+
});
|
|
213
|
+
export const ListWorkspacesRequestFilterSensitiveLog = (obj) => ({
|
|
214
|
+
...obj,
|
|
215
|
+
});
|
|
216
|
+
export const WorkspaceSummaryFilterSensitiveLog = (obj) => ({
|
|
217
|
+
...obj,
|
|
218
|
+
});
|
|
219
|
+
export const ListWorkspacesResponseFilterSensitiveLog = (obj) => ({
|
|
220
|
+
...obj,
|
|
221
|
+
});
|
|
222
|
+
export const CreateLoggingConfigurationRequestFilterSensitiveLog = (obj) => ({
|
|
223
|
+
...obj,
|
|
224
|
+
});
|
|
225
|
+
export const LoggingConfigurationStatusFilterSensitiveLog = (obj) => ({
|
|
226
|
+
...obj,
|
|
227
|
+
});
|
|
228
|
+
export const CreateLoggingConfigurationResponseFilterSensitiveLog = (obj) => ({
|
|
229
|
+
...obj,
|
|
230
|
+
});
|
|
231
|
+
export const DeleteLoggingConfigurationRequestFilterSensitiveLog = (obj) => ({
|
|
232
|
+
...obj,
|
|
233
|
+
});
|
|
234
|
+
export const DescribeLoggingConfigurationRequestFilterSensitiveLog = (obj) => ({
|
|
235
|
+
...obj,
|
|
236
|
+
});
|
|
237
|
+
export const LoggingConfigurationMetadataFilterSensitiveLog = (obj) => ({
|
|
238
|
+
...obj,
|
|
239
|
+
});
|
|
240
|
+
export const DescribeLoggingConfigurationResponseFilterSensitiveLog = (obj) => ({
|
|
241
|
+
...obj,
|
|
242
|
+
});
|
|
243
|
+
export const UpdateLoggingConfigurationRequestFilterSensitiveLog = (obj) => ({
|
|
244
|
+
...obj,
|
|
245
|
+
});
|
|
246
|
+
export const UpdateLoggingConfigurationResponseFilterSensitiveLog = (obj) => ({
|
|
247
|
+
...obj,
|
|
248
|
+
});
|
|
249
|
+
export const CreateRuleGroupsNamespaceRequestFilterSensitiveLog = (obj) => ({
|
|
250
|
+
...obj,
|
|
251
|
+
});
|
|
252
|
+
export const RuleGroupsNamespaceStatusFilterSensitiveLog = (obj) => ({
|
|
253
|
+
...obj,
|
|
254
|
+
});
|
|
255
|
+
export const CreateRuleGroupsNamespaceResponseFilterSensitiveLog = (obj) => ({
|
|
256
|
+
...obj,
|
|
257
|
+
});
|
|
258
|
+
export const DeleteRuleGroupsNamespaceRequestFilterSensitiveLog = (obj) => ({
|
|
259
|
+
...obj,
|
|
260
|
+
});
|
|
261
|
+
export const DescribeRuleGroupsNamespaceRequestFilterSensitiveLog = (obj) => ({
|
|
262
|
+
...obj,
|
|
263
|
+
});
|
|
264
|
+
export const RuleGroupsNamespaceDescriptionFilterSensitiveLog = (obj) => ({
|
|
265
|
+
...obj,
|
|
266
|
+
});
|
|
267
|
+
export const DescribeRuleGroupsNamespaceResponseFilterSensitiveLog = (obj) => ({
|
|
268
|
+
...obj,
|
|
269
|
+
});
|
|
270
|
+
export const ListRuleGroupsNamespacesRequestFilterSensitiveLog = (obj) => ({
|
|
271
|
+
...obj,
|
|
272
|
+
});
|
|
273
|
+
export const RuleGroupsNamespaceSummaryFilterSensitiveLog = (obj) => ({
|
|
274
|
+
...obj,
|
|
275
|
+
});
|
|
276
|
+
export const ListRuleGroupsNamespacesResponseFilterSensitiveLog = (obj) => ({
|
|
277
|
+
...obj,
|
|
278
|
+
});
|
|
279
|
+
export const PutRuleGroupsNamespaceRequestFilterSensitiveLog = (obj) => ({
|
|
280
|
+
...obj,
|
|
281
|
+
});
|
|
282
|
+
export const PutRuleGroupsNamespaceResponseFilterSensitiveLog = (obj) => ({
|
|
283
|
+
...obj,
|
|
284
|
+
});
|
|
285
|
+
export const UpdateWorkspaceAliasRequestFilterSensitiveLog = (obj) => ({
|
|
286
|
+
...obj,
|
|
287
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { Amp } from "../Amp";
|
|
3
2
|
import { AmpClient } from "../AmpClient";
|
|
4
3
|
import { ListRuleGroupsNamespacesCommand, } from "../commands/ListRuleGroupsNamespacesCommand";
|
|
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 ListRuleGroupsNamespacesCommand(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 ListRuleGroupsNamespacesCommand(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.listRuleGroupsNamespaces.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.listRuleGroupsNamespaces(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListRuleGroupsNamespaces(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateListRuleGroupsNamespaces(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 Amp) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof AmpClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Amp | AmpClient");
|
|
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 Amp)) 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 AmpClient)) 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 Amp | AmpClient");
|
|
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 { Amp } from "../Amp";
|
|
3
2
|
import { AmpClient } from "../AmpClient";
|
|
4
3
|
import { ListWorkspacesCommand, } from "../commands/ListWorkspacesCommand";
|
|
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 ListWorkspacesCommand(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 ListWorkspacesCommand(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.listWorkspaces.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.listWorkspaces(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListWorkspaces(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateListWorkspaces(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 Amp) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof AmpClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Amp | AmpClient");
|
|
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 Amp)) 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 AmpClient)) 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 Amp | AmpClient");
|
|
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
|
}
|