@aws-sdk/client-kms 3.131.0 → 3.132.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/models/models_0.js +6 -0
  3. package/dist-cjs/pagination/DescribeCustomKeyStoresPaginator.js +36 -0
  4. package/dist-cjs/pagination/ListResourceTagsPaginator.js +36 -0
  5. package/dist-cjs/pagination/ListRetirableGrantsPaginator.js +36 -0
  6. package/dist-cjs/pagination/index.js +3 -0
  7. package/dist-es/models/models_0.js +6 -0
  8. package/dist-es/pagination/DescribeCustomKeyStoresPaginator.js +75 -0
  9. package/dist-es/pagination/ListResourceTagsPaginator.js +75 -0
  10. package/dist-es/pagination/ListRetirableGrantsPaginator.js +75 -0
  11. package/dist-es/pagination/index.js +3 -0
  12. package/dist-types/KMS.d.ts +49 -27
  13. package/dist-types/commands/CreateCustomKeyStoreCommand.d.ts +1 -1
  14. package/dist-types/commands/CreateKeyCommand.d.ts +5 -3
  15. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +2 -2
  16. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +1 -1
  17. package/dist-types/commands/DescribeKeyCommand.d.ts +1 -1
  18. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +1 -1
  19. package/dist-types/commands/EncryptCommand.d.ts +5 -1
  20. package/dist-types/commands/GenerateDataKeyCommand.d.ts +12 -6
  21. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +3 -3
  22. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +3 -3
  23. package/dist-types/commands/GenerateRandomCommand.d.ts +4 -1
  24. package/dist-types/commands/GetPublicKeyCommand.d.ts +5 -2
  25. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +1 -1
  26. package/dist-types/commands/VerifyCommand.d.ts +5 -1
  27. package/dist-types/models/models_0.d.ts +56 -38
  28. package/dist-types/pagination/DescribeCustomKeyStoresPaginator.d.ts +4 -0
  29. package/dist-types/pagination/ListResourceTagsPaginator.d.ts +4 -0
  30. package/dist-types/pagination/ListRetirableGrantsPaginator.d.ts +4 -0
  31. package/dist-types/pagination/index.d.ts +3 -0
  32. package/dist-types/ts3.4/models/models_0.d.ts +11 -5
  33. package/dist-types/ts3.4/pagination/DescribeCustomKeyStoresPaginator.d.ts +4 -0
  34. package/dist-types/ts3.4/pagination/ListResourceTagsPaginator.d.ts +4 -0
  35. package/dist-types/ts3.4/pagination/ListRetirableGrantsPaginator.d.ts +4 -0
  36. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  37. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.132.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.131.0...v3.132.0) (2022-07-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * **client-kms:** Added support for the SM2 KeySpec in China Partition Regions ([250fd19](https://github.com/aws/aws-sdk-js-v3/commit/250fd19d65a83b3d183ced9863bf6aba8f1fb698))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-kms
@@ -214,6 +214,7 @@ var ConnectionErrorCodeType;
214
214
  (function (ConnectionErrorCodeType) {
215
215
  ConnectionErrorCodeType["CLUSTER_NOT_FOUND"] = "CLUSTER_NOT_FOUND";
216
216
  ConnectionErrorCodeType["INSUFFICIENT_CLOUDHSM_HSMS"] = "INSUFFICIENT_CLOUDHSM_HSMS";
217
+ ConnectionErrorCodeType["INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET"] = "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET";
217
218
  ConnectionErrorCodeType["INTERNAL_ERROR"] = "INTERNAL_ERROR";
218
219
  ConnectionErrorCodeType["INVALID_CREDENTIALS"] = "INVALID_CREDENTIALS";
219
220
  ConnectionErrorCodeType["NETWORK_ERRORS"] = "NETWORK_ERRORS";
@@ -377,6 +378,7 @@ var CustomerMasterKeySpec;
377
378
  CustomerMasterKeySpec["RSA_2048"] = "RSA_2048";
378
379
  CustomerMasterKeySpec["RSA_3072"] = "RSA_3072";
379
380
  CustomerMasterKeySpec["RSA_4096"] = "RSA_4096";
381
+ CustomerMasterKeySpec["SM2"] = "SM2";
380
382
  CustomerMasterKeySpec["SYMMETRIC_DEFAULT"] = "SYMMETRIC_DEFAULT";
381
383
  })(CustomerMasterKeySpec = exports.CustomerMasterKeySpec || (exports.CustomerMasterKeySpec = {}));
382
384
  var KeySpec;
@@ -392,6 +394,7 @@ var KeySpec;
392
394
  KeySpec["RSA_2048"] = "RSA_2048";
393
395
  KeySpec["RSA_3072"] = "RSA_3072";
394
396
  KeySpec["RSA_4096"] = "RSA_4096";
397
+ KeySpec["SM2"] = "SM2";
395
398
  KeySpec["SYMMETRIC_DEFAULT"] = "SYMMETRIC_DEFAULT";
396
399
  })(KeySpec = exports.KeySpec || (exports.KeySpec = {}));
397
400
  var KeyUsageType;
@@ -422,6 +425,7 @@ var EncryptionAlgorithmSpec;
422
425
  (function (EncryptionAlgorithmSpec) {
423
426
  EncryptionAlgorithmSpec["RSAES_OAEP_SHA_1"] = "RSAES_OAEP_SHA_1";
424
427
  EncryptionAlgorithmSpec["RSAES_OAEP_SHA_256"] = "RSAES_OAEP_SHA_256";
428
+ EncryptionAlgorithmSpec["SM2PKE"] = "SM2PKE";
425
429
  EncryptionAlgorithmSpec["SYMMETRIC_DEFAULT"] = "SYMMETRIC_DEFAULT";
426
430
  })(EncryptionAlgorithmSpec = exports.EncryptionAlgorithmSpec || (exports.EncryptionAlgorithmSpec = {}));
427
431
  var ExpirationModelType;
@@ -480,6 +484,7 @@ var SigningAlgorithmSpec;
480
484
  SigningAlgorithmSpec["RSASSA_PSS_SHA_256"] = "RSASSA_PSS_SHA_256";
481
485
  SigningAlgorithmSpec["RSASSA_PSS_SHA_384"] = "RSASSA_PSS_SHA_384";
482
486
  SigningAlgorithmSpec["RSASSA_PSS_SHA_512"] = "RSASSA_PSS_SHA_512";
487
+ SigningAlgorithmSpec["SM2DSA"] = "SM2DSA";
483
488
  })(SigningAlgorithmSpec = exports.SigningAlgorithmSpec || (exports.SigningAlgorithmSpec = {}));
484
489
  var KeyMetadata;
485
490
  (function (KeyMetadata) {
@@ -560,6 +565,7 @@ var DataKeyPairSpec;
560
565
  DataKeyPairSpec["RSA_2048"] = "RSA_2048";
561
566
  DataKeyPairSpec["RSA_3072"] = "RSA_3072";
562
567
  DataKeyPairSpec["RSA_4096"] = "RSA_4096";
568
+ DataKeyPairSpec["SM2"] = "SM2";
563
569
  })(DataKeyPairSpec = exports.DataKeyPairSpec || (exports.DataKeyPairSpec = {}));
564
570
  var DataKeySpec;
565
571
  (function (DataKeySpec) {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateDescribeCustomKeyStores = void 0;
4
+ const DescribeCustomKeyStoresCommand_1 = require("../commands/DescribeCustomKeyStoresCommand");
5
+ const KMS_1 = require("../KMS");
6
+ const KMSClient_1 = require("../KMSClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new DescribeCustomKeyStoresCommand_1.DescribeCustomKeyStoresCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.describeCustomKeyStores(input, ...args);
12
+ };
13
+ async function* paginateDescribeCustomKeyStores(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.Marker = token;
19
+ input["Limit"] = config.pageSize;
20
+ if (config.client instanceof KMS_1.KMS) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof KMSClient_1.KMSClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected KMS | KMSClient");
28
+ }
29
+ yield page;
30
+ const prevToken = token;
31
+ token = page.NextMarker;
32
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ }
34
+ return undefined;
35
+ }
36
+ exports.paginateDescribeCustomKeyStores = paginateDescribeCustomKeyStores;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListResourceTags = void 0;
4
+ const ListResourceTagsCommand_1 = require("../commands/ListResourceTagsCommand");
5
+ const KMS_1 = require("../KMS");
6
+ const KMSClient_1 = require("../KMSClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new ListResourceTagsCommand_1.ListResourceTagsCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.listResourceTags(input, ...args);
12
+ };
13
+ async function* paginateListResourceTags(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.Marker = token;
19
+ input["Limit"] = config.pageSize;
20
+ if (config.client instanceof KMS_1.KMS) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof KMSClient_1.KMSClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected KMS | KMSClient");
28
+ }
29
+ yield page;
30
+ const prevToken = token;
31
+ token = page.NextMarker;
32
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ }
34
+ return undefined;
35
+ }
36
+ exports.paginateListResourceTags = paginateListResourceTags;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListRetirableGrants = void 0;
4
+ const ListRetirableGrantsCommand_1 = require("../commands/ListRetirableGrantsCommand");
5
+ const KMS_1 = require("../KMS");
6
+ const KMSClient_1 = require("../KMSClient");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new ListRetirableGrantsCommand_1.ListRetirableGrantsCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.listRetirableGrants(input, ...args);
12
+ };
13
+ async function* paginateListRetirableGrants(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.Marker = token;
19
+ input["Limit"] = config.pageSize;
20
+ if (config.client instanceof KMS_1.KMS) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof KMSClient_1.KMSClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected KMS | KMSClient");
28
+ }
29
+ yield page;
30
+ const prevToken = token;
31
+ token = page.NextMarker;
32
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ }
34
+ return undefined;
35
+ }
36
+ exports.paginateListRetirableGrants = paginateListRetirableGrants;
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./DescribeCustomKeyStoresPaginator"), exports);
4
5
  tslib_1.__exportStar(require("./Interfaces"), exports);
5
6
  tslib_1.__exportStar(require("./ListAliasesPaginator"), exports);
6
7
  tslib_1.__exportStar(require("./ListGrantsPaginator"), exports);
7
8
  tslib_1.__exportStar(require("./ListKeyPoliciesPaginator"), exports);
8
9
  tslib_1.__exportStar(require("./ListKeysPaginator"), exports);
10
+ tslib_1.__exportStar(require("./ListResourceTagsPaginator"), exports);
11
+ tslib_1.__exportStar(require("./ListRetirableGrantsPaginator"), exports);
@@ -187,6 +187,7 @@ export var ConnectionErrorCodeType;
187
187
  (function (ConnectionErrorCodeType) {
188
188
  ConnectionErrorCodeType["CLUSTER_NOT_FOUND"] = "CLUSTER_NOT_FOUND";
189
189
  ConnectionErrorCodeType["INSUFFICIENT_CLOUDHSM_HSMS"] = "INSUFFICIENT_CLOUDHSM_HSMS";
190
+ ConnectionErrorCodeType["INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET"] = "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET";
190
191
  ConnectionErrorCodeType["INTERNAL_ERROR"] = "INTERNAL_ERROR";
191
192
  ConnectionErrorCodeType["INVALID_CREDENTIALS"] = "INVALID_CREDENTIALS";
192
193
  ConnectionErrorCodeType["NETWORK_ERRORS"] = "NETWORK_ERRORS";
@@ -331,6 +332,7 @@ export var CustomerMasterKeySpec;
331
332
  CustomerMasterKeySpec["RSA_2048"] = "RSA_2048";
332
333
  CustomerMasterKeySpec["RSA_3072"] = "RSA_3072";
333
334
  CustomerMasterKeySpec["RSA_4096"] = "RSA_4096";
335
+ CustomerMasterKeySpec["SM2"] = "SM2";
334
336
  CustomerMasterKeySpec["SYMMETRIC_DEFAULT"] = "SYMMETRIC_DEFAULT";
335
337
  })(CustomerMasterKeySpec || (CustomerMasterKeySpec = {}));
336
338
  export var KeySpec;
@@ -346,6 +348,7 @@ export var KeySpec;
346
348
  KeySpec["RSA_2048"] = "RSA_2048";
347
349
  KeySpec["RSA_3072"] = "RSA_3072";
348
350
  KeySpec["RSA_4096"] = "RSA_4096";
351
+ KeySpec["SM2"] = "SM2";
349
352
  KeySpec["SYMMETRIC_DEFAULT"] = "SYMMETRIC_DEFAULT";
350
353
  })(KeySpec || (KeySpec = {}));
351
354
  export var KeyUsageType;
@@ -372,6 +375,7 @@ export var EncryptionAlgorithmSpec;
372
375
  (function (EncryptionAlgorithmSpec) {
373
376
  EncryptionAlgorithmSpec["RSAES_OAEP_SHA_1"] = "RSAES_OAEP_SHA_1";
374
377
  EncryptionAlgorithmSpec["RSAES_OAEP_SHA_256"] = "RSAES_OAEP_SHA_256";
378
+ EncryptionAlgorithmSpec["SM2PKE"] = "SM2PKE";
375
379
  EncryptionAlgorithmSpec["SYMMETRIC_DEFAULT"] = "SYMMETRIC_DEFAULT";
376
380
  })(EncryptionAlgorithmSpec || (EncryptionAlgorithmSpec = {}));
377
381
  export var ExpirationModelType;
@@ -426,6 +430,7 @@ export var SigningAlgorithmSpec;
426
430
  SigningAlgorithmSpec["RSASSA_PSS_SHA_256"] = "RSASSA_PSS_SHA_256";
427
431
  SigningAlgorithmSpec["RSASSA_PSS_SHA_384"] = "RSASSA_PSS_SHA_384";
428
432
  SigningAlgorithmSpec["RSASSA_PSS_SHA_512"] = "RSASSA_PSS_SHA_512";
433
+ SigningAlgorithmSpec["SM2DSA"] = "SM2DSA";
429
434
  })(SigningAlgorithmSpec || (SigningAlgorithmSpec = {}));
430
435
  export var KeyMetadata;
431
436
  (function (KeyMetadata) {
@@ -496,6 +501,7 @@ export var DataKeyPairSpec;
496
501
  DataKeyPairSpec["RSA_2048"] = "RSA_2048";
497
502
  DataKeyPairSpec["RSA_3072"] = "RSA_3072";
498
503
  DataKeyPairSpec["RSA_4096"] = "RSA_4096";
504
+ DataKeyPairSpec["SM2"] = "SM2";
499
505
  })(DataKeyPairSpec || (DataKeyPairSpec = {}));
500
506
  export var DataKeySpec;
501
507
  (function (DataKeySpec) {
@@ -0,0 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { DescribeCustomKeyStoresCommand, } from "../commands/DescribeCustomKeyStoresCommand";
3
+ import { KMS } from "../KMS";
4
+ import { KMSClient } from "../KMSClient";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
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 DescribeCustomKeyStoresCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
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.describeCustomKeyStores.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateDescribeCustomKeyStores(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateDescribeCustomKeyStores_1() {
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.Marker = token;
49
+ input["Limit"] = config.pageSize;
50
+ if (!(config.client instanceof KMS)) 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 KMSClient)) 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 KMS | KMSClient");
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.NextMarker;
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
+ });
75
+ }
@@ -0,0 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { ListResourceTagsCommand, } from "../commands/ListResourceTagsCommand";
3
+ import { KMS } from "../KMS";
4
+ import { KMSClient } from "../KMSClient";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
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 ListResourceTagsCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
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.listResourceTags.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListResourceTags(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListResourceTags_1() {
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.Marker = token;
49
+ input["Limit"] = config.pageSize;
50
+ if (!(config.client instanceof KMS)) 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 KMSClient)) 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 KMS | KMSClient");
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.NextMarker;
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
+ });
75
+ }
@@ -0,0 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { ListRetirableGrantsCommand, } from "../commands/ListRetirableGrantsCommand";
3
+ import { KMS } from "../KMS";
4
+ import { KMSClient } from "../KMSClient";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
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 ListRetirableGrantsCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
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.listRetirableGrants.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListRetirableGrants(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListRetirableGrants_1() {
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.Marker = token;
49
+ input["Limit"] = config.pageSize;
50
+ if (!(config.client instanceof KMS)) 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 KMSClient)) 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 KMS | KMSClient");
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.NextMarker;
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
+ });
75
+ }
@@ -1,5 +1,8 @@
1
+ export * from "./DescribeCustomKeyStoresPaginator";
1
2
  export * from "./Interfaces";
2
3
  export * from "./ListAliasesPaginator";
3
4
  export * from "./ListGrantsPaginator";
4
5
  export * from "./ListKeyPoliciesPaginator";
5
6
  export * from "./ListKeysPaginator";
7
+ export * from "./ListResourceTagsPaginator";
8
+ export * from "./ListRetirableGrantsPaginator";