@aws-sdk/client-docdb-elastic 3.221.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +205 -0
- package/dist-cjs/DocDBElastic.js +202 -0
- package/dist-cjs/DocDBElasticClient.js +40 -0
- package/dist-cjs/commands/CreateClusterCommand.js +46 -0
- package/dist-cjs/commands/CreateClusterSnapshotCommand.js +46 -0
- package/dist-cjs/commands/DeleteClusterCommand.js +46 -0
- package/dist-cjs/commands/DeleteClusterSnapshotCommand.js +46 -0
- package/dist-cjs/commands/GetClusterCommand.js +46 -0
- package/dist-cjs/commands/GetClusterSnapshotCommand.js +46 -0
- package/dist-cjs/commands/ListClusterSnapshotsCommand.js +46 -0
- package/dist-cjs/commands/ListClustersCommand.js +46 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-cjs/commands/RestoreClusterFromSnapshotCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +46 -0
- package/dist-cjs/commands/UntagResourceCommand.js +46 -0
- package/dist-cjs/commands/UpdateClusterCommand.js +46 -0
- package/dist-cjs/commands/index.js +16 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +312 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/DocDBElasticServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +255 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListClusterSnapshotsPaginator.js +36 -0
- package/dist-cjs/pagination/ListClustersPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1197 -0
- package/dist-cjs/runtimeConfig.browser.js +42 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +18 -0
- package/dist-es/DocDBElastic.js +198 -0
- package/dist-es/DocDBElasticClient.js +36 -0
- package/dist-es/commands/CreateClusterCommand.js +42 -0
- package/dist-es/commands/CreateClusterSnapshotCommand.js +42 -0
- package/dist-es/commands/DeleteClusterCommand.js +42 -0
- package/dist-es/commands/DeleteClusterSnapshotCommand.js +42 -0
- package/dist-es/commands/GetClusterCommand.js +42 -0
- package/dist-es/commands/GetClusterSnapshotCommand.js +42 -0
- package/dist-es/commands/ListClusterSnapshotsCommand.js +42 -0
- package/dist-es/commands/ListClustersCommand.js +42 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
- package/dist-es/commands/RestoreClusterFromSnapshotCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +42 -0
- package/dist-es/commands/UntagResourceCommand.js +42 -0
- package/dist-es/commands/UpdateClusterCommand.js +42 -0
- package/dist-es/commands/index.js +13 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +309 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/DocDBElasticServiceException.js +7 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +214 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListClusterSnapshotsPaginator.js +32 -0
- package/dist-es/pagination/ListClustersPaginator.js +32 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +1168 -0
- package/dist-es/runtimeConfig.browser.js +37 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +14 -0
- package/dist-types/DocDBElastic.d.ts +99 -0
- package/dist-types/DocDBElasticClient.d.ts +154 -0
- package/dist-types/commands/CreateClusterCommand.d.ts +37 -0
- package/dist-types/commands/CreateClusterSnapshotCommand.d.ts +37 -0
- package/dist-types/commands/DeleteClusterCommand.d.ts +37 -0
- package/dist-types/commands/DeleteClusterSnapshotCommand.d.ts +37 -0
- package/dist-types/commands/GetClusterCommand.d.ts +37 -0
- package/dist-types/commands/GetClusterSnapshotCommand.d.ts +37 -0
- package/dist-types/commands/ListClusterSnapshotsCommand.d.ts +37 -0
- package/dist-types/commands/ListClustersCommand.d.ts +37 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +37 -0
- package/dist-types/commands/RestoreClusterFromSnapshotCommand.d.ts +37 -0
- package/dist-types/commands/TagResourceCommand.d.ts +37 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
- package/dist-types/commands/UpdateClusterCommand.d.ts +38 -0
- package/dist-types/commands/index.d.ts +13 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/DocDBElasticServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +782 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListClusterSnapshotsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListClustersPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +41 -0
- package/dist-types/runtimeConfig.browser.d.ts +42 -0
- package/dist-types/runtimeConfig.d.ts +42 -0
- package/dist-types/runtimeConfig.native.d.ts +41 -0
- package/dist-types/runtimeConfig.shared.d.ts +16 -0
- package/dist-types/ts3.4/DocDBElastic.d.ts +225 -0
- package/dist-types/ts3.4/DocDBElasticClient.d.ts +190 -0
- package/dist-types/ts3.4/commands/CreateClusterCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/CreateClusterSnapshotCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/DeleteClusterCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/DeleteClusterSnapshotCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetClusterCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/GetClusterSnapshotCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListClusterSnapshotsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListClustersCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/RestoreClusterFromSnapshotCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/UpdateClusterCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/index.d.ts +13 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/DocDBElasticServiceException.d.ts +7 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +320 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +7 -0
- package/dist-types/ts3.4/pagination/ListClusterSnapshotsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListClustersPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +161 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +88 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +88 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +77 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +16 -0
- package/package.json +103 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { DocDBElasticServiceException as __BaseException } from "./DocDBElasticServiceException";
|
|
3
|
+
export class AccessDeniedException extends __BaseException {
|
|
4
|
+
constructor(opts) {
|
|
5
|
+
super({
|
|
6
|
+
name: "AccessDeniedException",
|
|
7
|
+
$fault: "client",
|
|
8
|
+
...opts,
|
|
9
|
+
});
|
|
10
|
+
this.name = "AccessDeniedException";
|
|
11
|
+
this.$fault = "client";
|
|
12
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export var Auth;
|
|
16
|
+
(function (Auth) {
|
|
17
|
+
Auth["PLAIN_TEXT"] = "PLAIN_TEXT";
|
|
18
|
+
Auth["SECRET_ARN"] = "SECRET_ARN";
|
|
19
|
+
})(Auth || (Auth = {}));
|
|
20
|
+
export class ConflictException extends __BaseException {
|
|
21
|
+
constructor(opts) {
|
|
22
|
+
super({
|
|
23
|
+
name: "ConflictException",
|
|
24
|
+
$fault: "client",
|
|
25
|
+
...opts,
|
|
26
|
+
});
|
|
27
|
+
this.name = "ConflictException";
|
|
28
|
+
this.$fault = "client";
|
|
29
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
30
|
+
this.resourceId = opts.resourceId;
|
|
31
|
+
this.resourceType = opts.resourceType;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export var Status;
|
|
35
|
+
(function (Status) {
|
|
36
|
+
Status["ACTIVE"] = "ACTIVE";
|
|
37
|
+
Status["CREATING"] = "CREATING";
|
|
38
|
+
Status["DELETING"] = "DELETING";
|
|
39
|
+
Status["INACCESSIBLE_ENCRYPTION_CREDS"] = "INACCESSIBLE_ENCRYPTION_CREDS";
|
|
40
|
+
Status["INVALID_SECURITY_GROUP_ID"] = "INVALID_SECURITY_GROUP_ID";
|
|
41
|
+
Status["INVALID_SUBNET_ID"] = "INVALID_SUBNET_ID";
|
|
42
|
+
Status["IP_ADDRESS_LIMIT_EXCEEDED"] = "IP_ADDRESS_LIMIT_EXCEEDED";
|
|
43
|
+
Status["UPDATING"] = "UPDATING";
|
|
44
|
+
Status["VPC_ENDPOINT_LIMIT_EXCEEDED"] = "VPC_ENDPOINT_LIMIT_EXCEEDED";
|
|
45
|
+
})(Status || (Status = {}));
|
|
46
|
+
export class InternalServerException extends __BaseException {
|
|
47
|
+
constructor(opts) {
|
|
48
|
+
super({
|
|
49
|
+
name: "InternalServerException",
|
|
50
|
+
$fault: "server",
|
|
51
|
+
...opts,
|
|
52
|
+
});
|
|
53
|
+
this.name = "InternalServerException";
|
|
54
|
+
this.$fault = "server";
|
|
55
|
+
this.$retryable = {};
|
|
56
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "ServiceQuotaExceededException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
this.name = "ServiceQuotaExceededException";
|
|
67
|
+
this.$fault = "client";
|
|
68
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export class ThrottlingException extends __BaseException {
|
|
72
|
+
constructor(opts) {
|
|
73
|
+
super({
|
|
74
|
+
name: "ThrottlingException",
|
|
75
|
+
$fault: "client",
|
|
76
|
+
...opts,
|
|
77
|
+
});
|
|
78
|
+
this.name = "ThrottlingException";
|
|
79
|
+
this.$fault = "client";
|
|
80
|
+
this.$retryable = {};
|
|
81
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
82
|
+
this.retryAfterSeconds = opts.retryAfterSeconds;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export var ValidationExceptionReason;
|
|
86
|
+
(function (ValidationExceptionReason) {
|
|
87
|
+
ValidationExceptionReason["CANNOT_PARSE"] = "cannotParse";
|
|
88
|
+
ValidationExceptionReason["FIELD_VALIDATION_FAILED"] = "fieldValidationFailed";
|
|
89
|
+
ValidationExceptionReason["OTHER"] = "other";
|
|
90
|
+
ValidationExceptionReason["UNKNOWN_OPERATION"] = "unknownOperation";
|
|
91
|
+
})(ValidationExceptionReason || (ValidationExceptionReason = {}));
|
|
92
|
+
export class ValidationException extends __BaseException {
|
|
93
|
+
constructor(opts) {
|
|
94
|
+
super({
|
|
95
|
+
name: "ValidationException",
|
|
96
|
+
$fault: "client",
|
|
97
|
+
...opts,
|
|
98
|
+
});
|
|
99
|
+
this.name = "ValidationException";
|
|
100
|
+
this.$fault = "client";
|
|
101
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
102
|
+
this.reason = opts.reason;
|
|
103
|
+
this.fieldList = opts.fieldList;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
107
|
+
constructor(opts) {
|
|
108
|
+
super({
|
|
109
|
+
name: "ResourceNotFoundException",
|
|
110
|
+
$fault: "client",
|
|
111
|
+
...opts,
|
|
112
|
+
});
|
|
113
|
+
this.name = "ResourceNotFoundException";
|
|
114
|
+
this.$fault = "client";
|
|
115
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
116
|
+
this.resourceId = opts.resourceId;
|
|
117
|
+
this.resourceType = opts.resourceType;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export const CreateClusterInputFilterSensitiveLog = (obj) => ({
|
|
121
|
+
...obj,
|
|
122
|
+
...(obj.adminUserPassword && { adminUserPassword: SENSITIVE_STRING }),
|
|
123
|
+
});
|
|
124
|
+
export const ClusterFilterSensitiveLog = (obj) => ({
|
|
125
|
+
...obj,
|
|
126
|
+
});
|
|
127
|
+
export const CreateClusterOutputFilterSensitiveLog = (obj) => ({
|
|
128
|
+
...obj,
|
|
129
|
+
});
|
|
130
|
+
export const ValidationExceptionFieldFilterSensitiveLog = (obj) => ({
|
|
131
|
+
...obj,
|
|
132
|
+
});
|
|
133
|
+
export const CreateClusterSnapshotInputFilterSensitiveLog = (obj) => ({
|
|
134
|
+
...obj,
|
|
135
|
+
});
|
|
136
|
+
export const ClusterSnapshotFilterSensitiveLog = (obj) => ({
|
|
137
|
+
...obj,
|
|
138
|
+
});
|
|
139
|
+
export const CreateClusterSnapshotOutputFilterSensitiveLog = (obj) => ({
|
|
140
|
+
...obj,
|
|
141
|
+
});
|
|
142
|
+
export const DeleteClusterInputFilterSensitiveLog = (obj) => ({
|
|
143
|
+
...obj,
|
|
144
|
+
});
|
|
145
|
+
export const DeleteClusterOutputFilterSensitiveLog = (obj) => ({
|
|
146
|
+
...obj,
|
|
147
|
+
});
|
|
148
|
+
export const DeleteClusterSnapshotInputFilterSensitiveLog = (obj) => ({
|
|
149
|
+
...obj,
|
|
150
|
+
});
|
|
151
|
+
export const DeleteClusterSnapshotOutputFilterSensitiveLog = (obj) => ({
|
|
152
|
+
...obj,
|
|
153
|
+
});
|
|
154
|
+
export const GetClusterInputFilterSensitiveLog = (obj) => ({
|
|
155
|
+
...obj,
|
|
156
|
+
});
|
|
157
|
+
export const GetClusterOutputFilterSensitiveLog = (obj) => ({
|
|
158
|
+
...obj,
|
|
159
|
+
});
|
|
160
|
+
export const GetClusterSnapshotInputFilterSensitiveLog = (obj) => ({
|
|
161
|
+
...obj,
|
|
162
|
+
});
|
|
163
|
+
export const GetClusterSnapshotOutputFilterSensitiveLog = (obj) => ({
|
|
164
|
+
...obj,
|
|
165
|
+
});
|
|
166
|
+
export const ListClustersInputFilterSensitiveLog = (obj) => ({
|
|
167
|
+
...obj,
|
|
168
|
+
});
|
|
169
|
+
export const ClusterInListFilterSensitiveLog = (obj) => ({
|
|
170
|
+
...obj,
|
|
171
|
+
});
|
|
172
|
+
export const ListClustersOutputFilterSensitiveLog = (obj) => ({
|
|
173
|
+
...obj,
|
|
174
|
+
});
|
|
175
|
+
export const ListClusterSnapshotsInputFilterSensitiveLog = (obj) => ({
|
|
176
|
+
...obj,
|
|
177
|
+
});
|
|
178
|
+
export const ClusterSnapshotInListFilterSensitiveLog = (obj) => ({
|
|
179
|
+
...obj,
|
|
180
|
+
});
|
|
181
|
+
export const ListClusterSnapshotsOutputFilterSensitiveLog = (obj) => ({
|
|
182
|
+
...obj,
|
|
183
|
+
});
|
|
184
|
+
export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
|
|
185
|
+
...obj,
|
|
186
|
+
});
|
|
187
|
+
export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
|
|
188
|
+
...obj,
|
|
189
|
+
});
|
|
190
|
+
export const RestoreClusterFromSnapshotInputFilterSensitiveLog = (obj) => ({
|
|
191
|
+
...obj,
|
|
192
|
+
});
|
|
193
|
+
export const RestoreClusterFromSnapshotOutputFilterSensitiveLog = (obj) => ({
|
|
194
|
+
...obj,
|
|
195
|
+
});
|
|
196
|
+
export const TagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
197
|
+
...obj,
|
|
198
|
+
});
|
|
199
|
+
export const TagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
200
|
+
...obj,
|
|
201
|
+
});
|
|
202
|
+
export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
203
|
+
...obj,
|
|
204
|
+
});
|
|
205
|
+
export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
|
|
206
|
+
...obj,
|
|
207
|
+
});
|
|
208
|
+
export const UpdateClusterInputFilterSensitiveLog = (obj) => ({
|
|
209
|
+
...obj,
|
|
210
|
+
...(obj.adminUserPassword && { adminUserPassword: SENSITIVE_STRING }),
|
|
211
|
+
});
|
|
212
|
+
export const UpdateClusterOutputFilterSensitiveLog = (obj) => ({
|
|
213
|
+
...obj,
|
|
214
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListClusterSnapshotsCommand, } from "../commands/ListClusterSnapshotsCommand";
|
|
2
|
+
import { DocDBElastic } from "../DocDBElastic";
|
|
3
|
+
import { DocDBElasticClient } from "../DocDBElasticClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListClusterSnapshotsCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listClusterSnapshots(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListClusterSnapshots(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 DocDBElastic) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof DocDBElasticClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected DocDBElastic | DocDBElasticClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListClustersCommand, } from "../commands/ListClustersCommand";
|
|
2
|
+
import { DocDBElastic } from "../DocDBElastic";
|
|
3
|
+
import { DocDBElasticClient } from "../DocDBElasticClient";
|
|
4
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
5
|
+
return await client.send(new ListClustersCommand(input), ...args);
|
|
6
|
+
};
|
|
7
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.listClusters(input, ...args);
|
|
9
|
+
};
|
|
10
|
+
export async function* paginateListClusters(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 DocDBElastic) {
|
|
18
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
+
}
|
|
20
|
+
else if (config.client instanceof DocDBElasticClient) {
|
|
21
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw new Error("Invalid client, expected DocDBElastic | DocDBElasticClient");
|
|
25
|
+
}
|
|
26
|
+
yield page;
|
|
27
|
+
const prevToken = token;
|
|
28
|
+
token = page.nextToken;
|
|
29
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|