@aws-sdk/client-datasync 3.319.0 → 3.321.1
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/README.md +113 -8
- package/dist-cjs/DataSync.js +26 -0
- package/dist-cjs/commands/AddStorageSystemCommand.js +46 -0
- package/dist-cjs/commands/DescribeDiscoveryJobCommand.js +45 -0
- package/dist-cjs/commands/DescribeStorageSystemCommand.js +45 -0
- package/dist-cjs/commands/DescribeStorageSystemResourceMetricsCommand.js +45 -0
- package/dist-cjs/commands/DescribeStorageSystemResourcesCommand.js +45 -0
- package/dist-cjs/commands/GenerateRecommendationsCommand.js +45 -0
- package/dist-cjs/commands/ListDiscoveryJobsCommand.js +45 -0
- package/dist-cjs/commands/ListStorageSystemsCommand.js +45 -0
- package/dist-cjs/commands/RemoveStorageSystemCommand.js +45 -0
- package/dist-cjs/commands/StartDiscoveryJobCommand.js +45 -0
- package/dist-cjs/commands/StopDiscoveryJobCommand.js +45 -0
- package/dist-cjs/commands/UpdateDiscoveryJobCommand.js +45 -0
- package/dist-cjs/commands/UpdateStorageSystemCommand.js +46 -0
- package/dist-cjs/commands/index.js +13 -0
- package/dist-cjs/models/models_0.js +56 -8
- package/dist-cjs/pagination/DescribeStorageSystemResourceMetricsPaginator.js +29 -0
- package/dist-cjs/pagination/DescribeStorageSystemResourcesPaginator.js +29 -0
- package/dist-cjs/pagination/ListDiscoveryJobsPaginator.js +29 -0
- package/dist-cjs/pagination/ListStorageSystemsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +4 -0
- package/dist-cjs/protocols/Aws_json1_1.js +948 -87
- package/dist-es/DataSync.js +26 -0
- package/dist-es/commands/AddStorageSystemCommand.js +42 -0
- package/dist-es/commands/DescribeDiscoveryJobCommand.js +41 -0
- package/dist-es/commands/DescribeStorageSystemCommand.js +41 -0
- package/dist-es/commands/DescribeStorageSystemResourceMetricsCommand.js +41 -0
- package/dist-es/commands/DescribeStorageSystemResourcesCommand.js +41 -0
- package/dist-es/commands/GenerateRecommendationsCommand.js +41 -0
- package/dist-es/commands/ListDiscoveryJobsCommand.js +41 -0
- package/dist-es/commands/ListStorageSystemsCommand.js +41 -0
- package/dist-es/commands/RemoveStorageSystemCommand.js +41 -0
- package/dist-es/commands/StartDiscoveryJobCommand.js +41 -0
- package/dist-es/commands/StopDiscoveryJobCommand.js +41 -0
- package/dist-es/commands/UpdateDiscoveryJobCommand.js +41 -0
- package/dist-es/commands/UpdateStorageSystemCommand.js +42 -0
- package/dist-es/commands/index.js +13 -0
- package/dist-es/models/models_0.js +51 -7
- package/dist-es/pagination/DescribeStorageSystemResourceMetricsPaginator.js +25 -0
- package/dist-es/pagination/DescribeStorageSystemResourcesPaginator.js +25 -0
- package/dist-es/pagination/ListDiscoveryJobsPaginator.js +25 -0
- package/dist-es/pagination/ListStorageSystemsPaginator.js +25 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_1.js +908 -74
- package/dist-types/DataSync.d.ts +94 -2
- package/dist-types/DataSyncClient.d.ts +18 -4
- package/dist-types/commands/AddStorageSystemCommand.d.ts +91 -0
- package/dist-types/commands/CancelTaskExecutionCommand.d.ts +4 -3
- package/dist-types/commands/CreateAgentCommand.d.ts +4 -3
- package/dist-types/commands/CreateLocationEfsCommand.d.ts +2 -1
- package/dist-types/commands/CreateLocationFsxLustreCommand.d.ts +2 -1
- package/dist-types/commands/CreateLocationFsxOntapCommand.d.ts +3 -3
- package/dist-types/commands/CreateLocationFsxOpenZfsCommand.d.ts +4 -4
- package/dist-types/commands/CreateLocationFsxWindowsCommand.d.ts +2 -1
- package/dist-types/commands/CreateLocationHdfsCommand.d.ts +2 -1
- package/dist-types/commands/CreateLocationNfsCommand.d.ts +2 -1
- package/dist-types/commands/CreateLocationObjectStorageCommand.d.ts +5 -2
- package/dist-types/commands/CreateLocationS3Command.d.ts +20 -3
- package/dist-types/commands/CreateLocationSmbCommand.d.ts +2 -1
- package/dist-types/commands/CreateTaskCommand.d.ts +8 -1
- package/dist-types/commands/DeleteAgentCommand.d.ts +4 -4
- package/dist-types/commands/DeleteLocationCommand.d.ts +2 -1
- package/dist-types/commands/DeleteTaskCommand.d.ts +2 -1
- package/dist-types/commands/DescribeAgentCommand.d.ts +4 -2
- package/dist-types/commands/DescribeDiscoveryJobCommand.d.ts +70 -0
- package/dist-types/commands/DescribeLocationEfsCommand.d.ts +4 -2
- package/dist-types/commands/DescribeLocationFsxLustreCommand.d.ts +2 -1
- package/dist-types/commands/DescribeLocationFsxOntapCommand.d.ts +2 -1
- package/dist-types/commands/DescribeLocationFsxOpenZfsCommand.d.ts +3 -2
- package/dist-types/commands/DescribeLocationFsxWindowsCommand.d.ts +4 -3
- package/dist-types/commands/DescribeLocationHdfsCommand.d.ts +2 -1
- package/dist-types/commands/DescribeLocationNfsCommand.d.ts +2 -1
- package/dist-types/commands/DescribeLocationObjectStorageCommand.d.ts +4 -2
- package/dist-types/commands/DescribeLocationS3Command.d.ts +2 -1
- package/dist-types/commands/DescribeLocationSmbCommand.d.ts +2 -1
- package/dist-types/commands/DescribeStorageSystemCommand.d.ts +71 -0
- package/dist-types/commands/DescribeStorageSystemResourceMetricsCommand.d.ts +77 -0
- package/dist-types/commands/DescribeStorageSystemResourcesCommand.d.ts +82 -0
- package/dist-types/commands/DescribeTaskCommand.d.ts +2 -1
- package/dist-types/commands/DescribeTaskExecutionCommand.d.ts +2 -1
- package/dist-types/commands/GenerateRecommendationsCommand.d.ts +82 -0
- package/dist-types/commands/ListAgentsCommand.d.ts +2 -1
- package/dist-types/commands/ListDiscoveryJobsCommand.d.ts +73 -0
- package/dist-types/commands/ListLocationsCommand.d.ts +2 -1
- package/dist-types/commands/ListStorageSystemsCommand.d.ts +71 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +2 -1
- package/dist-types/commands/ListTaskExecutionsCommand.d.ts +2 -1
- package/dist-types/commands/ListTasksCommand.d.ts +2 -1
- package/dist-types/commands/RemoveStorageSystemCommand.d.ts +71 -0
- package/dist-types/commands/StartDiscoveryJobCommand.d.ts +80 -0
- package/dist-types/commands/StartTaskExecutionCommand.d.ts +10 -2
- package/dist-types/commands/StopDiscoveryJobCommand.d.ts +73 -0
- package/dist-types/commands/TagResourceCommand.d.ts +6 -4
- package/dist-types/commands/UntagResourceCommand.d.ts +2 -1
- package/dist-types/commands/UpdateAgentCommand.d.ts +2 -1
- package/dist-types/commands/UpdateDiscoveryJobCommand.d.ts +71 -0
- package/dist-types/commands/UpdateLocationHdfsCommand.d.ts +2 -1
- package/dist-types/commands/UpdateLocationNfsCommand.d.ts +5 -3
- package/dist-types/commands/UpdateLocationObjectStorageCommand.d.ts +2 -1
- package/dist-types/commands/UpdateLocationSmbCommand.d.ts +4 -3
- package/dist-types/commands/UpdateStorageSystemCommand.d.ts +84 -0
- package/dist-types/commands/UpdateTaskCommand.d.ts +2 -1
- package/dist-types/commands/UpdateTaskExecutionCommand.d.ts +7 -7
- package/dist-types/commands/index.d.ts +13 -0
- package/dist-types/models/models_0.d.ts +1429 -296
- package/dist-types/pagination/DescribeStorageSystemResourceMetricsPaginator.d.ts +7 -0
- package/dist-types/pagination/DescribeStorageSystemResourcesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListDiscoveryJobsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListStorageSystemsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +117 -0
- package/dist-types/ts3.4/DataSync.d.ts +227 -0
- package/dist-types/ts3.4/DataSyncClient.d.ts +78 -0
- package/dist-types/ts3.4/commands/AddStorageSystemCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/DescribeDiscoveryJobCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/DescribeStorageSystemCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/DescribeStorageSystemResourceMetricsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/DescribeStorageSystemResourcesCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GenerateRecommendationsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListDiscoveryJobsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListStorageSystemsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/RemoveStorageSystemCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/StartDiscoveryJobCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/StopDiscoveryJobCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/UpdateDiscoveryJobCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateStorageSystemCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +13 -0
- package/dist-types/ts3.4/models/models_0.d.ts +302 -18
- package/dist-types/ts3.4/pagination/DescribeStorageSystemResourceMetricsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/DescribeStorageSystemResourcesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDiscoveryJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListStorageSystemsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +156 -0
- package/package.json +7 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./AddStorageSystemCommand";
|
|
1
2
|
export * from "./CancelTaskExecutionCommand";
|
|
2
3
|
export * from "./CreateAgentCommand";
|
|
3
4
|
export * from "./CreateLocationEfsCommand";
|
|
@@ -15,6 +16,7 @@ export * from "./DeleteAgentCommand";
|
|
|
15
16
|
export * from "./DeleteLocationCommand";
|
|
16
17
|
export * from "./DeleteTaskCommand";
|
|
17
18
|
export * from "./DescribeAgentCommand";
|
|
19
|
+
export * from "./DescribeDiscoveryJobCommand";
|
|
18
20
|
export * from "./DescribeLocationEfsCommand";
|
|
19
21
|
export * from "./DescribeLocationFsxLustreCommand";
|
|
20
22
|
export * from "./DescribeLocationFsxOntapCommand";
|
|
@@ -25,20 +27,31 @@ export * from "./DescribeLocationNfsCommand";
|
|
|
25
27
|
export * from "./DescribeLocationObjectStorageCommand";
|
|
26
28
|
export * from "./DescribeLocationS3Command";
|
|
27
29
|
export * from "./DescribeLocationSmbCommand";
|
|
30
|
+
export * from "./DescribeStorageSystemCommand";
|
|
31
|
+
export * from "./DescribeStorageSystemResourceMetricsCommand";
|
|
32
|
+
export * from "./DescribeStorageSystemResourcesCommand";
|
|
28
33
|
export * from "./DescribeTaskCommand";
|
|
29
34
|
export * from "./DescribeTaskExecutionCommand";
|
|
35
|
+
export * from "./GenerateRecommendationsCommand";
|
|
30
36
|
export * from "./ListAgentsCommand";
|
|
37
|
+
export * from "./ListDiscoveryJobsCommand";
|
|
31
38
|
export * from "./ListLocationsCommand";
|
|
39
|
+
export * from "./ListStorageSystemsCommand";
|
|
32
40
|
export * from "./ListTagsForResourceCommand";
|
|
33
41
|
export * from "./ListTaskExecutionsCommand";
|
|
34
42
|
export * from "./ListTasksCommand";
|
|
43
|
+
export * from "./RemoveStorageSystemCommand";
|
|
44
|
+
export * from "./StartDiscoveryJobCommand";
|
|
35
45
|
export * from "./StartTaskExecutionCommand";
|
|
46
|
+
export * from "./StopDiscoveryJobCommand";
|
|
36
47
|
export * from "./TagResourceCommand";
|
|
37
48
|
export * from "./UntagResourceCommand";
|
|
38
49
|
export * from "./UpdateAgentCommand";
|
|
50
|
+
export * from "./UpdateDiscoveryJobCommand";
|
|
39
51
|
export * from "./UpdateLocationHdfsCommand";
|
|
40
52
|
export * from "./UpdateLocationNfsCommand";
|
|
41
53
|
export * from "./UpdateLocationObjectStorageCommand";
|
|
42
54
|
export * from "./UpdateLocationSmbCommand";
|
|
55
|
+
export * from "./UpdateStorageSystemCommand";
|
|
43
56
|
export * from "./UpdateTaskCommand";
|
|
44
57
|
export * from "./UpdateTaskExecutionCommand";
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
2
2
|
import { DataSyncServiceException as __BaseException } from "./DataSyncServiceException";
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
ONLINE: "ONLINE",
|
|
6
|
-
};
|
|
7
|
-
export const Atime = {
|
|
8
|
-
BEST_EFFORT: "BEST_EFFORT",
|
|
9
|
-
NONE: "NONE",
|
|
3
|
+
export const DiscoverySystemType = {
|
|
4
|
+
NetAppONTAP: "NetAppONTAP",
|
|
10
5
|
};
|
|
11
6
|
export class InternalException extends __BaseException {
|
|
12
7
|
constructor(opts) {
|
|
@@ -35,6 +30,14 @@ export class InvalidRequestException extends __BaseException {
|
|
|
35
30
|
this.datasyncErrorCode = opts.datasyncErrorCode;
|
|
36
31
|
}
|
|
37
32
|
}
|
|
33
|
+
export const AgentStatus = {
|
|
34
|
+
OFFLINE: "OFFLINE",
|
|
35
|
+
ONLINE: "ONLINE",
|
|
36
|
+
};
|
|
37
|
+
export const Atime = {
|
|
38
|
+
BEST_EFFORT: "BEST_EFFORT",
|
|
39
|
+
NONE: "NONE",
|
|
40
|
+
};
|
|
38
41
|
export const EfsInTransitEncryption = {
|
|
39
42
|
NONE: "NONE",
|
|
40
43
|
TLS1_2: "TLS1_2",
|
|
@@ -149,6 +152,34 @@ export const EndpointType = {
|
|
|
149
152
|
PRIVATE_LINK: "PRIVATE_LINK",
|
|
150
153
|
PUBLIC: "PUBLIC",
|
|
151
154
|
};
|
|
155
|
+
export const DiscoveryJobStatus = {
|
|
156
|
+
COMPLETED: "COMPLETED",
|
|
157
|
+
COMPLETED_WITH_ISSUES: "COMPLETED_WITH_ISSUES",
|
|
158
|
+
FAILED: "FAILED",
|
|
159
|
+
RUNNING: "RUNNING",
|
|
160
|
+
STOPPED: "STOPPED",
|
|
161
|
+
TERMINATED: "TERMINATED",
|
|
162
|
+
WARNING: "WARNING",
|
|
163
|
+
};
|
|
164
|
+
export const StorageSystemConnectivityStatus = {
|
|
165
|
+
FAIL: "FAIL",
|
|
166
|
+
PASS: "PASS",
|
|
167
|
+
UNKNOWN: "UNKNOWN",
|
|
168
|
+
};
|
|
169
|
+
export const DiscoveryResourceType = {
|
|
170
|
+
CLUSTER: "CLUSTER",
|
|
171
|
+
SVM: "SVM",
|
|
172
|
+
VOLUME: "VOLUME",
|
|
173
|
+
};
|
|
174
|
+
export const DiscoveryResourceFilter = {
|
|
175
|
+
SVM: "SVM",
|
|
176
|
+
};
|
|
177
|
+
export const RecommendationStatus = {
|
|
178
|
+
COMPLETED: "COMPLETED",
|
|
179
|
+
FAILED: "FAILED",
|
|
180
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
181
|
+
NONE: "NONE",
|
|
182
|
+
};
|
|
152
183
|
export const TaskStatus = {
|
|
153
184
|
AVAILABLE: "AVAILABLE",
|
|
154
185
|
CREATING: "CREATING",
|
|
@@ -191,6 +222,15 @@ export const TaskFilterName = {
|
|
|
191
222
|
CreationTime: "CreationTime",
|
|
192
223
|
LocationId: "LocationId",
|
|
193
224
|
};
|
|
225
|
+
export const CredentialsFilterSensitiveLog = (obj) => ({
|
|
226
|
+
...obj,
|
|
227
|
+
...(obj.Username && { Username: SENSITIVE_STRING }),
|
|
228
|
+
...(obj.Password && { Password: SENSITIVE_STRING }),
|
|
229
|
+
});
|
|
230
|
+
export const AddStorageSystemRequestFilterSensitiveLog = (obj) => ({
|
|
231
|
+
...obj,
|
|
232
|
+
...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
|
|
233
|
+
});
|
|
194
234
|
export const FsxProtocolSmbFilterSensitiveLog = (obj) => ({
|
|
195
235
|
...obj,
|
|
196
236
|
...(obj.Password && { Password: SENSITIVE_STRING }),
|
|
@@ -235,3 +275,7 @@ export const UpdateLocationSmbRequestFilterSensitiveLog = (obj) => ({
|
|
|
235
275
|
...obj,
|
|
236
276
|
...(obj.Password && { Password: SENSITIVE_STRING }),
|
|
237
277
|
});
|
|
278
|
+
export const UpdateStorageSystemRequestFilterSensitiveLog = (obj) => ({
|
|
279
|
+
...obj,
|
|
280
|
+
...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
|
|
281
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DescribeStorageSystemResourceMetricsCommand, } from "../commands/DescribeStorageSystemResourceMetricsCommand";
|
|
2
|
+
import { DataSyncClient } from "../DataSyncClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new DescribeStorageSystemResourceMetricsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateDescribeStorageSystemResourceMetrics(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof DataSyncClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected DataSync | DataSyncClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DescribeStorageSystemResourcesCommand, } from "../commands/DescribeStorageSystemResourcesCommand";
|
|
2
|
+
import { DataSyncClient } from "../DataSyncClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new DescribeStorageSystemResourcesCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateDescribeStorageSystemResources(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof DataSyncClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected DataSync | DataSyncClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListDiscoveryJobsCommand, } from "../commands/ListDiscoveryJobsCommand";
|
|
2
|
+
import { DataSyncClient } from "../DataSyncClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListDiscoveryJobsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListDiscoveryJobs(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof DataSyncClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected DataSync | DataSyncClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListStorageSystemsCommand, } from "../commands/ListStorageSystemsCommand";
|
|
2
|
+
import { DataSyncClient } from "../DataSyncClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListStorageSystemsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListStorageSystems(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.NextToken = token;
|
|
12
|
+
input["MaxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof DataSyncClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected DataSync | DataSyncClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.NextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
export * from "./DescribeStorageSystemResourceMetricsPaginator";
|
|
2
|
+
export * from "./DescribeStorageSystemResourcesPaginator";
|
|
1
3
|
export * from "./Interfaces";
|
|
2
4
|
export * from "./ListAgentsPaginator";
|
|
5
|
+
export * from "./ListDiscoveryJobsPaginator";
|
|
3
6
|
export * from "./ListLocationsPaginator";
|
|
7
|
+
export * from "./ListStorageSystemsPaginator";
|
|
4
8
|
export * from "./ListTagsForResourcePaginator";
|
|
5
9
|
export * from "./ListTaskExecutionsPaginator";
|
|
6
10
|
export * from "./ListTasksPaginator";
|