@aws-sdk/client-cloudhsm-v2 3.180.0 → 3.183.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 (31) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist-cjs/protocols/Aws_json1_1.js +21 -15
  3. package/dist-es/CloudHSMV2.js +62 -69
  4. package/dist-es/CloudHSMV2Client.js +22 -28
  5. package/dist-es/commands/CopyBackupToRegionCommand.js +21 -28
  6. package/dist-es/commands/CreateClusterCommand.js +21 -28
  7. package/dist-es/commands/CreateHsmCommand.js +21 -28
  8. package/dist-es/commands/DeleteBackupCommand.js +21 -28
  9. package/dist-es/commands/DeleteClusterCommand.js +21 -28
  10. package/dist-es/commands/DeleteHsmCommand.js +21 -28
  11. package/dist-es/commands/DescribeBackupsCommand.js +21 -28
  12. package/dist-es/commands/DescribeClustersCommand.js +21 -28
  13. package/dist-es/commands/InitializeClusterCommand.js +21 -28
  14. package/dist-es/commands/ListTagsCommand.js +21 -28
  15. package/dist-es/commands/ModifyBackupAttributesCommand.js +21 -28
  16. package/dist-es/commands/ModifyClusterCommand.js +21 -28
  17. package/dist-es/commands/RestoreBackupCommand.js +21 -28
  18. package/dist-es/commands/TagResourceCommand.js +21 -28
  19. package/dist-es/commands/UntagResourceCommand.js +21 -28
  20. package/dist-es/endpoints.js +8 -8
  21. package/dist-es/models/CloudHSMV2ServiceException.js +5 -10
  22. package/dist-es/models/models_0.js +183 -110
  23. package/dist-es/pagination/DescribeBackupsPaginator.js +25 -68
  24. package/dist-es/pagination/DescribeClustersPaginator.js +25 -68
  25. package/dist-es/pagination/ListTagsPaginator.js +25 -68
  26. package/dist-es/protocols/Aws_json1_1.js +1086 -1402
  27. package/dist-es/runtimeConfig.browser.js +26 -12
  28. package/dist-es/runtimeConfig.js +30 -12
  29. package/dist-es/runtimeConfig.native.js +8 -5
  30. package/dist-es/runtimeConfig.shared.js +8 -11
  31. package/package.json +33 -33
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { RestoreBackupRequestFilterSensitiveLog, RestoreBackupResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1RestoreBackupCommand, serializeAws_json1_1RestoreBackupCommand, } from "../protocols/Aws_json1_1";
6
- var RestoreBackupCommand = (function (_super) {
7
- __extends(RestoreBackupCommand, _super);
8
- function RestoreBackupCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class RestoreBackupCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- RestoreBackupCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "CloudHSMV2Client";
18
- var commandName = "RestoreBackupCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "CloudHSMV2Client";
15
+ const commandName = "RestoreBackupCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: RestoreBackupRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: RestoreBackupResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- RestoreBackupCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_json1_1RestoreBackupCommand(input, context);
33
- };
34
- RestoreBackupCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1RestoreBackupCommand(output, context);
36
- };
37
- return RestoreBackupCommand;
38
- }($Command));
39
- export { RestoreBackupCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { TagResourceRequestFilterSensitiveLog, TagResourceResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1TagResourceCommand, serializeAws_json1_1TagResourceCommand, } from "../protocols/Aws_json1_1";
6
- var TagResourceCommand = (function (_super) {
7
- __extends(TagResourceCommand, _super);
8
- function TagResourceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class TagResourceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- TagResourceCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "CloudHSMV2Client";
18
- var commandName = "TagResourceCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "CloudHSMV2Client";
15
+ const commandName = "TagResourceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: TagResourceRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: TagResourceResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- TagResourceCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_json1_1TagResourceCommand(input, context);
33
- };
34
- TagResourceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1TagResourceCommand(output, context);
36
- };
37
- return TagResourceCommand;
38
- }($Command));
39
- export { TagResourceCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { UntagResourceRequestFilterSensitiveLog, UntagResourceResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1UntagResourceCommand, serializeAws_json1_1UntagResourceCommand, } from "../protocols/Aws_json1_1";
6
- var UntagResourceCommand = (function (_super) {
7
- __extends(UntagResourceCommand, _super);
8
- function UntagResourceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class UntagResourceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- UntagResourceCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "CloudHSMV2Client";
18
- var commandName = "UntagResourceCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "CloudHSMV2Client";
15
+ const commandName = "UntagResourceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: UntagResourceRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: UntagResourceResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- UntagResourceCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_json1_1UntagResourceCommand(input, context);
33
- };
34
- UntagResourceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1UntagResourceCommand(output, context);
36
- };
37
- return UntagResourceCommand;
38
- }($Command));
39
- export { UntagResourceCommand };
31
+ }
32
+ }
@@ -1,7 +1,6 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {};
4
- var partitionHash = {
2
+ const regionHash = {};
3
+ const partitionHash = {
5
4
  aws: {
6
5
  regions: [
7
6
  "af-south-1",
@@ -121,8 +120,9 @@ var partitionHash = {
121
120
  ],
122
121
  },
123
122
  };
124
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
125
- return __generator(this, function (_a) {
126
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "cloudhsm", regionHash: regionHash, partitionHash: partitionHash }))];
127
- });
128
- }); };
123
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
124
+ ...options,
125
+ signingService: "cloudhsm",
126
+ regionHash,
127
+ partitionHash,
128
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var CloudHSMV2ServiceException = (function (_super) {
4
- __extends(CloudHSMV2ServiceException, _super);
5
- function CloudHSMV2ServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, CloudHSMV2ServiceException.prototype);
8
- return _this;
2
+ export class CloudHSMV2ServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, CloudHSMV2ServiceException.prototype);
9
6
  }
10
- return CloudHSMV2ServiceException;
11
- }(__ServiceException));
12
- export { CloudHSMV2ServiceException };
7
+ }
@@ -1,4 +1,3 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { CloudHSMV2ServiceException as __BaseException } from "./CloudHSMV2ServiceException";
3
2
  export var BackupState;
4
3
  (function (BackupState) {
@@ -15,84 +14,84 @@ export var BackupRetentionType;
15
14
  (function (BackupRetentionType) {
16
15
  BackupRetentionType["DAYS"] = "DAYS";
17
16
  })(BackupRetentionType || (BackupRetentionType = {}));
18
- var CloudHsmAccessDeniedException = (function (_super) {
19
- __extends(CloudHsmAccessDeniedException, _super);
20
- function CloudHsmAccessDeniedException(opts) {
21
- var _this = _super.call(this, __assign({ name: "CloudHsmAccessDeniedException", $fault: "client" }, opts)) || this;
22
- _this.name = "CloudHsmAccessDeniedException";
23
- _this.$fault = "client";
24
- Object.setPrototypeOf(_this, CloudHsmAccessDeniedException.prototype);
25
- _this.Message = opts.Message;
26
- return _this;
17
+ export class CloudHsmAccessDeniedException extends __BaseException {
18
+ constructor(opts) {
19
+ super({
20
+ name: "CloudHsmAccessDeniedException",
21
+ $fault: "client",
22
+ ...opts,
23
+ });
24
+ this.name = "CloudHsmAccessDeniedException";
25
+ this.$fault = "client";
26
+ Object.setPrototypeOf(this, CloudHsmAccessDeniedException.prototype);
27
+ this.Message = opts.Message;
27
28
  }
28
- return CloudHsmAccessDeniedException;
29
- }(__BaseException));
30
- export { CloudHsmAccessDeniedException };
31
- var CloudHsmInternalFailureException = (function (_super) {
32
- __extends(CloudHsmInternalFailureException, _super);
33
- function CloudHsmInternalFailureException(opts) {
34
- var _this = _super.call(this, __assign({ name: "CloudHsmInternalFailureException", $fault: "server" }, opts)) || this;
35
- _this.name = "CloudHsmInternalFailureException";
36
- _this.$fault = "server";
37
- Object.setPrototypeOf(_this, CloudHsmInternalFailureException.prototype);
38
- _this.Message = opts.Message;
39
- return _this;
29
+ }
30
+ export class CloudHsmInternalFailureException extends __BaseException {
31
+ constructor(opts) {
32
+ super({
33
+ name: "CloudHsmInternalFailureException",
34
+ $fault: "server",
35
+ ...opts,
36
+ });
37
+ this.name = "CloudHsmInternalFailureException";
38
+ this.$fault = "server";
39
+ Object.setPrototypeOf(this, CloudHsmInternalFailureException.prototype);
40
+ this.Message = opts.Message;
40
41
  }
41
- return CloudHsmInternalFailureException;
42
- }(__BaseException));
43
- export { CloudHsmInternalFailureException };
44
- var CloudHsmInvalidRequestException = (function (_super) {
45
- __extends(CloudHsmInvalidRequestException, _super);
46
- function CloudHsmInvalidRequestException(opts) {
47
- var _this = _super.call(this, __assign({ name: "CloudHsmInvalidRequestException", $fault: "client" }, opts)) || this;
48
- _this.name = "CloudHsmInvalidRequestException";
49
- _this.$fault = "client";
50
- Object.setPrototypeOf(_this, CloudHsmInvalidRequestException.prototype);
51
- _this.Message = opts.Message;
52
- return _this;
42
+ }
43
+ export class CloudHsmInvalidRequestException extends __BaseException {
44
+ constructor(opts) {
45
+ super({
46
+ name: "CloudHsmInvalidRequestException",
47
+ $fault: "client",
48
+ ...opts,
49
+ });
50
+ this.name = "CloudHsmInvalidRequestException";
51
+ this.$fault = "client";
52
+ Object.setPrototypeOf(this, CloudHsmInvalidRequestException.prototype);
53
+ this.Message = opts.Message;
53
54
  }
54
- return CloudHsmInvalidRequestException;
55
- }(__BaseException));
56
- export { CloudHsmInvalidRequestException };
57
- var CloudHsmResourceNotFoundException = (function (_super) {
58
- __extends(CloudHsmResourceNotFoundException, _super);
59
- function CloudHsmResourceNotFoundException(opts) {
60
- var _this = _super.call(this, __assign({ name: "CloudHsmResourceNotFoundException", $fault: "client" }, opts)) || this;
61
- _this.name = "CloudHsmResourceNotFoundException";
62
- _this.$fault = "client";
63
- Object.setPrototypeOf(_this, CloudHsmResourceNotFoundException.prototype);
64
- _this.Message = opts.Message;
65
- return _this;
55
+ }
56
+ export class CloudHsmResourceNotFoundException extends __BaseException {
57
+ constructor(opts) {
58
+ super({
59
+ name: "CloudHsmResourceNotFoundException",
60
+ $fault: "client",
61
+ ...opts,
62
+ });
63
+ this.name = "CloudHsmResourceNotFoundException";
64
+ this.$fault = "client";
65
+ Object.setPrototypeOf(this, CloudHsmResourceNotFoundException.prototype);
66
+ this.Message = opts.Message;
66
67
  }
67
- return CloudHsmResourceNotFoundException;
68
- }(__BaseException));
69
- export { CloudHsmResourceNotFoundException };
70
- var CloudHsmServiceException = (function (_super) {
71
- __extends(CloudHsmServiceException, _super);
72
- function CloudHsmServiceException(opts) {
73
- var _this = _super.call(this, __assign({ name: "CloudHsmServiceException", $fault: "client" }, opts)) || this;
74
- _this.name = "CloudHsmServiceException";
75
- _this.$fault = "client";
76
- Object.setPrototypeOf(_this, CloudHsmServiceException.prototype);
77
- _this.Message = opts.Message;
78
- return _this;
68
+ }
69
+ export class CloudHsmServiceException extends __BaseException {
70
+ constructor(opts) {
71
+ super({
72
+ name: "CloudHsmServiceException",
73
+ $fault: "client",
74
+ ...opts,
75
+ });
76
+ this.name = "CloudHsmServiceException";
77
+ this.$fault = "client";
78
+ Object.setPrototypeOf(this, CloudHsmServiceException.prototype);
79
+ this.Message = opts.Message;
79
80
  }
80
- return CloudHsmServiceException;
81
- }(__BaseException));
82
- export { CloudHsmServiceException };
83
- var CloudHsmTagException = (function (_super) {
84
- __extends(CloudHsmTagException, _super);
85
- function CloudHsmTagException(opts) {
86
- var _this = _super.call(this, __assign({ name: "CloudHsmTagException", $fault: "client" }, opts)) || this;
87
- _this.name = "CloudHsmTagException";
88
- _this.$fault = "client";
89
- Object.setPrototypeOf(_this, CloudHsmTagException.prototype);
90
- _this.Message = opts.Message;
91
- return _this;
81
+ }
82
+ export class CloudHsmTagException extends __BaseException {
83
+ constructor(opts) {
84
+ super({
85
+ name: "CloudHsmTagException",
86
+ $fault: "client",
87
+ ...opts,
88
+ });
89
+ this.name = "CloudHsmTagException";
90
+ this.$fault = "client";
91
+ Object.setPrototypeOf(this, CloudHsmTagException.prototype);
92
+ this.Message = opts.Message;
92
93
  }
93
- return CloudHsmTagException;
94
- }(__BaseException));
95
- export { CloudHsmTagException };
94
+ }
96
95
  export var HsmState;
97
96
  (function (HsmState) {
98
97
  HsmState["ACTIVE"] = "ACTIVE";
@@ -113,40 +112,114 @@ export var ClusterState;
113
112
  ClusterState["UNINITIALIZED"] = "UNINITIALIZED";
114
113
  ClusterState["UPDATE_IN_PROGRESS"] = "UPDATE_IN_PROGRESS";
115
114
  })(ClusterState || (ClusterState = {}));
116
- export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
117
- export var BackupFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
118
- export var BackupRetentionPolicyFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
119
- export var CopyBackupToRegionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
120
- export var DestinationBackupFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
121
- export var CopyBackupToRegionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
- export var CreateClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
123
- export var CertificatesFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
124
- export var HsmFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
125
- export var ClusterFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
- export var CreateClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
- export var CreateHsmRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
128
- export var CreateHsmResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
129
- export var DeleteBackupRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
130
- export var DeleteBackupResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
- export var DeleteClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
132
- export var DeleteClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
133
- export var DeleteHsmRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
134
- export var DeleteHsmResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
135
- export var DescribeBackupsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
136
- export var DescribeBackupsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
137
- export var DescribeClustersRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
138
- export var DescribeClustersResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
139
- export var InitializeClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
140
- export var InitializeClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
141
- export var ListTagsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
142
- export var ListTagsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
143
- export var ModifyBackupAttributesRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
144
- export var ModifyBackupAttributesResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
145
- export var ModifyClusterRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
146
- export var ModifyClusterResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
147
- export var RestoreBackupRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
148
- export var RestoreBackupResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
149
- export var TagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
150
- export var TagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
151
- export var UntagResourceRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
152
- export var UntagResourceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
115
+ export const TagFilterSensitiveLog = (obj) => ({
116
+ ...obj,
117
+ });
118
+ export const BackupFilterSensitiveLog = (obj) => ({
119
+ ...obj,
120
+ });
121
+ export const BackupRetentionPolicyFilterSensitiveLog = (obj) => ({
122
+ ...obj,
123
+ });
124
+ export const CopyBackupToRegionRequestFilterSensitiveLog = (obj) => ({
125
+ ...obj,
126
+ });
127
+ export const DestinationBackupFilterSensitiveLog = (obj) => ({
128
+ ...obj,
129
+ });
130
+ export const CopyBackupToRegionResponseFilterSensitiveLog = (obj) => ({
131
+ ...obj,
132
+ });
133
+ export const CreateClusterRequestFilterSensitiveLog = (obj) => ({
134
+ ...obj,
135
+ });
136
+ export const CertificatesFilterSensitiveLog = (obj) => ({
137
+ ...obj,
138
+ });
139
+ export const HsmFilterSensitiveLog = (obj) => ({
140
+ ...obj,
141
+ });
142
+ export const ClusterFilterSensitiveLog = (obj) => ({
143
+ ...obj,
144
+ });
145
+ export const CreateClusterResponseFilterSensitiveLog = (obj) => ({
146
+ ...obj,
147
+ });
148
+ export const CreateHsmRequestFilterSensitiveLog = (obj) => ({
149
+ ...obj,
150
+ });
151
+ export const CreateHsmResponseFilterSensitiveLog = (obj) => ({
152
+ ...obj,
153
+ });
154
+ export const DeleteBackupRequestFilterSensitiveLog = (obj) => ({
155
+ ...obj,
156
+ });
157
+ export const DeleteBackupResponseFilterSensitiveLog = (obj) => ({
158
+ ...obj,
159
+ });
160
+ export const DeleteClusterRequestFilterSensitiveLog = (obj) => ({
161
+ ...obj,
162
+ });
163
+ export const DeleteClusterResponseFilterSensitiveLog = (obj) => ({
164
+ ...obj,
165
+ });
166
+ export const DeleteHsmRequestFilterSensitiveLog = (obj) => ({
167
+ ...obj,
168
+ });
169
+ export const DeleteHsmResponseFilterSensitiveLog = (obj) => ({
170
+ ...obj,
171
+ });
172
+ export const DescribeBackupsRequestFilterSensitiveLog = (obj) => ({
173
+ ...obj,
174
+ });
175
+ export const DescribeBackupsResponseFilterSensitiveLog = (obj) => ({
176
+ ...obj,
177
+ });
178
+ export const DescribeClustersRequestFilterSensitiveLog = (obj) => ({
179
+ ...obj,
180
+ });
181
+ export const DescribeClustersResponseFilterSensitiveLog = (obj) => ({
182
+ ...obj,
183
+ });
184
+ export const InitializeClusterRequestFilterSensitiveLog = (obj) => ({
185
+ ...obj,
186
+ });
187
+ export const InitializeClusterResponseFilterSensitiveLog = (obj) => ({
188
+ ...obj,
189
+ });
190
+ export const ListTagsRequestFilterSensitiveLog = (obj) => ({
191
+ ...obj,
192
+ });
193
+ export const ListTagsResponseFilterSensitiveLog = (obj) => ({
194
+ ...obj,
195
+ });
196
+ export const ModifyBackupAttributesRequestFilterSensitiveLog = (obj) => ({
197
+ ...obj,
198
+ });
199
+ export const ModifyBackupAttributesResponseFilterSensitiveLog = (obj) => ({
200
+ ...obj,
201
+ });
202
+ export const ModifyClusterRequestFilterSensitiveLog = (obj) => ({
203
+ ...obj,
204
+ });
205
+ export const ModifyClusterResponseFilterSensitiveLog = (obj) => ({
206
+ ...obj,
207
+ });
208
+ export const RestoreBackupRequestFilterSensitiveLog = (obj) => ({
209
+ ...obj,
210
+ });
211
+ export const RestoreBackupResponseFilterSensitiveLog = (obj) => ({
212
+ ...obj,
213
+ });
214
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
215
+ ...obj,
216
+ });
217
+ export const TagResourceResponseFilterSensitiveLog = (obj) => ({
218
+ ...obj,
219
+ });
220
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
221
+ ...obj,
222
+ });
223
+ export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
224
+ ...obj,
225
+ });
@@ -1,75 +1,32 @@
1
- import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
1
  import { CloudHSMV2 } from "../CloudHSMV2";
3
2
  import { CloudHSMV2Client } from "../CloudHSMV2Client";
4
3
  import { DescribeBackupsCommand, } from "../commands/DescribeBackupsCommand";
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 DescribeBackupsCommand(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 DescribeBackupsCommand(input), ...args);
18
6
  };
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.describeBackups.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.describeBackups(input, ...args);
32
9
  };
33
- export function paginateDescribeBackups(config, input) {
34
- var additionalArguments = [];
35
- for (var _i = 2; _i < arguments.length; _i++) {
36
- additionalArguments[_i - 2] = arguments[_i];
10
+ export async function* paginateDescribeBackups(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 CloudHSMV2) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof CloudHSMV2Client) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected CloudHSMV2 | CloudHSMV2Client");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
37
30
  }
38
- return __asyncGenerator(this, arguments, function paginateDescribeBackups_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.NextToken = token;
49
- input["MaxResults"] = config.pageSize;
50
- if (!(config.client instanceof CloudHSMV2)) 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 CloudHSMV2Client)) 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 CloudHSMV2 | CloudHSMV2Client");
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
  }