@aws-sdk/client-glacier 3.35.0 → 3.36.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 +13 -0
- package/dist-cjs/Glacier.js +0 -1
- package/dist-cjs/GlacierClient.js +0 -1
- package/dist-cjs/commands/AbortMultipartUploadCommand.js +0 -1
- package/dist-cjs/commands/AbortVaultLockCommand.js +0 -1
- package/dist-cjs/commands/AddTagsToVaultCommand.js +0 -1
- package/dist-cjs/commands/CompleteMultipartUploadCommand.js +0 -1
- package/dist-cjs/commands/CompleteVaultLockCommand.js +0 -1
- package/dist-cjs/commands/CreateVaultCommand.js +0 -1
- package/dist-cjs/commands/DeleteArchiveCommand.js +0 -1
- package/dist-cjs/commands/DeleteVaultAccessPolicyCommand.js +0 -1
- package/dist-cjs/commands/DeleteVaultCommand.js +0 -1
- package/dist-cjs/commands/DeleteVaultNotificationsCommand.js +0 -1
- package/dist-cjs/commands/DescribeJobCommand.js +0 -1
- package/dist-cjs/commands/DescribeVaultCommand.js +0 -1
- package/dist-cjs/commands/GetDataRetrievalPolicyCommand.js +0 -1
- package/dist-cjs/commands/GetJobOutputCommand.js +0 -1
- package/dist-cjs/commands/GetVaultAccessPolicyCommand.js +0 -1
- package/dist-cjs/commands/GetVaultLockCommand.js +0 -1
- package/dist-cjs/commands/GetVaultNotificationsCommand.js +0 -1
- package/dist-cjs/commands/InitiateJobCommand.js +0 -1
- package/dist-cjs/commands/InitiateMultipartUploadCommand.js +0 -1
- package/dist-cjs/commands/InitiateVaultLockCommand.js +0 -1
- package/dist-cjs/commands/ListJobsCommand.js +0 -1
- package/dist-cjs/commands/ListMultipartUploadsCommand.js +0 -1
- package/dist-cjs/commands/ListPartsCommand.js +0 -1
- package/dist-cjs/commands/ListProvisionedCapacityCommand.js +0 -1
- package/dist-cjs/commands/ListTagsForVaultCommand.js +0 -1
- package/dist-cjs/commands/ListVaultsCommand.js +0 -1
- package/dist-cjs/commands/PurchaseProvisionedCapacityCommand.js +0 -1
- package/dist-cjs/commands/RemoveTagsFromVaultCommand.js +0 -1
- package/dist-cjs/commands/SetDataRetrievalPolicyCommand.js +0 -1
- package/dist-cjs/commands/SetVaultAccessPolicyCommand.js +0 -1
- package/dist-cjs/commands/SetVaultNotificationsCommand.js +0 -1
- package/dist-cjs/commands/UploadArchiveCommand.js +0 -1
- package/dist-cjs/commands/UploadMultipartPartCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListMultipartUploadsPaginator.js +0 -1
- package/dist-cjs/pagination/ListPartsPaginator.js +0 -1
- package/dist-cjs/pagination/ListVaultsPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-cjs/waiters/waitForVaultExists.js +0 -1
- package/dist-cjs/waiters/waitForVaultNotExists.js +0 -1
- package/dist-es/Glacier.js +0 -1
- package/dist-es/GlacierClient.js +0 -1
- package/dist-es/commands/AbortMultipartUploadCommand.js +0 -1
- package/dist-es/commands/AbortVaultLockCommand.js +0 -1
- package/dist-es/commands/AddTagsToVaultCommand.js +0 -1
- package/dist-es/commands/CompleteMultipartUploadCommand.js +0 -1
- package/dist-es/commands/CompleteVaultLockCommand.js +0 -1
- package/dist-es/commands/CreateVaultCommand.js +0 -1
- package/dist-es/commands/DeleteArchiveCommand.js +0 -1
- package/dist-es/commands/DeleteVaultAccessPolicyCommand.js +0 -1
- package/dist-es/commands/DeleteVaultCommand.js +0 -1
- package/dist-es/commands/DeleteVaultNotificationsCommand.js +0 -1
- package/dist-es/commands/DescribeJobCommand.js +0 -1
- package/dist-es/commands/DescribeVaultCommand.js +0 -1
- package/dist-es/commands/GetDataRetrievalPolicyCommand.js +0 -1
- package/dist-es/commands/GetJobOutputCommand.js +0 -1
- package/dist-es/commands/GetVaultAccessPolicyCommand.js +0 -1
- package/dist-es/commands/GetVaultLockCommand.js +0 -1
- package/dist-es/commands/GetVaultNotificationsCommand.js +0 -1
- package/dist-es/commands/InitiateJobCommand.js +0 -1
- package/dist-es/commands/InitiateMultipartUploadCommand.js +0 -1
- package/dist-es/commands/InitiateVaultLockCommand.js +0 -1
- package/dist-es/commands/ListJobsCommand.js +0 -1
- package/dist-es/commands/ListMultipartUploadsCommand.js +0 -1
- package/dist-es/commands/ListPartsCommand.js +0 -1
- package/dist-es/commands/ListProvisionedCapacityCommand.js +0 -1
- package/dist-es/commands/ListTagsForVaultCommand.js +0 -1
- package/dist-es/commands/ListVaultsCommand.js +0 -1
- package/dist-es/commands/PurchaseProvisionedCapacityCommand.js +0 -1
- package/dist-es/commands/RemoveTagsFromVaultCommand.js +0 -1
- package/dist-es/commands/SetDataRetrievalPolicyCommand.js +0 -1
- package/dist-es/commands/SetVaultAccessPolicyCommand.js +0 -1
- package/dist-es/commands/SetVaultNotificationsCommand.js +0 -1
- package/dist-es/commands/UploadArchiveCommand.js +0 -1
- package/dist-es/commands/UploadMultipartPartCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListJobsPaginator.js +0 -1
- package/dist-es/pagination/ListMultipartUploadsPaginator.js +0 -1
- package/dist-es/pagination/ListPartsPaginator.js +0 -1
- package/dist-es/pagination/ListVaultsPaginator.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-es/waiters/waitForVaultExists.js +0 -1
- package/dist-es/waiters/waitForVaultNotExists.js +0 -1
- package/package.json +37 -34
- package/dist-cjs/Glacier.js.map +0 -1
- package/dist-cjs/GlacierClient.js.map +0 -1
- package/dist-cjs/commands/AbortMultipartUploadCommand.js.map +0 -1
- package/dist-cjs/commands/AbortVaultLockCommand.js.map +0 -1
- package/dist-cjs/commands/AddTagsToVaultCommand.js.map +0 -1
- package/dist-cjs/commands/CompleteMultipartUploadCommand.js.map +0 -1
- package/dist-cjs/commands/CompleteVaultLockCommand.js.map +0 -1
- package/dist-cjs/commands/CreateVaultCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteArchiveCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteVaultAccessPolicyCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteVaultCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteVaultNotificationsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeJobCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeVaultCommand.js.map +0 -1
- package/dist-cjs/commands/GetDataRetrievalPolicyCommand.js.map +0 -1
- package/dist-cjs/commands/GetJobOutputCommand.js.map +0 -1
- package/dist-cjs/commands/GetVaultAccessPolicyCommand.js.map +0 -1
- package/dist-cjs/commands/GetVaultLockCommand.js.map +0 -1
- package/dist-cjs/commands/GetVaultNotificationsCommand.js.map +0 -1
- package/dist-cjs/commands/InitiateJobCommand.js.map +0 -1
- package/dist-cjs/commands/InitiateMultipartUploadCommand.js.map +0 -1
- package/dist-cjs/commands/InitiateVaultLockCommand.js.map +0 -1
- package/dist-cjs/commands/ListJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListMultipartUploadsCommand.js.map +0 -1
- package/dist-cjs/commands/ListPartsCommand.js.map +0 -1
- package/dist-cjs/commands/ListProvisionedCapacityCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForVaultCommand.js.map +0 -1
- package/dist-cjs/commands/ListVaultsCommand.js.map +0 -1
- package/dist-cjs/commands/PurchaseProvisionedCapacityCommand.js.map +0 -1
- package/dist-cjs/commands/RemoveTagsFromVaultCommand.js.map +0 -1
- package/dist-cjs/commands/SetDataRetrievalPolicyCommand.js.map +0 -1
- package/dist-cjs/commands/SetVaultAccessPolicyCommand.js.map +0 -1
- package/dist-cjs/commands/SetVaultNotificationsCommand.js.map +0 -1
- package/dist-cjs/commands/UploadArchiveCommand.js.map +0 -1
- package/dist-cjs/commands/UploadMultipartPartCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListMultipartUploadsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListPartsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListVaultsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-cjs/waiters/waitForVaultExists.js.map +0 -1
- package/dist-cjs/waiters/waitForVaultNotExists.js.map +0 -1
- package/dist-es/Glacier.js.map +0 -1
- package/dist-es/GlacierClient.js.map +0 -1
- package/dist-es/commands/AbortMultipartUploadCommand.js.map +0 -1
- package/dist-es/commands/AbortVaultLockCommand.js.map +0 -1
- package/dist-es/commands/AddTagsToVaultCommand.js.map +0 -1
- package/dist-es/commands/CompleteMultipartUploadCommand.js.map +0 -1
- package/dist-es/commands/CompleteVaultLockCommand.js.map +0 -1
- package/dist-es/commands/CreateVaultCommand.js.map +0 -1
- package/dist-es/commands/DeleteArchiveCommand.js.map +0 -1
- package/dist-es/commands/DeleteVaultAccessPolicyCommand.js.map +0 -1
- package/dist-es/commands/DeleteVaultCommand.js.map +0 -1
- package/dist-es/commands/DeleteVaultNotificationsCommand.js.map +0 -1
- package/dist-es/commands/DescribeJobCommand.js.map +0 -1
- package/dist-es/commands/DescribeVaultCommand.js.map +0 -1
- package/dist-es/commands/GetDataRetrievalPolicyCommand.js.map +0 -1
- package/dist-es/commands/GetJobOutputCommand.js.map +0 -1
- package/dist-es/commands/GetVaultAccessPolicyCommand.js.map +0 -1
- package/dist-es/commands/GetVaultLockCommand.js.map +0 -1
- package/dist-es/commands/GetVaultNotificationsCommand.js.map +0 -1
- package/dist-es/commands/InitiateJobCommand.js.map +0 -1
- package/dist-es/commands/InitiateMultipartUploadCommand.js.map +0 -1
- package/dist-es/commands/InitiateVaultLockCommand.js.map +0 -1
- package/dist-es/commands/ListJobsCommand.js.map +0 -1
- package/dist-es/commands/ListMultipartUploadsCommand.js.map +0 -1
- package/dist-es/commands/ListPartsCommand.js.map +0 -1
- package/dist-es/commands/ListProvisionedCapacityCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForVaultCommand.js.map +0 -1
- package/dist-es/commands/ListVaultsCommand.js.map +0 -1
- package/dist-es/commands/PurchaseProvisionedCapacityCommand.js.map +0 -1
- package/dist-es/commands/RemoveTagsFromVaultCommand.js.map +0 -1
- package/dist-es/commands/SetDataRetrievalPolicyCommand.js.map +0 -1
- package/dist-es/commands/SetVaultAccessPolicyCommand.js.map +0 -1
- package/dist-es/commands/SetVaultNotificationsCommand.js.map +0 -1
- package/dist-es/commands/UploadArchiveCommand.js.map +0 -1
- package/dist-es/commands/UploadMultipartPartCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListMultipartUploadsPaginator.js.map +0 -1
- package/dist-es/pagination/ListPartsPaginator.js.map +0 -1
- package/dist-es/pagination/ListVaultsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/dist-es/waiters/waitForVaultExists.js.map +0 -1
- package/dist-es/waiters/waitForVaultNotExists.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/Glacier.ts +0 -1790
- package/src/GlacierClient.ts +0 -432
- package/src/commands/AbortMultipartUploadCommand.ts +0 -112
- package/src/commands/AbortVaultLockCommand.ts +0 -108
- package/src/commands/AddTagsToVaultCommand.ts +0 -100
- package/src/commands/CompleteMultipartUploadCommand.ts +0 -132
- package/src/commands/CompleteVaultLockCommand.ts +0 -108
- package/src/commands/CreateVaultCommand.ts +0 -118
- package/src/commands/DeleteArchiveCommand.ts +0 -121
- package/src/commands/DeleteVaultAccessPolicyCommand.ts +0 -101
- package/src/commands/DeleteVaultCommand.ts +0 -114
- package/src/commands/DeleteVaultNotificationsCommand.ts +0 -107
- package/src/commands/DescribeJobCommand.ts +0 -118
- package/src/commands/DescribeVaultCommand.ts +0 -112
- package/src/commands/GetDataRetrievalPolicyCommand.ts +0 -97
- package/src/commands/GetJobOutputCommand.ts +0 -131
- package/src/commands/GetVaultAccessPolicyCommand.ts +0 -100
- package/src/commands/GetVaultLockCommand.ts +0 -122
- package/src/commands/GetVaultNotificationsCommand.ts +0 -110
- package/src/commands/InitiateJobCommand.ts +0 -99
- package/src/commands/InitiateMultipartUploadCommand.ts +0 -128
- package/src/commands/InitiateVaultLockCommand.ts +0 -129
- package/src/commands/ListJobsCommand.ts +0 -130
- package/src/commands/ListMultipartUploadsCommand.ts +0 -120
- package/src/commands/ListPartsCommand.ts +0 -116
- package/src/commands/ListProvisionedCapacityCommand.ts +0 -96
- package/src/commands/ListTagsForVaultCommand.ts +0 -97
- package/src/commands/ListVaultsCommand.ts +0 -113
- package/src/commands/PurchaseProvisionedCapacityCommand.ts +0 -98
- package/src/commands/RemoveTagsFromVaultCommand.ts +0 -98
- package/src/commands/SetDataRetrievalPolicyCommand.ts +0 -100
- package/src/commands/SetVaultAccessPolicyCommand.ts +0 -100
- package/src/commands/SetVaultNotificationsCommand.ts +0 -132
- package/src/commands/UploadArchiveCommand.ts +0 -135
- package/src/commands/UploadMultipartPartCommand.ts +0 -154
- package/src/endpoints.ts +0 -91
- package/src/index.ts +0 -43
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2898
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListJobsPaginator.ts +0 -55
- package/src/pagination/ListMultipartUploadsPaginator.ts +0 -59
- package/src/pagination/ListPartsPaginator.ts +0 -55
- package/src/pagination/ListVaultsPaginator.ts +0 -55
- package/src/protocols/Aws_restJson1.ts +0 -5189
- package/src/runtimeConfig.browser.ts +0 -43
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -48
- package/src/waiters/waitForVaultExists.ts +0 -43
- package/src/waiters/waitForVaultNotExists.ts +0 -43
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { Glacier } from "../Glacier";
|
|
4
|
-
import { GlacierClient } from "../GlacierClient";
|
|
5
|
-
|
|
6
|
-
export interface GlacierPaginationConfiguration extends PaginationConfiguration {
|
|
7
|
-
client: Glacier | GlacierClient;
|
|
8
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { ListJobsCommand, ListJobsCommandInput, ListJobsCommandOutput } from "../commands/ListJobsCommand";
|
|
4
|
-
import { Glacier } from "../Glacier";
|
|
5
|
-
import { GlacierClient } from "../GlacierClient";
|
|
6
|
-
import { GlacierPaginationConfiguration } from "./Interfaces";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
const makePagedClientRequest = async (
|
|
12
|
-
client: GlacierClient,
|
|
13
|
-
input: ListJobsCommandInput,
|
|
14
|
-
...args: any
|
|
15
|
-
): Promise<ListJobsCommandOutput> => {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
return await client.send(new ListJobsCommand(input), ...args);
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
const makePagedRequest = async (
|
|
23
|
-
client: Glacier,
|
|
24
|
-
input: ListJobsCommandInput,
|
|
25
|
-
...args: any
|
|
26
|
-
): Promise<ListJobsCommandOutput> => {
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
return await client.listJobs(input, ...args);
|
|
29
|
-
};
|
|
30
|
-
export async function* paginateListJobs(
|
|
31
|
-
config: GlacierPaginationConfiguration,
|
|
32
|
-
input: ListJobsCommandInput,
|
|
33
|
-
...additionalArguments: any
|
|
34
|
-
): Paginator<ListJobsCommandOutput> {
|
|
35
|
-
// ToDo: replace with actual type instead of typeof input.marker
|
|
36
|
-
let token: typeof input.marker | undefined = config.startingToken || undefined;
|
|
37
|
-
let hasNext = true;
|
|
38
|
-
let page: ListJobsCommandOutput;
|
|
39
|
-
while (hasNext) {
|
|
40
|
-
input.marker = token;
|
|
41
|
-
input["limit"] = config.pageSize;
|
|
42
|
-
if (config.client instanceof Glacier) {
|
|
43
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else if (config.client instanceof GlacierClient) {
|
|
45
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error("Invalid client, expected Glacier | GlacierClient");
|
|
48
|
-
}
|
|
49
|
-
yield page;
|
|
50
|
-
token = page.Marker;
|
|
51
|
-
hasNext = !!token;
|
|
52
|
-
}
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListMultipartUploadsCommand,
|
|
5
|
-
ListMultipartUploadsCommandInput,
|
|
6
|
-
ListMultipartUploadsCommandOutput,
|
|
7
|
-
} from "../commands/ListMultipartUploadsCommand";
|
|
8
|
-
import { Glacier } from "../Glacier";
|
|
9
|
-
import { GlacierClient } from "../GlacierClient";
|
|
10
|
-
import { GlacierPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: GlacierClient,
|
|
17
|
-
input: ListMultipartUploadsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListMultipartUploadsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListMultipartUploadsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: Glacier,
|
|
28
|
-
input: ListMultipartUploadsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListMultipartUploadsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listMultipartUploads(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListMultipartUploads(
|
|
35
|
-
config: GlacierPaginationConfiguration,
|
|
36
|
-
input: ListMultipartUploadsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListMultipartUploadsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.marker
|
|
40
|
-
let token: typeof input.marker | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListMultipartUploadsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.marker = token;
|
|
45
|
-
input["limit"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof Glacier) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof GlacierClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected Glacier | GlacierClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.Marker;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { ListPartsCommand, ListPartsCommandInput, ListPartsCommandOutput } from "../commands/ListPartsCommand";
|
|
4
|
-
import { Glacier } from "../Glacier";
|
|
5
|
-
import { GlacierClient } from "../GlacierClient";
|
|
6
|
-
import { GlacierPaginationConfiguration } from "./Interfaces";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
const makePagedClientRequest = async (
|
|
12
|
-
client: GlacierClient,
|
|
13
|
-
input: ListPartsCommandInput,
|
|
14
|
-
...args: any
|
|
15
|
-
): Promise<ListPartsCommandOutput> => {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
return await client.send(new ListPartsCommand(input), ...args);
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
const makePagedRequest = async (
|
|
23
|
-
client: Glacier,
|
|
24
|
-
input: ListPartsCommandInput,
|
|
25
|
-
...args: any
|
|
26
|
-
): Promise<ListPartsCommandOutput> => {
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
return await client.listParts(input, ...args);
|
|
29
|
-
};
|
|
30
|
-
export async function* paginateListParts(
|
|
31
|
-
config: GlacierPaginationConfiguration,
|
|
32
|
-
input: ListPartsCommandInput,
|
|
33
|
-
...additionalArguments: any
|
|
34
|
-
): Paginator<ListPartsCommandOutput> {
|
|
35
|
-
// ToDo: replace with actual type instead of typeof input.marker
|
|
36
|
-
let token: typeof input.marker | undefined = config.startingToken || undefined;
|
|
37
|
-
let hasNext = true;
|
|
38
|
-
let page: ListPartsCommandOutput;
|
|
39
|
-
while (hasNext) {
|
|
40
|
-
input.marker = token;
|
|
41
|
-
input["limit"] = config.pageSize;
|
|
42
|
-
if (config.client instanceof Glacier) {
|
|
43
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else if (config.client instanceof GlacierClient) {
|
|
45
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error("Invalid client, expected Glacier | GlacierClient");
|
|
48
|
-
}
|
|
49
|
-
yield page;
|
|
50
|
-
token = page.Marker;
|
|
51
|
-
hasNext = !!token;
|
|
52
|
-
}
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { ListVaultsCommand, ListVaultsCommandInput, ListVaultsCommandOutput } from "../commands/ListVaultsCommand";
|
|
4
|
-
import { Glacier } from "../Glacier";
|
|
5
|
-
import { GlacierClient } from "../GlacierClient";
|
|
6
|
-
import { GlacierPaginationConfiguration } from "./Interfaces";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
const makePagedClientRequest = async (
|
|
12
|
-
client: GlacierClient,
|
|
13
|
-
input: ListVaultsCommandInput,
|
|
14
|
-
...args: any
|
|
15
|
-
): Promise<ListVaultsCommandOutput> => {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
return await client.send(new ListVaultsCommand(input), ...args);
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
const makePagedRequest = async (
|
|
23
|
-
client: Glacier,
|
|
24
|
-
input: ListVaultsCommandInput,
|
|
25
|
-
...args: any
|
|
26
|
-
): Promise<ListVaultsCommandOutput> => {
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
return await client.listVaults(input, ...args);
|
|
29
|
-
};
|
|
30
|
-
export async function* paginateListVaults(
|
|
31
|
-
config: GlacierPaginationConfiguration,
|
|
32
|
-
input: ListVaultsCommandInput,
|
|
33
|
-
...additionalArguments: any
|
|
34
|
-
): Paginator<ListVaultsCommandOutput> {
|
|
35
|
-
// ToDo: replace with actual type instead of typeof input.marker
|
|
36
|
-
let token: typeof input.marker | undefined = config.startingToken || undefined;
|
|
37
|
-
let hasNext = true;
|
|
38
|
-
let page: ListVaultsCommandOutput;
|
|
39
|
-
while (hasNext) {
|
|
40
|
-
input.marker = token;
|
|
41
|
-
input["limit"] = config.pageSize;
|
|
42
|
-
if (config.client instanceof Glacier) {
|
|
43
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else if (config.client instanceof GlacierClient) {
|
|
45
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error("Invalid client, expected Glacier | GlacierClient");
|
|
48
|
-
}
|
|
49
|
-
yield page;
|
|
50
|
-
token = page.Marker;
|
|
51
|
-
hasNext = !!token;
|
|
52
|
-
}
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|