@aws-sdk/client-cloud9 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/Cloud9.js +54 -61
- package/dist-es/Cloud9Client.js +22 -28
- package/dist-es/commands/CreateEnvironmentEC2Command.js +21 -28
- package/dist-es/commands/CreateEnvironmentMembershipCommand.js +21 -28
- package/dist-es/commands/DeleteEnvironmentCommand.js +21 -28
- package/dist-es/commands/DeleteEnvironmentMembershipCommand.js +21 -28
- package/dist-es/commands/DescribeEnvironmentMembershipsCommand.js +21 -28
- package/dist-es/commands/DescribeEnvironmentStatusCommand.js +21 -28
- package/dist-es/commands/DescribeEnvironmentsCommand.js +21 -28
- package/dist-es/commands/ListEnvironmentsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateEnvironmentCommand.js +21 -28
- package/dist-es/commands/UpdateEnvironmentMembershipCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/Cloud9ServiceException.js +5 -10
- package/dist-es/models/models_0.js +204 -135
- package/dist-es/pagination/DescribeEnvironmentMembershipsPaginator.js +25 -68
- package/dist-es/pagination/ListEnvironmentsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +992 -1290
- 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,109 +1,108 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
3
2
|
import { Cloud9ServiceException as __BaseException } from "./Cloud9ServiceException";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
export class BadRequestException extends __BaseException {
|
|
4
|
+
constructor(opts) {
|
|
5
|
+
super({
|
|
6
|
+
name: "BadRequestException",
|
|
7
|
+
$fault: "client",
|
|
8
|
+
...opts,
|
|
9
|
+
});
|
|
10
|
+
this.name = "BadRequestException";
|
|
11
|
+
this.$fault = "client";
|
|
12
|
+
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
13
|
+
this.className = opts.className;
|
|
14
|
+
this.code = opts.code;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
}
|
|
17
|
+
export class ConflictException extends __BaseException {
|
|
18
|
+
constructor(opts) {
|
|
19
|
+
super({
|
|
20
|
+
name: "ConflictException",
|
|
21
|
+
$fault: "client",
|
|
22
|
+
...opts,
|
|
23
|
+
});
|
|
24
|
+
this.name = "ConflictException";
|
|
25
|
+
this.$fault = "client";
|
|
26
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
27
|
+
this.className = opts.className;
|
|
28
|
+
this.code = opts.code;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
}(__BaseException));
|
|
31
|
-
export { ConflictException };
|
|
30
|
+
}
|
|
32
31
|
export var ConnectionType;
|
|
33
32
|
(function (ConnectionType) {
|
|
34
33
|
ConnectionType["CONNECT_SSH"] = "CONNECT_SSH";
|
|
35
34
|
ConnectionType["CONNECT_SSM"] = "CONNECT_SSM";
|
|
36
35
|
})(ConnectionType || (ConnectionType = {}));
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
export class ForbiddenException extends __BaseException {
|
|
37
|
+
constructor(opts) {
|
|
38
|
+
super({
|
|
39
|
+
name: "ForbiddenException",
|
|
40
|
+
$fault: "client",
|
|
41
|
+
...opts,
|
|
42
|
+
});
|
|
43
|
+
this.name = "ForbiddenException";
|
|
44
|
+
this.$fault = "client";
|
|
45
|
+
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
46
|
+
this.className = opts.className;
|
|
47
|
+
this.code = opts.code;
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
}
|
|
50
|
+
export class InternalServerErrorException extends __BaseException {
|
|
51
|
+
constructor(opts) {
|
|
52
|
+
super({
|
|
53
|
+
name: "InternalServerErrorException",
|
|
54
|
+
$fault: "server",
|
|
55
|
+
...opts,
|
|
56
|
+
});
|
|
57
|
+
this.name = "InternalServerErrorException";
|
|
58
|
+
this.$fault = "server";
|
|
59
|
+
Object.setPrototypeOf(this, InternalServerErrorException.prototype);
|
|
60
|
+
this.className = opts.className;
|
|
61
|
+
this.code = opts.code;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
}
|
|
64
|
+
export class LimitExceededException extends __BaseException {
|
|
65
|
+
constructor(opts) {
|
|
66
|
+
super({
|
|
67
|
+
name: "LimitExceededException",
|
|
68
|
+
$fault: "client",
|
|
69
|
+
...opts,
|
|
70
|
+
});
|
|
71
|
+
this.name = "LimitExceededException";
|
|
72
|
+
this.$fault = "client";
|
|
73
|
+
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
74
|
+
this.className = opts.className;
|
|
75
|
+
this.code = opts.code;
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
}
|
|
78
|
+
export class NotFoundException extends __BaseException {
|
|
79
|
+
constructor(opts) {
|
|
80
|
+
super({
|
|
81
|
+
name: "NotFoundException",
|
|
82
|
+
$fault: "client",
|
|
83
|
+
...opts,
|
|
84
|
+
});
|
|
85
|
+
this.name = "NotFoundException";
|
|
86
|
+
this.$fault = "client";
|
|
87
|
+
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
88
|
+
this.className = opts.className;
|
|
89
|
+
this.code = opts.code;
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
91
|
+
}
|
|
92
|
+
export class TooManyRequestsException extends __BaseException {
|
|
93
|
+
constructor(opts) {
|
|
94
|
+
super({
|
|
95
|
+
name: "TooManyRequestsException",
|
|
96
|
+
$fault: "client",
|
|
97
|
+
...opts,
|
|
98
|
+
});
|
|
99
|
+
this.name = "TooManyRequestsException";
|
|
100
|
+
this.$fault = "client";
|
|
101
|
+
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
|
102
|
+
this.className = opts.className;
|
|
103
|
+
this.code = opts.code;
|
|
103
104
|
}
|
|
104
|
-
|
|
105
|
-
}(__BaseException));
|
|
106
|
-
export { TooManyRequestsException };
|
|
105
|
+
}
|
|
107
106
|
export var MemberPermissions;
|
|
108
107
|
(function (MemberPermissions) {
|
|
109
108
|
MemberPermissions["READ_ONLY"] = "read-only";
|
|
@@ -152,52 +151,122 @@ export var EnvironmentStatus;
|
|
|
152
151
|
EnvironmentStatus["STOPPED"] = "stopped";
|
|
153
152
|
EnvironmentStatus["STOPPING"] = "stopping";
|
|
154
153
|
})(EnvironmentStatus || (EnvironmentStatus = {}));
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
154
|
+
export class ConcurrentAccessException extends __BaseException {
|
|
155
|
+
constructor(opts) {
|
|
156
|
+
super({
|
|
157
|
+
name: "ConcurrentAccessException",
|
|
158
|
+
$fault: "client",
|
|
159
|
+
...opts,
|
|
160
|
+
});
|
|
161
|
+
this.name = "ConcurrentAccessException";
|
|
162
|
+
this.$fault = "client";
|
|
163
|
+
Object.setPrototypeOf(this, ConcurrentAccessException.prototype);
|
|
164
|
+
this.className = opts.className;
|
|
165
|
+
this.code = opts.code;
|
|
165
166
|
}
|
|
166
|
-
|
|
167
|
-
}(__BaseException));
|
|
168
|
-
export { ConcurrentAccessException };
|
|
167
|
+
}
|
|
169
168
|
export var ManagedCredentialsAction;
|
|
170
169
|
(function (ManagedCredentialsAction) {
|
|
171
170
|
ManagedCredentialsAction["DISABLE"] = "DISABLE";
|
|
172
171
|
ManagedCredentialsAction["ENABLE"] = "ENABLE";
|
|
173
172
|
})(ManagedCredentialsAction || (ManagedCredentialsAction = {}));
|
|
174
|
-
export
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
export
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
export
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
export
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
export
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
export
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
export
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
export
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
export
|
|
203
|
-
|
|
173
|
+
export const TagFilterSensitiveLog = (obj) => ({
|
|
174
|
+
...obj,
|
|
175
|
+
...(obj.Key && { Key: SENSITIVE_STRING }),
|
|
176
|
+
...(obj.Value && { Value: SENSITIVE_STRING }),
|
|
177
|
+
});
|
|
178
|
+
export const CreateEnvironmentEC2RequestFilterSensitiveLog = (obj) => ({
|
|
179
|
+
...obj,
|
|
180
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
181
|
+
...(obj.tags && { tags: SENSITIVE_STRING }),
|
|
182
|
+
});
|
|
183
|
+
export const CreateEnvironmentEC2ResultFilterSensitiveLog = (obj) => ({
|
|
184
|
+
...obj,
|
|
185
|
+
});
|
|
186
|
+
export const CreateEnvironmentMembershipRequestFilterSensitiveLog = (obj) => ({
|
|
187
|
+
...obj,
|
|
188
|
+
});
|
|
189
|
+
export const EnvironmentMemberFilterSensitiveLog = (obj) => ({
|
|
190
|
+
...obj,
|
|
191
|
+
});
|
|
192
|
+
export const CreateEnvironmentMembershipResultFilterSensitiveLog = (obj) => ({
|
|
193
|
+
...obj,
|
|
194
|
+
});
|
|
195
|
+
export const DeleteEnvironmentRequestFilterSensitiveLog = (obj) => ({
|
|
196
|
+
...obj,
|
|
197
|
+
});
|
|
198
|
+
export const DeleteEnvironmentResultFilterSensitiveLog = (obj) => ({
|
|
199
|
+
...obj,
|
|
200
|
+
});
|
|
201
|
+
export const DeleteEnvironmentMembershipRequestFilterSensitiveLog = (obj) => ({
|
|
202
|
+
...obj,
|
|
203
|
+
});
|
|
204
|
+
export const DeleteEnvironmentMembershipResultFilterSensitiveLog = (obj) => ({
|
|
205
|
+
...obj,
|
|
206
|
+
});
|
|
207
|
+
export const DescribeEnvironmentMembershipsRequestFilterSensitiveLog = (obj) => ({
|
|
208
|
+
...obj,
|
|
209
|
+
});
|
|
210
|
+
export const DescribeEnvironmentMembershipsResultFilterSensitiveLog = (obj) => ({
|
|
211
|
+
...obj,
|
|
212
|
+
});
|
|
213
|
+
export const DescribeEnvironmentsRequestFilterSensitiveLog = (obj) => ({
|
|
214
|
+
...obj,
|
|
215
|
+
});
|
|
216
|
+
export const EnvironmentLifecycleFilterSensitiveLog = (obj) => ({
|
|
217
|
+
...obj,
|
|
218
|
+
});
|
|
219
|
+
export const EnvironmentFilterSensitiveLog = (obj) => ({
|
|
220
|
+
...obj,
|
|
221
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
222
|
+
});
|
|
223
|
+
export const DescribeEnvironmentsResultFilterSensitiveLog = (obj) => ({
|
|
224
|
+
...obj,
|
|
225
|
+
...(obj.environments && { environments: obj.environments.map((item) => EnvironmentFilterSensitiveLog(item)) }),
|
|
226
|
+
});
|
|
227
|
+
export const DescribeEnvironmentStatusRequestFilterSensitiveLog = (obj) => ({
|
|
228
|
+
...obj,
|
|
229
|
+
});
|
|
230
|
+
export const DescribeEnvironmentStatusResultFilterSensitiveLog = (obj) => ({
|
|
231
|
+
...obj,
|
|
232
|
+
});
|
|
233
|
+
export const ListEnvironmentsRequestFilterSensitiveLog = (obj) => ({
|
|
234
|
+
...obj,
|
|
235
|
+
});
|
|
236
|
+
export const ListEnvironmentsResultFilterSensitiveLog = (obj) => ({
|
|
237
|
+
...obj,
|
|
238
|
+
});
|
|
239
|
+
export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
|
|
240
|
+
...obj,
|
|
241
|
+
});
|
|
242
|
+
export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
|
|
243
|
+
...obj,
|
|
244
|
+
...(obj.Tags && { Tags: SENSITIVE_STRING }),
|
|
245
|
+
});
|
|
246
|
+
export const TagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
247
|
+
...obj,
|
|
248
|
+
...(obj.Tags && { Tags: SENSITIVE_STRING }),
|
|
249
|
+
});
|
|
250
|
+
export const TagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
251
|
+
...obj,
|
|
252
|
+
});
|
|
253
|
+
export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
254
|
+
...obj,
|
|
255
|
+
...(obj.TagKeys && { TagKeys: SENSITIVE_STRING }),
|
|
256
|
+
});
|
|
257
|
+
export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
258
|
+
...obj,
|
|
259
|
+
});
|
|
260
|
+
export const UpdateEnvironmentRequestFilterSensitiveLog = (obj) => ({
|
|
261
|
+
...obj,
|
|
262
|
+
...(obj.description && { description: SENSITIVE_STRING }),
|
|
263
|
+
});
|
|
264
|
+
export const UpdateEnvironmentResultFilterSensitiveLog = (obj) => ({
|
|
265
|
+
...obj,
|
|
266
|
+
});
|
|
267
|
+
export const UpdateEnvironmentMembershipRequestFilterSensitiveLog = (obj) => ({
|
|
268
|
+
...obj,
|
|
269
|
+
});
|
|
270
|
+
export const UpdateEnvironmentMembershipResultFilterSensitiveLog = (obj) => ({
|
|
271
|
+
...obj,
|
|
272
|
+
});
|
|
@@ -1,75 +1,32 @@
|
|
|
1
|
-
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
1
|
import { Cloud9 } from "../Cloud9";
|
|
3
2
|
import { Cloud9Client } from "../Cloud9Client";
|
|
4
3
|
import { DescribeEnvironmentMembershipsCommand, } from "../commands/DescribeEnvironmentMembershipsCommand";
|
|
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 DescribeEnvironmentMembershipsCommand(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 DescribeEnvironmentMembershipsCommand(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.describeEnvironmentMemberships.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.describeEnvironmentMemberships(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateDescribeEnvironmentMemberships(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateDescribeEnvironmentMemberships(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 Cloud9) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof Cloud9Client) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Cloud9 | Cloud9Client");
|
|
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 Cloud9)) 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 Cloud9Client)) 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 Cloud9 | Cloud9Client");
|
|
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 { Cloud9 } from "../Cloud9";
|
|
3
2
|
import { Cloud9Client } from "../Cloud9Client";
|
|
4
3
|
import { ListEnvironmentsCommand, } from "../commands/ListEnvironmentsCommand";
|
|
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 ListEnvironmentsCommand(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 ListEnvironmentsCommand(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.listEnvironments.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.listEnvironments(input, ...args);
|
|
32
9
|
};
|
|
33
|
-
export function paginateListEnvironments(config, input) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
export async function* paginateListEnvironments(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 Cloud9) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof Cloud9Client) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected Cloud9 | Cloud9Client");
|
|
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 Cloud9)) 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 Cloud9Client)) 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 Cloud9 | Cloud9Client");
|
|
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
|
}
|