@aws-sdk/client-ebs 3.183.0 → 3.185.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 +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/EBS.js +33 -26
- package/dist-es/EBSClient.js +28 -22
- package/dist-es/commands/CompleteSnapshotCommand.js +28 -21
- package/dist-es/commands/GetSnapshotBlockCommand.js +28 -21
- package/dist-es/commands/ListChangedBlocksCommand.js +28 -21
- package/dist-es/commands/ListSnapshotBlocksCommand.js +28 -21
- package/dist-es/commands/PutSnapshotBlockCommand.js +28 -21
- package/dist-es/commands/StartSnapshotCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/EBSServiceException.js +10 -5
- package/dist-es/models/models_0.js +117 -152
- package/dist-es/pagination/ListChangedBlocksPaginator.js +68 -25
- package/dist-es/pagination/ListSnapshotBlocksPaginator.js +68 -25
- package/dist-es/protocols/Aws_restJson1.js +844 -639
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/package.json +5 -5
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
1
2
|
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var EBSServiceException = (function (_super) {
|
|
4
|
+
__extends(EBSServiceException, _super);
|
|
5
|
+
function EBSServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, EBSServiceException.prototype);
|
|
8
|
+
return _this;
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
return EBSServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { EBSServiceException };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
1
2
|
import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
|
|
2
3
|
import { EBSServiceException as __BaseException } from "./EBSServiceException";
|
|
3
4
|
export var AccessDeniedExceptionReason;
|
|
@@ -5,20 +6,20 @@ export var AccessDeniedExceptionReason;
|
|
|
5
6
|
AccessDeniedExceptionReason["DEPENDENCY_ACCESS_DENIED"] = "DEPENDENCY_ACCESS_DENIED";
|
|
6
7
|
AccessDeniedExceptionReason["UNAUTHORIZED_ACCOUNT"] = "UNAUTHORIZED_ACCOUNT";
|
|
7
8
|
})(AccessDeniedExceptionReason || (AccessDeniedExceptionReason = {}));
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.Message = opts.Message;
|
|
19
|
-
this.Reason = opts.Reason;
|
|
9
|
+
var AccessDeniedException = (function (_super) {
|
|
10
|
+
__extends(AccessDeniedException, _super);
|
|
11
|
+
function AccessDeniedException(opts) {
|
|
12
|
+
var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
|
|
13
|
+
_this.name = "AccessDeniedException";
|
|
14
|
+
_this.$fault = "client";
|
|
15
|
+
Object.setPrototypeOf(_this, AccessDeniedException.prototype);
|
|
16
|
+
_this.Message = opts.Message;
|
|
17
|
+
_this.Reason = opts.Reason;
|
|
18
|
+
return _this;
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
return AccessDeniedException;
|
|
21
|
+
}(__BaseException));
|
|
22
|
+
export { AccessDeniedException };
|
|
22
23
|
export var ChecksumAggregationMethod;
|
|
23
24
|
(function (ChecksumAggregationMethod) {
|
|
24
25
|
ChecksumAggregationMethod["CHECKSUM_AGGREGATION_LINEAR"] = "LINEAR";
|
|
@@ -33,76 +34,76 @@ export var Status;
|
|
|
33
34
|
Status["ERROR"] = "error";
|
|
34
35
|
Status["PENDING"] = "pending";
|
|
35
36
|
})(Status || (Status = {}));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
46
|
-
this.Message = opts.Message;
|
|
37
|
+
var InternalServerException = (function (_super) {
|
|
38
|
+
__extends(InternalServerException, _super);
|
|
39
|
+
function InternalServerException(opts) {
|
|
40
|
+
var _this = _super.call(this, __assign({ name: "InternalServerException", $fault: "server" }, opts)) || this;
|
|
41
|
+
_this.name = "InternalServerException";
|
|
42
|
+
_this.$fault = "server";
|
|
43
|
+
Object.setPrototypeOf(_this, InternalServerException.prototype);
|
|
44
|
+
_this.Message = opts.Message;
|
|
45
|
+
return _this;
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
return InternalServerException;
|
|
48
|
+
}(__BaseException));
|
|
49
|
+
export { InternalServerException };
|
|
49
50
|
export var RequestThrottledExceptionReason;
|
|
50
51
|
(function (RequestThrottledExceptionReason) {
|
|
51
52
|
RequestThrottledExceptionReason["ACCOUNT_THROTTLED"] = "ACCOUNT_THROTTLED";
|
|
52
53
|
RequestThrottledExceptionReason["DEPENDENCY_REQUEST_THROTTLED"] = "DEPENDENCY_REQUEST_THROTTLED";
|
|
53
54
|
RequestThrottledExceptionReason["RESOURCE_LEVEL_THROTTLE"] = "RESOURCE_LEVEL_THROTTLE";
|
|
54
55
|
})(RequestThrottledExceptionReason || (RequestThrottledExceptionReason = {}));
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
this.Message = opts.Message;
|
|
66
|
-
this.Reason = opts.Reason;
|
|
56
|
+
var RequestThrottledException = (function (_super) {
|
|
57
|
+
__extends(RequestThrottledException, _super);
|
|
58
|
+
function RequestThrottledException(opts) {
|
|
59
|
+
var _this = _super.call(this, __assign({ name: "RequestThrottledException", $fault: "client" }, opts)) || this;
|
|
60
|
+
_this.name = "RequestThrottledException";
|
|
61
|
+
_this.$fault = "client";
|
|
62
|
+
Object.setPrototypeOf(_this, RequestThrottledException.prototype);
|
|
63
|
+
_this.Message = opts.Message;
|
|
64
|
+
_this.Reason = opts.Reason;
|
|
65
|
+
return _this;
|
|
67
66
|
}
|
|
68
|
-
|
|
67
|
+
return RequestThrottledException;
|
|
68
|
+
}(__BaseException));
|
|
69
|
+
export { RequestThrottledException };
|
|
69
70
|
export var ResourceNotFoundExceptionReason;
|
|
70
71
|
(function (ResourceNotFoundExceptionReason) {
|
|
71
72
|
ResourceNotFoundExceptionReason["DEPENDENCY_RESOURCE_NOT_FOUND"] = "DEPENDENCY_RESOURCE_NOT_FOUND";
|
|
72
73
|
ResourceNotFoundExceptionReason["SNAPSHOT_NOT_FOUND"] = "SNAPSHOT_NOT_FOUND";
|
|
73
74
|
})(ResourceNotFoundExceptionReason || (ResourceNotFoundExceptionReason = {}));
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.Message = opts.Message;
|
|
85
|
-
this.Reason = opts.Reason;
|
|
75
|
+
var ResourceNotFoundException = (function (_super) {
|
|
76
|
+
__extends(ResourceNotFoundException, _super);
|
|
77
|
+
function ResourceNotFoundException(opts) {
|
|
78
|
+
var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
|
|
79
|
+
_this.name = "ResourceNotFoundException";
|
|
80
|
+
_this.$fault = "client";
|
|
81
|
+
Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
|
|
82
|
+
_this.Message = opts.Message;
|
|
83
|
+
_this.Reason = opts.Reason;
|
|
84
|
+
return _this;
|
|
86
85
|
}
|
|
87
|
-
|
|
86
|
+
return ResourceNotFoundException;
|
|
87
|
+
}(__BaseException));
|
|
88
|
+
export { ResourceNotFoundException };
|
|
88
89
|
export var ServiceQuotaExceededExceptionReason;
|
|
89
90
|
(function (ServiceQuotaExceededExceptionReason) {
|
|
90
91
|
ServiceQuotaExceededExceptionReason["DEPENDENCY_SERVICE_QUOTA_EXCEEDED"] = "DEPENDENCY_SERVICE_QUOTA_EXCEEDED";
|
|
91
92
|
})(ServiceQuotaExceededExceptionReason || (ServiceQuotaExceededExceptionReason = {}));
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this.Message = opts.Message;
|
|
103
|
-
this.Reason = opts.Reason;
|
|
93
|
+
var ServiceQuotaExceededException = (function (_super) {
|
|
94
|
+
__extends(ServiceQuotaExceededException, _super);
|
|
95
|
+
function ServiceQuotaExceededException(opts) {
|
|
96
|
+
var _this = _super.call(this, __assign({ name: "ServiceQuotaExceededException", $fault: "client" }, opts)) || this;
|
|
97
|
+
_this.name = "ServiceQuotaExceededException";
|
|
98
|
+
_this.$fault = "client";
|
|
99
|
+
Object.setPrototypeOf(_this, ServiceQuotaExceededException.prototype);
|
|
100
|
+
_this.Message = opts.Message;
|
|
101
|
+
_this.Reason = opts.Reason;
|
|
102
|
+
return _this;
|
|
104
103
|
}
|
|
105
|
-
|
|
104
|
+
return ServiceQuotaExceededException;
|
|
105
|
+
}(__BaseException));
|
|
106
|
+
export { ServiceQuotaExceededException };
|
|
106
107
|
export var ValidationExceptionReason;
|
|
107
108
|
(function (ValidationExceptionReason) {
|
|
108
109
|
ValidationExceptionReason["CONFLICTING_BLOCK_UPDATE"] = "CONFLICTING_BLOCK_UPDATE";
|
|
@@ -118,94 +119,58 @@ export var ValidationExceptionReason;
|
|
|
118
119
|
ValidationExceptionReason["INVALID_VOLUME_SIZE"] = "INVALID_VOLUME_SIZE";
|
|
119
120
|
ValidationExceptionReason["UNRELATED_SNAPSHOTS"] = "UNRELATED_SNAPSHOTS";
|
|
120
121
|
})(ValidationExceptionReason || (ValidationExceptionReason = {}));
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
this.Message = opts.Message;
|
|
132
|
-
this.Reason = opts.Reason;
|
|
122
|
+
var ValidationException = (function (_super) {
|
|
123
|
+
__extends(ValidationException, _super);
|
|
124
|
+
function ValidationException(opts) {
|
|
125
|
+
var _this = _super.call(this, __assign({ name: "ValidationException", $fault: "client" }, opts)) || this;
|
|
126
|
+
_this.name = "ValidationException";
|
|
127
|
+
_this.$fault = "client";
|
|
128
|
+
Object.setPrototypeOf(_this, ValidationException.prototype);
|
|
129
|
+
_this.Message = opts.Message;
|
|
130
|
+
_this.Reason = opts.Reason;
|
|
131
|
+
return _this;
|
|
133
132
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
return ValidationException;
|
|
134
|
+
}(__BaseException));
|
|
135
|
+
export { ValidationException };
|
|
136
|
+
var ConcurrentLimitExceededException = (function (_super) {
|
|
137
|
+
__extends(ConcurrentLimitExceededException, _super);
|
|
138
|
+
function ConcurrentLimitExceededException(opts) {
|
|
139
|
+
var _this = _super.call(this, __assign({ name: "ConcurrentLimitExceededException", $fault: "client" }, opts)) || this;
|
|
140
|
+
_this.name = "ConcurrentLimitExceededException";
|
|
141
|
+
_this.$fault = "client";
|
|
142
|
+
Object.setPrototypeOf(_this, ConcurrentLimitExceededException.prototype);
|
|
143
|
+
_this.Message = opts.Message;
|
|
144
|
+
return _this;
|
|
146
145
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
146
|
+
return ConcurrentLimitExceededException;
|
|
147
|
+
}(__BaseException));
|
|
148
|
+
export { ConcurrentLimitExceededException };
|
|
149
|
+
var ConflictException = (function (_super) {
|
|
150
|
+
__extends(ConflictException, _super);
|
|
151
|
+
function ConflictException(opts) {
|
|
152
|
+
var _this = _super.call(this, __assign({ name: "ConflictException", $fault: "client" }, opts)) || this;
|
|
153
|
+
_this.name = "ConflictException";
|
|
154
|
+
_this.$fault = "client";
|
|
155
|
+
Object.setPrototypeOf(_this, ConflictException.prototype);
|
|
156
|
+
_this.Message = opts.Message;
|
|
157
|
+
return _this;
|
|
159
158
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
});
|
|
164
|
-
export
|
|
165
|
-
|
|
166
|
-
});
|
|
167
|
-
export
|
|
168
|
-
|
|
169
|
-
});
|
|
170
|
-
export
|
|
171
|
-
|
|
172
|
-
});
|
|
173
|
-
export
|
|
174
|
-
|
|
175
|
-
});
|
|
176
|
-
export
|
|
177
|
-
|
|
178
|
-
...(obj.BlockData && { BlockData: SENSITIVE_STRING }),
|
|
179
|
-
});
|
|
180
|
-
export const ListChangedBlocksRequestFilterSensitiveLog = (obj) => ({
|
|
181
|
-
...obj,
|
|
182
|
-
});
|
|
183
|
-
export const ListChangedBlocksResponseFilterSensitiveLog = (obj) => ({
|
|
184
|
-
...obj,
|
|
185
|
-
...(obj.ChangedBlocks && { ChangedBlocks: SENSITIVE_STRING }),
|
|
186
|
-
});
|
|
187
|
-
export const ListSnapshotBlocksRequestFilterSensitiveLog = (obj) => ({
|
|
188
|
-
...obj,
|
|
189
|
-
});
|
|
190
|
-
export const ListSnapshotBlocksResponseFilterSensitiveLog = (obj) => ({
|
|
191
|
-
...obj,
|
|
192
|
-
...(obj.Blocks && { Blocks: SENSITIVE_STRING }),
|
|
193
|
-
});
|
|
194
|
-
export const PutSnapshotBlockRequestFilterSensitiveLog = (obj) => ({
|
|
195
|
-
...obj,
|
|
196
|
-
...(obj.BlockData && { BlockData: SENSITIVE_STRING }),
|
|
197
|
-
});
|
|
198
|
-
export const PutSnapshotBlockResponseFilterSensitiveLog = (obj) => ({
|
|
199
|
-
...obj,
|
|
200
|
-
});
|
|
201
|
-
export const TagFilterSensitiveLog = (obj) => ({
|
|
202
|
-
...obj,
|
|
203
|
-
});
|
|
204
|
-
export const StartSnapshotRequestFilterSensitiveLog = (obj) => ({
|
|
205
|
-
...obj,
|
|
206
|
-
...(obj.KmsKeyArn && { KmsKeyArn: SENSITIVE_STRING }),
|
|
207
|
-
});
|
|
208
|
-
export const StartSnapshotResponseFilterSensitiveLog = (obj) => ({
|
|
209
|
-
...obj,
|
|
210
|
-
...(obj.KmsKeyArn && { KmsKeyArn: SENSITIVE_STRING }),
|
|
211
|
-
});
|
|
159
|
+
return ConflictException;
|
|
160
|
+
}(__BaseException));
|
|
161
|
+
export { ConflictException };
|
|
162
|
+
export var BlockFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
163
|
+
export var ChangedBlockFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
164
|
+
export var CompleteSnapshotRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
165
|
+
export var CompleteSnapshotResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
166
|
+
export var GetSnapshotBlockRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
167
|
+
export var GetSnapshotBlockResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.BlockData && { BlockData: SENSITIVE_STRING }))); };
|
|
168
|
+
export var ListChangedBlocksRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
169
|
+
export var ListChangedBlocksResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ChangedBlocks && { ChangedBlocks: SENSITIVE_STRING }))); };
|
|
170
|
+
export var ListSnapshotBlocksRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
171
|
+
export var ListSnapshotBlocksResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Blocks && { Blocks: SENSITIVE_STRING }))); };
|
|
172
|
+
export var PutSnapshotBlockRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.BlockData && { BlockData: SENSITIVE_STRING }))); };
|
|
173
|
+
export var PutSnapshotBlockResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
174
|
+
export var TagFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
175
|
+
export var StartSnapshotRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.KmsKeyArn && { KmsKeyArn: SENSITIVE_STRING }))); };
|
|
176
|
+
export var StartSnapshotResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.KmsKeyArn && { KmsKeyArn: SENSITIVE_STRING }))); };
|
|
@@ -1,32 +1,75 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
1
2
|
import { ListChangedBlocksCommand, } from "../commands/ListChangedBlocksCommand";
|
|
2
3
|
import { EBS } from "../EBS";
|
|
3
4
|
import { EBSClient } from "../EBSClient";
|
|
4
|
-
|
|
5
|
-
|
|
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 ListChangedBlocksCommand(input)], __read(args), false))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
6
18
|
};
|
|
7
|
-
|
|
8
|
-
|
|
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.listChangedBlocks.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
9
32
|
};
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
while (hasNext) {
|
|
15
|
-
input.NextToken = token;
|
|
16
|
-
input["MaxResults"] = config.pageSize;
|
|
17
|
-
if (config.client instanceof EBS) {
|
|
18
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
-
}
|
|
20
|
-
else if (config.client instanceof EBSClient) {
|
|
21
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
throw new Error("Invalid client, expected EBS | EBSClient");
|
|
25
|
-
}
|
|
26
|
-
yield page;
|
|
27
|
-
const prevToken = token;
|
|
28
|
-
token = page.NextToken;
|
|
29
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
33
|
+
export function paginateListChangedBlocks(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
30
37
|
}
|
|
31
|
-
return
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListChangedBlocks_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 EBS)) 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 EBSClient)) 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 EBS | EBSClient");
|
|
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
|
+
});
|
|
32
75
|
}
|
|
@@ -1,32 +1,75 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
1
2
|
import { ListSnapshotBlocksCommand, } from "../commands/ListSnapshotBlocksCommand";
|
|
2
3
|
import { EBS } from "../EBS";
|
|
3
4
|
import { EBSClient } from "../EBSClient";
|
|
4
|
-
|
|
5
|
-
|
|
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 ListSnapshotBlocksCommand(input)], __read(args), false))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
6
18
|
};
|
|
7
|
-
|
|
8
|
-
|
|
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.listSnapshotBlocks.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
9
32
|
};
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
while (hasNext) {
|
|
15
|
-
input.NextToken = token;
|
|
16
|
-
input["MaxResults"] = config.pageSize;
|
|
17
|
-
if (config.client instanceof EBS) {
|
|
18
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
19
|
-
}
|
|
20
|
-
else if (config.client instanceof EBSClient) {
|
|
21
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
throw new Error("Invalid client, expected EBS | EBSClient");
|
|
25
|
-
}
|
|
26
|
-
yield page;
|
|
27
|
-
const prevToken = token;
|
|
28
|
-
token = page.NextToken;
|
|
29
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
33
|
+
export function paginateListSnapshotBlocks(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
30
37
|
}
|
|
31
|
-
return
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListSnapshotBlocks_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 EBS)) 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 EBSClient)) 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 EBS | EBSClient");
|
|
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
|
+
});
|
|
32
75
|
}
|