@aws-sdk/client-backup-gateway 3.170.0 → 3.177.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 +19 -0
- package/dist-cjs/BackupGateway.js +15 -0
- package/dist-cjs/commands/GetVirtualMachineCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +45 -13
- package/dist-cjs/protocols/Aws_json1_0.js +159 -1
- package/dist-es/BackupGateway.js +15 -0
- package/dist-es/commands/GetVirtualMachineCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +21 -3
- package/dist-es/protocols/Aws_json1_0.js +323 -129
- package/dist-types/BackupGateway.d.ts +7 -0
- package/dist-types/BackupGatewayClient.d.ts +3 -2
- package/dist-types/commands/GetVirtualMachineCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +152 -39
- package/dist-types/protocols/Aws_json1_0.d.ts +3 -0
- package/dist-types/ts3.4/BackupGateway.d.ts +17 -18
- package/dist-types/ts3.4/BackupGatewayClient.d.ts +6 -25
- package/dist-types/ts3.4/commands/AssociateGatewayToServerCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/CreateGatewayCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/DeleteGatewayCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/DeleteHypervisorCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/DisassociateGatewayFromServerCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/GetGatewayCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/GetVirtualMachineCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/ImportHypervisorConfigurationCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/ListGatewaysCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/ListHypervisorsCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/ListVirtualMachinesCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/PutMaintenanceStartTimeCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/TestHypervisorConfigurationCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/UpdateGatewayInformationCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/UpdateGatewaySoftwareNowCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/UpdateHypervisorCommand.d.ts +0 -2
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/BackupGatewayServiceException.d.ts +0 -1
- package/dist-types/ts3.4/models/models_0.d.ts +66 -134
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +12 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +0 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +0 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +0 -1
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +0 -1
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.177.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.176.0...v3.177.0) (2022-09-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **client-backup-gateway:** Changes include: new GetVirtualMachineApi to fetch a single user's VM, improving ListVirtualMachines to fetch filtered VMs as well as all VMs, and improving GetGatewayApi to now also return the gateway's MaintenanceStartTime. ([45d84e0](https://github.com/aws/aws-sdk-js-v3/commit/45d84e06bac5fd5d39506c607095772b1dd2135e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.171.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.170.0...v3.171.0) (2022-09-14)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @aws-sdk/client-backup-gateway
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [3.170.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.169.0...v3.170.0) (2022-09-13)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @aws-sdk/client-backup-gateway
|
|
@@ -8,6 +8,7 @@ const DeleteGatewayCommand_1 = require("./commands/DeleteGatewayCommand");
|
|
|
8
8
|
const DeleteHypervisorCommand_1 = require("./commands/DeleteHypervisorCommand");
|
|
9
9
|
const DisassociateGatewayFromServerCommand_1 = require("./commands/DisassociateGatewayFromServerCommand");
|
|
10
10
|
const GetGatewayCommand_1 = require("./commands/GetGatewayCommand");
|
|
11
|
+
const GetVirtualMachineCommand_1 = require("./commands/GetVirtualMachineCommand");
|
|
11
12
|
const ImportHypervisorConfigurationCommand_1 = require("./commands/ImportHypervisorConfigurationCommand");
|
|
12
13
|
const ListGatewaysCommand_1 = require("./commands/ListGatewaysCommand");
|
|
13
14
|
const ListHypervisorsCommand_1 = require("./commands/ListHypervisorsCommand");
|
|
@@ -105,6 +106,20 @@ class BackupGateway extends BackupGatewayClient_1.BackupGatewayClient {
|
|
|
105
106
|
return this.send(command, optionsOrCb);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
109
|
+
getVirtualMachine(args, optionsOrCb, cb) {
|
|
110
|
+
const command = new GetVirtualMachineCommand_1.GetVirtualMachineCommand(args);
|
|
111
|
+
if (typeof optionsOrCb === "function") {
|
|
112
|
+
this.send(command, optionsOrCb);
|
|
113
|
+
}
|
|
114
|
+
else if (typeof cb === "function") {
|
|
115
|
+
if (typeof optionsOrCb !== "object")
|
|
116
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
117
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return this.send(command, optionsOrCb);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
108
123
|
importHypervisorConfiguration(args, optionsOrCb, cb) {
|
|
109
124
|
const command = new ImportHypervisorConfigurationCommand_1.ImportHypervisorConfigurationCommand(args);
|
|
110
125
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetVirtualMachineCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_json1_0_1 = require("../protocols/Aws_json1_0");
|
|
8
|
+
class GetVirtualMachineCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "BackupGatewayClient";
|
|
18
|
+
const commandName = "GetVirtualMachineCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetVirtualMachineInputFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetVirtualMachineOutputFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_json1_0_1.serializeAws_json1_0GetVirtualMachineCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_json1_0_1.deserializeAws_json1_0GetVirtualMachineCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GetVirtualMachineCommand = GetVirtualMachineCommand;
|
|
@@ -7,6 +7,7 @@ tslib_1.__exportStar(require("./DeleteGatewayCommand"), exports);
|
|
|
7
7
|
tslib_1.__exportStar(require("./DeleteHypervisorCommand"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./DisassociateGatewayFromServerCommand"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./GetGatewayCommand"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./GetVirtualMachineCommand"), exports);
|
|
10
11
|
tslib_1.__exportStar(require("./ImportHypervisorConfigurationCommand"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./ListGatewaysCommand"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./ListHypervisorsCommand"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.GetVirtualMachineOutputFilterSensitiveLog = exports.VirtualMachineDetailsFilterSensitiveLog = exports.GetVirtualMachineInputFilterSensitiveLog = exports.UntagResourceOutputFilterSensitiveLog = exports.UntagResourceInputFilterSensitiveLog = exports.TagResourceOutputFilterSensitiveLog = exports.TagResourceInputFilterSensitiveLog = exports.ListTagsForResourceOutputFilterSensitiveLog = exports.ListTagsForResourceInputFilterSensitiveLog = exports.UpdateHypervisorOutputFilterSensitiveLog = exports.UpdateHypervisorInputFilterSensitiveLog = exports.ListHypervisorsOutputFilterSensitiveLog = exports.HypervisorFilterSensitiveLog = exports.ListHypervisorsInputFilterSensitiveLog = exports.ImportHypervisorConfigurationOutputFilterSensitiveLog = exports.ImportHypervisorConfigurationInputFilterSensitiveLog = exports.DeleteHypervisorOutputFilterSensitiveLog = exports.DeleteHypervisorInputFilterSensitiveLog = exports.UpdateGatewaySoftwareNowOutputFilterSensitiveLog = exports.UpdateGatewaySoftwareNowInputFilterSensitiveLog = exports.UpdateGatewayInformationOutputFilterSensitiveLog = exports.UpdateGatewayInformationInputFilterSensitiveLog = exports.TestHypervisorConfigurationOutputFilterSensitiveLog = exports.TestHypervisorConfigurationInputFilterSensitiveLog = exports.PutMaintenanceStartTimeOutputFilterSensitiveLog = exports.PutMaintenanceStartTimeInputFilterSensitiveLog = exports.ListGatewaysOutputFilterSensitiveLog = exports.GatewayFilterSensitiveLog = exports.ListGatewaysInputFilterSensitiveLog = exports.GetGatewayOutputFilterSensitiveLog = exports.GatewayDetailsFilterSensitiveLog = exports.MaintenanceStartTimeFilterSensitiveLog = exports.GetGatewayInputFilterSensitiveLog = exports.DisassociateGatewayFromServerOutputFilterSensitiveLog = exports.DisassociateGatewayFromServerInputFilterSensitiveLog = exports.DeleteGatewayOutputFilterSensitiveLog = exports.DeleteGatewayInputFilterSensitiveLog = exports.CreateGatewayOutputFilterSensitiveLog = exports.CreateGatewayInputFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.AssociateGatewayToServerOutputFilterSensitiveLog = exports.AssociateGatewayToServerInputFilterSensitiveLog = exports.HypervisorState = exports.ResourceNotFoundException = exports.GatewayType = exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.ConflictException = exports.AccessDeniedException = void 0;
|
|
4
|
+
exports.ListVirtualMachinesOutputFilterSensitiveLog = exports.VirtualMachineFilterSensitiveLog = exports.ListVirtualMachinesInputFilterSensitiveLog = void 0;
|
|
4
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
6
|
const BackupGatewayServiceException_1 = require("./BackupGatewayServiceException");
|
|
6
7
|
class AccessDeniedException extends BackupGatewayServiceException_1.BackupGatewayServiceException {
|
|
@@ -48,6 +49,21 @@ class InternalServerException extends BackupGatewayServiceException_1.BackupGate
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
exports.InternalServerException = InternalServerException;
|
|
52
|
+
class ThrottlingException extends BackupGatewayServiceException_1.BackupGatewayServiceException {
|
|
53
|
+
constructor(opts) {
|
|
54
|
+
super({
|
|
55
|
+
name: "ThrottlingException",
|
|
56
|
+
$fault: "client",
|
|
57
|
+
...opts,
|
|
58
|
+
});
|
|
59
|
+
this.name = "ThrottlingException";
|
|
60
|
+
this.$fault = "client";
|
|
61
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
62
|
+
this.ErrorCode = opts.ErrorCode;
|
|
63
|
+
this.Message = opts.Message;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.ThrottlingException = ThrottlingException;
|
|
51
67
|
class ValidationException extends BackupGatewayServiceException_1.BackupGatewayServiceException {
|
|
52
68
|
constructor(opts) {
|
|
53
69
|
super({
|
|
@@ -129,6 +145,10 @@ const GetGatewayInputFilterSensitiveLog = (obj) => ({
|
|
|
129
145
|
...obj,
|
|
130
146
|
});
|
|
131
147
|
exports.GetGatewayInputFilterSensitiveLog = GetGatewayInputFilterSensitiveLog;
|
|
148
|
+
const MaintenanceStartTimeFilterSensitiveLog = (obj) => ({
|
|
149
|
+
...obj,
|
|
150
|
+
});
|
|
151
|
+
exports.MaintenanceStartTimeFilterSensitiveLog = MaintenanceStartTimeFilterSensitiveLog;
|
|
132
152
|
const GatewayDetailsFilterSensitiveLog = (obj) => ({
|
|
133
153
|
...obj,
|
|
134
154
|
});
|
|
@@ -231,18 +251,6 @@ const ListTagsForResourceOutputFilterSensitiveLog = (obj) => ({
|
|
|
231
251
|
...obj,
|
|
232
252
|
});
|
|
233
253
|
exports.ListTagsForResourceOutputFilterSensitiveLog = ListTagsForResourceOutputFilterSensitiveLog;
|
|
234
|
-
const ListVirtualMachinesInputFilterSensitiveLog = (obj) => ({
|
|
235
|
-
...obj,
|
|
236
|
-
});
|
|
237
|
-
exports.ListVirtualMachinesInputFilterSensitiveLog = ListVirtualMachinesInputFilterSensitiveLog;
|
|
238
|
-
const VirtualMachineFilterSensitiveLog = (obj) => ({
|
|
239
|
-
...obj,
|
|
240
|
-
});
|
|
241
|
-
exports.VirtualMachineFilterSensitiveLog = VirtualMachineFilterSensitiveLog;
|
|
242
|
-
const ListVirtualMachinesOutputFilterSensitiveLog = (obj) => ({
|
|
243
|
-
...obj,
|
|
244
|
-
});
|
|
245
|
-
exports.ListVirtualMachinesOutputFilterSensitiveLog = ListVirtualMachinesOutputFilterSensitiveLog;
|
|
246
254
|
const TagResourceInputFilterSensitiveLog = (obj) => ({
|
|
247
255
|
...obj,
|
|
248
256
|
});
|
|
@@ -259,3 +267,27 @@ const UntagResourceOutputFilterSensitiveLog = (obj) => ({
|
|
|
259
267
|
...obj,
|
|
260
268
|
});
|
|
261
269
|
exports.UntagResourceOutputFilterSensitiveLog = UntagResourceOutputFilterSensitiveLog;
|
|
270
|
+
const GetVirtualMachineInputFilterSensitiveLog = (obj) => ({
|
|
271
|
+
...obj,
|
|
272
|
+
});
|
|
273
|
+
exports.GetVirtualMachineInputFilterSensitiveLog = GetVirtualMachineInputFilterSensitiveLog;
|
|
274
|
+
const VirtualMachineDetailsFilterSensitiveLog = (obj) => ({
|
|
275
|
+
...obj,
|
|
276
|
+
});
|
|
277
|
+
exports.VirtualMachineDetailsFilterSensitiveLog = VirtualMachineDetailsFilterSensitiveLog;
|
|
278
|
+
const GetVirtualMachineOutputFilterSensitiveLog = (obj) => ({
|
|
279
|
+
...obj,
|
|
280
|
+
});
|
|
281
|
+
exports.GetVirtualMachineOutputFilterSensitiveLog = GetVirtualMachineOutputFilterSensitiveLog;
|
|
282
|
+
const ListVirtualMachinesInputFilterSensitiveLog = (obj) => ({
|
|
283
|
+
...obj,
|
|
284
|
+
});
|
|
285
|
+
exports.ListVirtualMachinesInputFilterSensitiveLog = ListVirtualMachinesInputFilterSensitiveLog;
|
|
286
|
+
const VirtualMachineFilterSensitiveLog = (obj) => ({
|
|
287
|
+
...obj,
|
|
288
|
+
});
|
|
289
|
+
exports.VirtualMachineFilterSensitiveLog = VirtualMachineFilterSensitiveLog;
|
|
290
|
+
const ListVirtualMachinesOutputFilterSensitiveLog = (obj) => ({
|
|
291
|
+
...obj,
|
|
292
|
+
});
|
|
293
|
+
exports.ListVirtualMachinesOutputFilterSensitiveLog = ListVirtualMachinesOutputFilterSensitiveLog;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_0UpdateHypervisorCommand = exports.deserializeAws_json1_0UpdateGatewaySoftwareNowCommand = exports.deserializeAws_json1_0UpdateGatewayInformationCommand = exports.deserializeAws_json1_0UntagResourceCommand = exports.deserializeAws_json1_0TestHypervisorConfigurationCommand = exports.deserializeAws_json1_0TagResourceCommand = exports.deserializeAws_json1_0PutMaintenanceStartTimeCommand = exports.deserializeAws_json1_0ListVirtualMachinesCommand = exports.deserializeAws_json1_0ListTagsForResourceCommand = exports.deserializeAws_json1_0ListHypervisorsCommand = exports.deserializeAws_json1_0ListGatewaysCommand = exports.deserializeAws_json1_0ImportHypervisorConfigurationCommand = exports.deserializeAws_json1_0GetGatewayCommand = exports.deserializeAws_json1_0DisassociateGatewayFromServerCommand = exports.deserializeAws_json1_0DeleteHypervisorCommand = exports.deserializeAws_json1_0DeleteGatewayCommand = exports.deserializeAws_json1_0CreateGatewayCommand = exports.deserializeAws_json1_0AssociateGatewayToServerCommand = exports.serializeAws_json1_0UpdateHypervisorCommand = exports.serializeAws_json1_0UpdateGatewaySoftwareNowCommand = exports.serializeAws_json1_0UpdateGatewayInformationCommand = exports.serializeAws_json1_0UntagResourceCommand = exports.serializeAws_json1_0TestHypervisorConfigurationCommand = exports.serializeAws_json1_0TagResourceCommand = exports.serializeAws_json1_0PutMaintenanceStartTimeCommand = exports.serializeAws_json1_0ListVirtualMachinesCommand = exports.serializeAws_json1_0ListTagsForResourceCommand = exports.serializeAws_json1_0ListHypervisorsCommand = exports.serializeAws_json1_0ListGatewaysCommand = exports.serializeAws_json1_0ImportHypervisorConfigurationCommand = exports.serializeAws_json1_0GetGatewayCommand = exports.serializeAws_json1_0DisassociateGatewayFromServerCommand = exports.serializeAws_json1_0DeleteHypervisorCommand = exports.serializeAws_json1_0DeleteGatewayCommand = exports.serializeAws_json1_0CreateGatewayCommand = exports.serializeAws_json1_0AssociateGatewayToServerCommand = void 0;
|
|
3
|
+
exports.deserializeAws_json1_0UpdateHypervisorCommand = exports.deserializeAws_json1_0UpdateGatewaySoftwareNowCommand = exports.deserializeAws_json1_0UpdateGatewayInformationCommand = exports.deserializeAws_json1_0UntagResourceCommand = exports.deserializeAws_json1_0TestHypervisorConfigurationCommand = exports.deserializeAws_json1_0TagResourceCommand = exports.deserializeAws_json1_0PutMaintenanceStartTimeCommand = exports.deserializeAws_json1_0ListVirtualMachinesCommand = exports.deserializeAws_json1_0ListTagsForResourceCommand = exports.deserializeAws_json1_0ListHypervisorsCommand = exports.deserializeAws_json1_0ListGatewaysCommand = exports.deserializeAws_json1_0ImportHypervisorConfigurationCommand = exports.deserializeAws_json1_0GetVirtualMachineCommand = exports.deserializeAws_json1_0GetGatewayCommand = exports.deserializeAws_json1_0DisassociateGatewayFromServerCommand = exports.deserializeAws_json1_0DeleteHypervisorCommand = exports.deserializeAws_json1_0DeleteGatewayCommand = exports.deserializeAws_json1_0CreateGatewayCommand = exports.deserializeAws_json1_0AssociateGatewayToServerCommand = exports.serializeAws_json1_0UpdateHypervisorCommand = exports.serializeAws_json1_0UpdateGatewaySoftwareNowCommand = exports.serializeAws_json1_0UpdateGatewayInformationCommand = exports.serializeAws_json1_0UntagResourceCommand = exports.serializeAws_json1_0TestHypervisorConfigurationCommand = exports.serializeAws_json1_0TagResourceCommand = exports.serializeAws_json1_0PutMaintenanceStartTimeCommand = exports.serializeAws_json1_0ListVirtualMachinesCommand = exports.serializeAws_json1_0ListTagsForResourceCommand = exports.serializeAws_json1_0ListHypervisorsCommand = exports.serializeAws_json1_0ListGatewaysCommand = exports.serializeAws_json1_0ImportHypervisorConfigurationCommand = exports.serializeAws_json1_0GetVirtualMachineCommand = exports.serializeAws_json1_0GetGatewayCommand = exports.serializeAws_json1_0DisassociateGatewayFromServerCommand = exports.serializeAws_json1_0DeleteHypervisorCommand = exports.serializeAws_json1_0DeleteGatewayCommand = exports.serializeAws_json1_0CreateGatewayCommand = exports.serializeAws_json1_0AssociateGatewayToServerCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const BackupGatewayServiceException_1 = require("../models/BackupGatewayServiceException");
|
|
@@ -65,6 +65,16 @@ const serializeAws_json1_0GetGatewayCommand = async (input, context) => {
|
|
|
65
65
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
66
|
};
|
|
67
67
|
exports.serializeAws_json1_0GetGatewayCommand = serializeAws_json1_0GetGatewayCommand;
|
|
68
|
+
const serializeAws_json1_0GetVirtualMachineCommand = async (input, context) => {
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/x-amz-json-1.0",
|
|
71
|
+
"x-amz-target": "BackupOnPremises_v20210101.GetVirtualMachine",
|
|
72
|
+
};
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(serializeAws_json1_0GetVirtualMachineInput(input, context));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
exports.serializeAws_json1_0GetVirtualMachineCommand = serializeAws_json1_0GetVirtualMachineCommand;
|
|
68
78
|
const serializeAws_json1_0ImportHypervisorConfigurationCommand = async (input, context) => {
|
|
69
79
|
const headers = {
|
|
70
80
|
"content-type": "application/x-amz-json-1.0",
|
|
@@ -212,6 +222,9 @@ const deserializeAws_json1_0AssociateGatewayToServerCommandError = async (output
|
|
|
212
222
|
case "InternalServerException":
|
|
213
223
|
case "com.amazonaws.backupgateway#InternalServerException":
|
|
214
224
|
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
225
|
+
case "ThrottlingException":
|
|
226
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
227
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
215
228
|
case "ValidationException":
|
|
216
229
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
217
230
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -249,6 +262,9 @@ const deserializeAws_json1_0CreateGatewayCommandError = async (output, context)
|
|
|
249
262
|
case "InternalServerException":
|
|
250
263
|
case "com.amazonaws.backupgateway#InternalServerException":
|
|
251
264
|
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
265
|
+
case "ThrottlingException":
|
|
266
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
267
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
252
268
|
case "ValidationException":
|
|
253
269
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
254
270
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -289,6 +305,9 @@ const deserializeAws_json1_0DeleteGatewayCommandError = async (output, context)
|
|
|
289
305
|
case "ResourceNotFoundException":
|
|
290
306
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
291
307
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
308
|
+
case "ThrottlingException":
|
|
309
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
310
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
292
311
|
case "ValidationException":
|
|
293
312
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
294
313
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -332,6 +351,9 @@ const deserializeAws_json1_0DeleteHypervisorCommandError = async (output, contex
|
|
|
332
351
|
case "ResourceNotFoundException":
|
|
333
352
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
334
353
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
354
|
+
case "ThrottlingException":
|
|
355
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
356
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
335
357
|
case "ValidationException":
|
|
336
358
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
337
359
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -375,6 +397,9 @@ const deserializeAws_json1_0DisassociateGatewayFromServerCommandError = async (o
|
|
|
375
397
|
case "ResourceNotFoundException":
|
|
376
398
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
377
399
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
400
|
+
case "ThrottlingException":
|
|
401
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
402
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
378
403
|
case "ValidationException":
|
|
379
404
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
380
405
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -415,6 +440,52 @@ const deserializeAws_json1_0GetGatewayCommandError = async (output, context) =>
|
|
|
415
440
|
case "ResourceNotFoundException":
|
|
416
441
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
417
442
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
443
|
+
case "ThrottlingException":
|
|
444
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
445
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
446
|
+
case "ValidationException":
|
|
447
|
+
case "com.amazonaws.backupgateway#ValidationException":
|
|
448
|
+
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
449
|
+
default:
|
|
450
|
+
const parsedBody = parsedOutput.body;
|
|
451
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
452
|
+
output,
|
|
453
|
+
parsedBody,
|
|
454
|
+
exceptionCtor: BackupGatewayServiceException_1.BackupGatewayServiceException,
|
|
455
|
+
errorCode,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
const deserializeAws_json1_0GetVirtualMachineCommand = async (output, context) => {
|
|
460
|
+
if (output.statusCode >= 300) {
|
|
461
|
+
return deserializeAws_json1_0GetVirtualMachineCommandError(output, context);
|
|
462
|
+
}
|
|
463
|
+
const data = await parseBody(output.body, context);
|
|
464
|
+
let contents = {};
|
|
465
|
+
contents = deserializeAws_json1_0GetVirtualMachineOutput(data, context);
|
|
466
|
+
const response = {
|
|
467
|
+
$metadata: deserializeMetadata(output),
|
|
468
|
+
...contents,
|
|
469
|
+
};
|
|
470
|
+
return Promise.resolve(response);
|
|
471
|
+
};
|
|
472
|
+
exports.deserializeAws_json1_0GetVirtualMachineCommand = deserializeAws_json1_0GetVirtualMachineCommand;
|
|
473
|
+
const deserializeAws_json1_0GetVirtualMachineCommandError = async (output, context) => {
|
|
474
|
+
const parsedOutput = {
|
|
475
|
+
...output,
|
|
476
|
+
body: await parseBody(output.body, context),
|
|
477
|
+
};
|
|
478
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
479
|
+
switch (errorCode) {
|
|
480
|
+
case "InternalServerException":
|
|
481
|
+
case "com.amazonaws.backupgateway#InternalServerException":
|
|
482
|
+
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
483
|
+
case "ResourceNotFoundException":
|
|
484
|
+
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
485
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
486
|
+
case "ThrottlingException":
|
|
487
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
488
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
418
489
|
case "ValidationException":
|
|
419
490
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
420
491
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -455,6 +526,9 @@ const deserializeAws_json1_0ImportHypervisorConfigurationCommandError = async (o
|
|
|
455
526
|
case "InternalServerException":
|
|
456
527
|
case "com.amazonaws.backupgateway#InternalServerException":
|
|
457
528
|
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
529
|
+
case "ThrottlingException":
|
|
530
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
531
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
458
532
|
case "ValidationException":
|
|
459
533
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
460
534
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -492,6 +566,9 @@ const deserializeAws_json1_0ListGatewaysCommandError = async (output, context) =
|
|
|
492
566
|
case "InternalServerException":
|
|
493
567
|
case "com.amazonaws.backupgateway#InternalServerException":
|
|
494
568
|
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
569
|
+
case "ThrottlingException":
|
|
570
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
571
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
495
572
|
case "ValidationException":
|
|
496
573
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
497
574
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -529,6 +606,9 @@ const deserializeAws_json1_0ListHypervisorsCommandError = async (output, context
|
|
|
529
606
|
case "InternalServerException":
|
|
530
607
|
case "com.amazonaws.backupgateway#InternalServerException":
|
|
531
608
|
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
609
|
+
case "ThrottlingException":
|
|
610
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
611
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
532
612
|
case "ValidationException":
|
|
533
613
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
534
614
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -569,6 +649,9 @@ const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, con
|
|
|
569
649
|
case "ResourceNotFoundException":
|
|
570
650
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
571
651
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
652
|
+
case "ThrottlingException":
|
|
653
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
654
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
572
655
|
case "ValidationException":
|
|
573
656
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
574
657
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -606,6 +689,9 @@ const deserializeAws_json1_0ListVirtualMachinesCommandError = async (output, con
|
|
|
606
689
|
case "InternalServerException":
|
|
607
690
|
case "com.amazonaws.backupgateway#InternalServerException":
|
|
608
691
|
throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
|
|
692
|
+
case "ThrottlingException":
|
|
693
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
694
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
609
695
|
case "ValidationException":
|
|
610
696
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
611
697
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -649,6 +735,9 @@ const deserializeAws_json1_0PutMaintenanceStartTimeCommandError = async (output,
|
|
|
649
735
|
case "ResourceNotFoundException":
|
|
650
736
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
651
737
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
738
|
+
case "ThrottlingException":
|
|
739
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
740
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
652
741
|
case "ValidationException":
|
|
653
742
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
654
743
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -689,6 +778,9 @@ const deserializeAws_json1_0TagResourceCommandError = async (output, context) =>
|
|
|
689
778
|
case "ResourceNotFoundException":
|
|
690
779
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
691
780
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
781
|
+
case "ThrottlingException":
|
|
782
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
783
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
692
784
|
case "ValidationException":
|
|
693
785
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
694
786
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -732,6 +824,9 @@ const deserializeAws_json1_0TestHypervisorConfigurationCommandError = async (out
|
|
|
732
824
|
case "ResourceNotFoundException":
|
|
733
825
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
734
826
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
827
|
+
case "ThrottlingException":
|
|
828
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
829
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
735
830
|
case "ValidationException":
|
|
736
831
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
737
832
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -772,6 +867,9 @@ const deserializeAws_json1_0UntagResourceCommandError = async (output, context)
|
|
|
772
867
|
case "ResourceNotFoundException":
|
|
773
868
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
774
869
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
870
|
+
case "ThrottlingException":
|
|
871
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
872
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
775
873
|
case "ValidationException":
|
|
776
874
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
777
875
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -815,6 +913,9 @@ const deserializeAws_json1_0UpdateGatewayInformationCommandError = async (output
|
|
|
815
913
|
case "ResourceNotFoundException":
|
|
816
914
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
817
915
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
916
|
+
case "ThrottlingException":
|
|
917
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
918
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
818
919
|
case "ValidationException":
|
|
819
920
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
820
921
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -855,6 +956,9 @@ const deserializeAws_json1_0UpdateGatewaySoftwareNowCommandError = async (output
|
|
|
855
956
|
case "ResourceNotFoundException":
|
|
856
957
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
857
958
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
959
|
+
case "ThrottlingException":
|
|
960
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
961
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
858
962
|
case "ValidationException":
|
|
859
963
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
860
964
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -898,6 +1002,9 @@ const deserializeAws_json1_0UpdateHypervisorCommandError = async (output, contex
|
|
|
898
1002
|
case "ResourceNotFoundException":
|
|
899
1003
|
case "com.amazonaws.backupgateway#ResourceNotFoundException":
|
|
900
1004
|
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1005
|
+
case "ThrottlingException":
|
|
1006
|
+
case "com.amazonaws.backupgateway#ThrottlingException":
|
|
1007
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
901
1008
|
case "ValidationException":
|
|
902
1009
|
case "com.amazonaws.backupgateway#ValidationException":
|
|
903
1010
|
throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
|
|
@@ -947,6 +1054,15 @@ const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOut
|
|
|
947
1054
|
});
|
|
948
1055
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
949
1056
|
};
|
|
1057
|
+
const deserializeAws_json1_0ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1058
|
+
const body = parsedOutput.body;
|
|
1059
|
+
const deserialized = deserializeAws_json1_0ThrottlingException(body, context);
|
|
1060
|
+
const exception = new models_0_1.ThrottlingException({
|
|
1061
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1062
|
+
...deserialized,
|
|
1063
|
+
});
|
|
1064
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
1065
|
+
};
|
|
950
1066
|
const deserializeAws_json1_0ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
951
1067
|
const body = parsedOutput.body;
|
|
952
1068
|
const deserialized = deserializeAws_json1_0ValidationException(body, context);
|
|
@@ -990,6 +1106,11 @@ const serializeAws_json1_0GetGatewayInput = (input, context) => {
|
|
|
990
1106
|
...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
|
|
991
1107
|
};
|
|
992
1108
|
};
|
|
1109
|
+
const serializeAws_json1_0GetVirtualMachineInput = (input, context) => {
|
|
1110
|
+
return {
|
|
1111
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
993
1114
|
const serializeAws_json1_0ImportHypervisorConfigurationInput = (input, context) => {
|
|
994
1115
|
return {
|
|
995
1116
|
...(input.Host != null && { Host: input.Host }),
|
|
@@ -1019,6 +1140,7 @@ const serializeAws_json1_0ListTagsForResourceInput = (input, context) => {
|
|
|
1019
1140
|
};
|
|
1020
1141
|
const serializeAws_json1_0ListVirtualMachinesInput = (input, context) => {
|
|
1021
1142
|
return {
|
|
1143
|
+
...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
|
|
1022
1144
|
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1023
1145
|
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1024
1146
|
};
|
|
@@ -1149,6 +1271,9 @@ const deserializeAws_json1_0GatewayDetails = (output, context) => {
|
|
|
1149
1271
|
LastSeenTime: output.LastSeenTime != null
|
|
1150
1272
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastSeenTime)))
|
|
1151
1273
|
: undefined,
|
|
1274
|
+
MaintenanceStartTime: output.MaintenanceStartTime != null
|
|
1275
|
+
? deserializeAws_json1_0MaintenanceStartTime(output.MaintenanceStartTime, context)
|
|
1276
|
+
: undefined,
|
|
1152
1277
|
NextUpdateAvailabilityTime: output.NextUpdateAvailabilityTime != null
|
|
1153
1278
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.NextUpdateAvailabilityTime)))
|
|
1154
1279
|
: undefined,
|
|
@@ -1171,6 +1296,13 @@ const deserializeAws_json1_0GetGatewayOutput = (output, context) => {
|
|
|
1171
1296
|
Gateway: output.Gateway != null ? deserializeAws_json1_0GatewayDetails(output.Gateway, context) : undefined,
|
|
1172
1297
|
};
|
|
1173
1298
|
};
|
|
1299
|
+
const deserializeAws_json1_0GetVirtualMachineOutput = (output, context) => {
|
|
1300
|
+
return {
|
|
1301
|
+
VirtualMachine: output.VirtualMachine != null
|
|
1302
|
+
? deserializeAws_json1_0VirtualMachineDetails(output.VirtualMachine, context)
|
|
1303
|
+
: undefined,
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1174
1306
|
const deserializeAws_json1_0Hypervisor = (output, context) => {
|
|
1175
1307
|
return {
|
|
1176
1308
|
Host: (0, smithy_client_1.expectString)(output.Host),
|
|
@@ -1228,6 +1360,14 @@ const deserializeAws_json1_0ListVirtualMachinesOutput = (output, context) => {
|
|
|
1228
1360
|
: undefined,
|
|
1229
1361
|
};
|
|
1230
1362
|
};
|
|
1363
|
+
const deserializeAws_json1_0MaintenanceStartTime = (output, context) => {
|
|
1364
|
+
return {
|
|
1365
|
+
DayOfMonth: (0, smithy_client_1.expectInt32)(output.DayOfMonth),
|
|
1366
|
+
DayOfWeek: (0, smithy_client_1.expectInt32)(output.DayOfWeek),
|
|
1367
|
+
HourOfDay: (0, smithy_client_1.expectInt32)(output.HourOfDay),
|
|
1368
|
+
MinuteOfHour: (0, smithy_client_1.expectInt32)(output.MinuteOfHour),
|
|
1369
|
+
};
|
|
1370
|
+
};
|
|
1231
1371
|
const deserializeAws_json1_0PutMaintenanceStartTimeOutput = (output, context) => {
|
|
1232
1372
|
return {
|
|
1233
1373
|
GatewayArn: (0, smithy_client_1.expectString)(output.GatewayArn),
|
|
@@ -1264,6 +1404,12 @@ const deserializeAws_json1_0Tags = (output, context) => {
|
|
|
1264
1404
|
const deserializeAws_json1_0TestHypervisorConfigurationOutput = (output, context) => {
|
|
1265
1405
|
return {};
|
|
1266
1406
|
};
|
|
1407
|
+
const deserializeAws_json1_0ThrottlingException = (output, context) => {
|
|
1408
|
+
return {
|
|
1409
|
+
ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
|
|
1410
|
+
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1411
|
+
};
|
|
1412
|
+
};
|
|
1267
1413
|
const deserializeAws_json1_0UntagResourceOutput = (output, context) => {
|
|
1268
1414
|
return {
|
|
1269
1415
|
ResourceARN: (0, smithy_client_1.expectString)(output.ResourceARN),
|
|
@@ -1302,6 +1448,18 @@ const deserializeAws_json1_0VirtualMachine = (output, context) => {
|
|
|
1302
1448
|
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
1303
1449
|
};
|
|
1304
1450
|
};
|
|
1451
|
+
const deserializeAws_json1_0VirtualMachineDetails = (output, context) => {
|
|
1452
|
+
return {
|
|
1453
|
+
HostName: (0, smithy_client_1.expectString)(output.HostName),
|
|
1454
|
+
HypervisorId: (0, smithy_client_1.expectString)(output.HypervisorId),
|
|
1455
|
+
LastBackupDate: output.LastBackupDate != null
|
|
1456
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastBackupDate)))
|
|
1457
|
+
: undefined,
|
|
1458
|
+
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1459
|
+
Path: (0, smithy_client_1.expectString)(output.Path),
|
|
1460
|
+
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1305
1463
|
const deserializeAws_json1_0VirtualMachines = (output, context) => {
|
|
1306
1464
|
const retVal = (output || [])
|
|
1307
1465
|
.filter((e) => e != null)
|
package/dist-es/BackupGateway.js
CHANGED
|
@@ -6,6 +6,7 @@ import { DeleteGatewayCommand, } from "./commands/DeleteGatewayCommand";
|
|
|
6
6
|
import { DeleteHypervisorCommand, } from "./commands/DeleteHypervisorCommand";
|
|
7
7
|
import { DisassociateGatewayFromServerCommand, } from "./commands/DisassociateGatewayFromServerCommand";
|
|
8
8
|
import { GetGatewayCommand } from "./commands/GetGatewayCommand";
|
|
9
|
+
import { GetVirtualMachineCommand, } from "./commands/GetVirtualMachineCommand";
|
|
9
10
|
import { ImportHypervisorConfigurationCommand, } from "./commands/ImportHypervisorConfigurationCommand";
|
|
10
11
|
import { ListGatewaysCommand, } from "./commands/ListGatewaysCommand";
|
|
11
12
|
import { ListHypervisorsCommand, } from "./commands/ListHypervisorsCommand";
|
|
@@ -107,6 +108,20 @@ var BackupGateway = (function (_super) {
|
|
|
107
108
|
return this.send(command, optionsOrCb);
|
|
108
109
|
}
|
|
109
110
|
};
|
|
111
|
+
BackupGateway.prototype.getVirtualMachine = function (args, optionsOrCb, cb) {
|
|
112
|
+
var command = new GetVirtualMachineCommand(args);
|
|
113
|
+
if (typeof optionsOrCb === "function") {
|
|
114
|
+
this.send(command, optionsOrCb);
|
|
115
|
+
}
|
|
116
|
+
else if (typeof cb === "function") {
|
|
117
|
+
if (typeof optionsOrCb !== "object")
|
|
118
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
119
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
return this.send(command, optionsOrCb);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
110
125
|
BackupGateway.prototype.importHypervisorConfiguration = function (args, optionsOrCb, cb) {
|
|
111
126
|
var command = new ImportHypervisorConfigurationCommand(args);
|
|
112
127
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { GetVirtualMachineInputFilterSensitiveLog, GetVirtualMachineOutputFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_0GetVirtualMachineCommand, serializeAws_json1_0GetVirtualMachineCommand, } from "../protocols/Aws_json1_0";
|
|
6
|
+
var GetVirtualMachineCommand = (function (_super) {
|
|
7
|
+
__extends(GetVirtualMachineCommand, _super);
|
|
8
|
+
function GetVirtualMachineCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
GetVirtualMachineCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "BackupGatewayClient";
|
|
18
|
+
var commandName = "GetVirtualMachineCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: GetVirtualMachineInputFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: GetVirtualMachineOutputFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
GetVirtualMachineCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_json1_0GetVirtualMachineCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
GetVirtualMachineCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_json1_0GetVirtualMachineCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return GetVirtualMachineCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { GetVirtualMachineCommand };
|
|
@@ -4,6 +4,7 @@ export * from "./DeleteGatewayCommand";
|
|
|
4
4
|
export * from "./DeleteHypervisorCommand";
|
|
5
5
|
export * from "./DisassociateGatewayFromServerCommand";
|
|
6
6
|
export * from "./GetGatewayCommand";
|
|
7
|
+
export * from "./GetVirtualMachineCommand";
|
|
7
8
|
export * from "./ImportHypervisorConfigurationCommand";
|
|
8
9
|
export * from "./ListGatewaysCommand";
|
|
9
10
|
export * from "./ListHypervisorsCommand";
|