@aws-sdk/client-backup-gateway 3.99.0 → 3.105.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 (30) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/BackupGateway.js +30 -0
  3. package/dist-cjs/BackupGatewayClient.js +2 -0
  4. package/dist-cjs/commands/GetGatewayCommand.js +36 -0
  5. package/dist-cjs/commands/UpdateGatewaySoftwareNowCommand.js +36 -0
  6. package/dist-cjs/commands/index.js +2 -0
  7. package/dist-cjs/models/models_0.js +31 -1
  8. package/dist-cjs/protocols/Aws_json1_0.js +143 -1
  9. package/dist-es/BackupGateway.js +30 -0
  10. package/dist-es/BackupGatewayClient.js +2 -0
  11. package/dist-es/commands/GetGatewayCommand.js +39 -0
  12. package/dist-es/commands/UpdateGatewaySoftwareNowCommand.js +39 -0
  13. package/dist-es/commands/index.js +2 -0
  14. package/dist-es/models/models_0.js +20 -0
  15. package/dist-es/protocols/Aws_json1_0.js +172 -1
  16. package/dist-types/BackupGateway.d.ts +21 -0
  17. package/dist-types/BackupGatewayClient.d.ts +4 -2
  18. package/dist-types/commands/GetGatewayCommand.d.ts +36 -0
  19. package/dist-types/commands/UpdateGatewaySoftwareNowCommand.d.ts +41 -0
  20. package/dist-types/commands/index.d.ts +2 -0
  21. package/dist-types/models/models_0.d.ts +103 -2
  22. package/dist-types/protocols/Aws_json1_0.d.ts +6 -0
  23. package/dist-types/ts3.4/BackupGateway.d.ts +10 -0
  24. package/dist-types/ts3.4/BackupGatewayClient.d.ts +4 -2
  25. package/dist-types/ts3.4/commands/GetGatewayCommand.d.ts +17 -0
  26. package/dist-types/ts3.4/commands/UpdateGatewaySoftwareNowCommand.d.ts +17 -0
  27. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  28. package/dist-types/ts3.4/models/models_0.d.ts +55 -0
  29. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +6 -0
  30. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
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.105.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.104.0...v3.105.0) (2022-06-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** support recursion detection in Lambda ([#3654](https://github.com/aws/aws-sdk-js-v3/issues/3654)) ([ecfe46e](https://github.com/aws/aws-sdk-js-v3/commit/ecfe46ea1fd8b6e3812b75b3dc6c03554fb4b3fa))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.103.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.102.0...v3.103.0) (2022-06-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * **client-backup-gateway:** Adds GetGateway and UpdateGatewaySoftwareNow API and adds hypervisor name to UpdateHypervisor API ([4910403](https://github.com/aws/aws-sdk-js-v3/commit/4910403f98c96600cf9a7532714f2e6f940b842c))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.100.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.99.0...v3.100.0) (2022-05-26)
29
+
30
+ **Note:** Version bump only for package @aws-sdk/client-backup-gateway
31
+
32
+
33
+
34
+
35
+
6
36
  # [3.99.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.98.0...v3.99.0) (2022-05-25)
7
37
 
8
38
  **Note:** Version bump only for package @aws-sdk/client-backup-gateway
@@ -7,6 +7,7 @@ const CreateGatewayCommand_1 = require("./commands/CreateGatewayCommand");
7
7
  const DeleteGatewayCommand_1 = require("./commands/DeleteGatewayCommand");
8
8
  const DeleteHypervisorCommand_1 = require("./commands/DeleteHypervisorCommand");
9
9
  const DisassociateGatewayFromServerCommand_1 = require("./commands/DisassociateGatewayFromServerCommand");
10
+ const GetGatewayCommand_1 = require("./commands/GetGatewayCommand");
10
11
  const ImportHypervisorConfigurationCommand_1 = require("./commands/ImportHypervisorConfigurationCommand");
11
12
  const ListGatewaysCommand_1 = require("./commands/ListGatewaysCommand");
12
13
  const ListHypervisorsCommand_1 = require("./commands/ListHypervisorsCommand");
@@ -17,6 +18,7 @@ const TagResourceCommand_1 = require("./commands/TagResourceCommand");
17
18
  const TestHypervisorConfigurationCommand_1 = require("./commands/TestHypervisorConfigurationCommand");
18
19
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
19
20
  const UpdateGatewayInformationCommand_1 = require("./commands/UpdateGatewayInformationCommand");
21
+ const UpdateGatewaySoftwareNowCommand_1 = require("./commands/UpdateGatewaySoftwareNowCommand");
20
22
  const UpdateHypervisorCommand_1 = require("./commands/UpdateHypervisorCommand");
21
23
  class BackupGateway extends BackupGatewayClient_1.BackupGatewayClient {
22
24
  associateGatewayToServer(args, optionsOrCb, cb) {
@@ -89,6 +91,20 @@ class BackupGateway extends BackupGatewayClient_1.BackupGatewayClient {
89
91
  return this.send(command, optionsOrCb);
90
92
  }
91
93
  }
94
+ getGateway(args, optionsOrCb, cb) {
95
+ const command = new GetGatewayCommand_1.GetGatewayCommand(args);
96
+ if (typeof optionsOrCb === "function") {
97
+ this.send(command, optionsOrCb);
98
+ }
99
+ else if (typeof cb === "function") {
100
+ if (typeof optionsOrCb !== "object")
101
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
102
+ this.send(command, optionsOrCb || {}, cb);
103
+ }
104
+ else {
105
+ return this.send(command, optionsOrCb);
106
+ }
107
+ }
92
108
  importHypervisorConfiguration(args, optionsOrCb, cb) {
93
109
  const command = new ImportHypervisorConfigurationCommand_1.ImportHypervisorConfigurationCommand(args);
94
110
  if (typeof optionsOrCb === "function") {
@@ -229,6 +245,20 @@ class BackupGateway extends BackupGatewayClient_1.BackupGatewayClient {
229
245
  return this.send(command, optionsOrCb);
230
246
  }
231
247
  }
248
+ updateGatewaySoftwareNow(args, optionsOrCb, cb) {
249
+ const command = new UpdateGatewaySoftwareNowCommand_1.UpdateGatewaySoftwareNowCommand(args);
250
+ if (typeof optionsOrCb === "function") {
251
+ this.send(command, optionsOrCb);
252
+ }
253
+ else if (typeof cb === "function") {
254
+ if (typeof optionsOrCb !== "object")
255
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
256
+ this.send(command, optionsOrCb || {}, cb);
257
+ }
258
+ else {
259
+ return this.send(command, optionsOrCb);
260
+ }
261
+ }
232
262
  updateHypervisor(args, optionsOrCb, cb) {
233
263
  const command = new UpdateHypervisorCommand_1.UpdateHypervisorCommand(args);
234
264
  if (typeof optionsOrCb === "function") {
@@ -5,6 +5,7 @@ const config_resolver_1 = require("@aws-sdk/config-resolver");
5
5
  const middleware_content_length_1 = require("@aws-sdk/middleware-content-length");
6
6
  const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
7
7
  const middleware_logger_1 = require("@aws-sdk/middleware-logger");
8
+ const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
8
9
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
9
10
  const middleware_signing_1 = require("@aws-sdk/middleware-signing");
10
11
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
@@ -25,6 +26,7 @@ class BackupGatewayClient extends smithy_client_1.Client {
25
26
  this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
26
27
  this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
27
28
  this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
29
+ this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
28
30
  this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
29
31
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
30
32
  }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetGatewayCommand = 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 GetGatewayCommand 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 = "GetGatewayCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.GetGatewayInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.GetGatewayOutput.filterSensitiveLog,
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_0GetGatewayCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_json1_0_1.deserializeAws_json1_0GetGatewayCommand)(output, context);
34
+ }
35
+ }
36
+ exports.GetGatewayCommand = GetGatewayCommand;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateGatewaySoftwareNowCommand = 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 UpdateGatewaySoftwareNowCommand 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 = "UpdateGatewaySoftwareNowCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.UpdateGatewaySoftwareNowInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.UpdateGatewaySoftwareNowOutput.filterSensitiveLog,
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_0UpdateGatewaySoftwareNowCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_json1_0_1.deserializeAws_json1_0UpdateGatewaySoftwareNowCommand)(output, context);
34
+ }
35
+ }
36
+ exports.UpdateGatewaySoftwareNowCommand = UpdateGatewaySoftwareNowCommand;
@@ -6,6 +6,7 @@ tslib_1.__exportStar(require("./CreateGatewayCommand"), exports);
6
6
  tslib_1.__exportStar(require("./DeleteGatewayCommand"), exports);
7
7
  tslib_1.__exportStar(require("./DeleteHypervisorCommand"), exports);
8
8
  tslib_1.__exportStar(require("./DisassociateGatewayFromServerCommand"), exports);
9
+ tslib_1.__exportStar(require("./GetGatewayCommand"), exports);
9
10
  tslib_1.__exportStar(require("./ImportHypervisorConfigurationCommand"), exports);
10
11
  tslib_1.__exportStar(require("./ListGatewaysCommand"), exports);
11
12
  tslib_1.__exportStar(require("./ListHypervisorsCommand"), exports);
@@ -16,4 +17,5 @@ tslib_1.__exportStar(require("./TagResourceCommand"), exports);
16
17
  tslib_1.__exportStar(require("./TestHypervisorConfigurationCommand"), exports);
17
18
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
18
19
  tslib_1.__exportStar(require("./UpdateGatewayInformationCommand"), exports);
20
+ tslib_1.__exportStar(require("./UpdateGatewaySoftwareNowCommand"), exports);
19
21
  tslib_1.__exportStar(require("./UpdateHypervisorCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UntagResourceOutput = exports.UntagResourceInput = exports.TagResourceOutput = exports.TagResourceInput = exports.ListVirtualMachinesOutput = exports.VirtualMachine = exports.ListVirtualMachinesInput = exports.ListTagsForResourceOutput = exports.ListTagsForResourceInput = exports.UpdateHypervisorOutput = exports.UpdateHypervisorInput = exports.ListHypervisorsOutput = exports.Hypervisor = exports.HypervisorState = exports.ListHypervisorsInput = exports.ImportHypervisorConfigurationOutput = exports.ImportHypervisorConfigurationInput = exports.DeleteHypervisorOutput = exports.DeleteHypervisorInput = exports.UpdateGatewayInformationOutput = exports.UpdateGatewayInformationInput = exports.TestHypervisorConfigurationOutput = exports.TestHypervisorConfigurationInput = exports.PutMaintenanceStartTimeOutput = exports.PutMaintenanceStartTimeInput = exports.ListGatewaysOutput = exports.Gateway = exports.ListGatewaysInput = exports.DisassociateGatewayFromServerOutput = exports.DisassociateGatewayFromServerInput = exports.ResourceNotFoundException = exports.DeleteGatewayOutput = exports.DeleteGatewayInput = exports.CreateGatewayOutput = exports.CreateGatewayInput = exports.Tag = exports.GatewayType = exports.ValidationException = exports.InternalServerException = exports.ConflictException = exports.AssociateGatewayToServerOutput = exports.AssociateGatewayToServerInput = exports.AccessDeniedException = void 0;
3
+ exports.UntagResourceOutput = exports.UntagResourceInput = exports.TagResourceOutput = exports.TagResourceInput = exports.ListVirtualMachinesOutput = exports.VirtualMachine = exports.ListVirtualMachinesInput = exports.ListTagsForResourceOutput = exports.ListTagsForResourceInput = exports.UpdateHypervisorOutput = exports.UpdateHypervisorInput = exports.ListHypervisorsOutput = exports.Hypervisor = exports.HypervisorState = exports.ListHypervisorsInput = exports.ImportHypervisorConfigurationOutput = exports.ImportHypervisorConfigurationInput = exports.DeleteHypervisorOutput = exports.DeleteHypervisorInput = exports.UpdateGatewaySoftwareNowOutput = exports.UpdateGatewaySoftwareNowInput = exports.UpdateGatewayInformationOutput = exports.UpdateGatewayInformationInput = exports.TestHypervisorConfigurationOutput = exports.TestHypervisorConfigurationInput = exports.PutMaintenanceStartTimeOutput = exports.PutMaintenanceStartTimeInput = exports.ListGatewaysOutput = exports.Gateway = exports.ListGatewaysInput = exports.GetGatewayOutput = exports.GatewayDetails = exports.GetGatewayInput = exports.DisassociateGatewayFromServerOutput = exports.DisassociateGatewayFromServerInput = exports.ResourceNotFoundException = exports.DeleteGatewayOutput = exports.DeleteGatewayInput = exports.CreateGatewayOutput = exports.CreateGatewayInput = exports.Tag = exports.GatewayType = exports.ValidationException = exports.InternalServerException = exports.ConflictException = exports.AssociateGatewayToServerOutput = exports.AssociateGatewayToServerInput = exports.AccessDeniedException = void 0;
4
4
  const smithy_client_1 = require("@aws-sdk/smithy-client");
5
5
  const BackupGatewayServiceException_1 = require("./BackupGatewayServiceException");
6
6
  class AccessDeniedException extends BackupGatewayServiceException_1.BackupGatewayServiceException {
@@ -136,6 +136,24 @@ var DisassociateGatewayFromServerOutput;
136
136
  ...obj,
137
137
  });
138
138
  })(DisassociateGatewayFromServerOutput = exports.DisassociateGatewayFromServerOutput || (exports.DisassociateGatewayFromServerOutput = {}));
139
+ var GetGatewayInput;
140
+ (function (GetGatewayInput) {
141
+ GetGatewayInput.filterSensitiveLog = (obj) => ({
142
+ ...obj,
143
+ });
144
+ })(GetGatewayInput = exports.GetGatewayInput || (exports.GetGatewayInput = {}));
145
+ var GatewayDetails;
146
+ (function (GatewayDetails) {
147
+ GatewayDetails.filterSensitiveLog = (obj) => ({
148
+ ...obj,
149
+ });
150
+ })(GatewayDetails = exports.GatewayDetails || (exports.GatewayDetails = {}));
151
+ var GetGatewayOutput;
152
+ (function (GetGatewayOutput) {
153
+ GetGatewayOutput.filterSensitiveLog = (obj) => ({
154
+ ...obj,
155
+ });
156
+ })(GetGatewayOutput = exports.GetGatewayOutput || (exports.GetGatewayOutput = {}));
139
157
  var ListGatewaysInput;
140
158
  (function (ListGatewaysInput) {
141
159
  ListGatewaysInput.filterSensitiveLog = (obj) => ({
@@ -192,6 +210,18 @@ var UpdateGatewayInformationOutput;
192
210
  ...obj,
193
211
  });
194
212
  })(UpdateGatewayInformationOutput = exports.UpdateGatewayInformationOutput || (exports.UpdateGatewayInformationOutput = {}));
213
+ var UpdateGatewaySoftwareNowInput;
214
+ (function (UpdateGatewaySoftwareNowInput) {
215
+ UpdateGatewaySoftwareNowInput.filterSensitiveLog = (obj) => ({
216
+ ...obj,
217
+ });
218
+ })(UpdateGatewaySoftwareNowInput = exports.UpdateGatewaySoftwareNowInput || (exports.UpdateGatewaySoftwareNowInput = {}));
219
+ var UpdateGatewaySoftwareNowOutput;
220
+ (function (UpdateGatewaySoftwareNowOutput) {
221
+ UpdateGatewaySoftwareNowOutput.filterSensitiveLog = (obj) => ({
222
+ ...obj,
223
+ });
224
+ })(UpdateGatewaySoftwareNowOutput = exports.UpdateGatewaySoftwareNowOutput || (exports.UpdateGatewaySoftwareNowOutput = {}));
195
225
  var DeleteHypervisorInput;
196
226
  (function (DeleteHypervisorInput) {
197
227
  DeleteHypervisorInput.filterSensitiveLog = (obj) => ({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_json1_0UpdateHypervisorCommand = 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_0DisassociateGatewayFromServerCommand = exports.deserializeAws_json1_0DeleteHypervisorCommand = exports.deserializeAws_json1_0DeleteGatewayCommand = exports.deserializeAws_json1_0CreateGatewayCommand = exports.deserializeAws_json1_0AssociateGatewayToServerCommand = exports.serializeAws_json1_0UpdateHypervisorCommand = 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_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_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;
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");
@@ -55,6 +55,16 @@ const serializeAws_json1_0DisassociateGatewayFromServerCommand = async (input, c
55
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
56
  };
57
57
  exports.serializeAws_json1_0DisassociateGatewayFromServerCommand = serializeAws_json1_0DisassociateGatewayFromServerCommand;
58
+ const serializeAws_json1_0GetGatewayCommand = async (input, context) => {
59
+ const headers = {
60
+ "content-type": "application/x-amz-json-1.0",
61
+ "x-amz-target": "BackupOnPremises_v20210101.GetGateway",
62
+ };
63
+ let body;
64
+ body = JSON.stringify(serializeAws_json1_0GetGatewayInput(input, context));
65
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
+ };
67
+ exports.serializeAws_json1_0GetGatewayCommand = serializeAws_json1_0GetGatewayCommand;
58
68
  const serializeAws_json1_0ImportHypervisorConfigurationCommand = async (input, context) => {
59
69
  const headers = {
60
70
  "content-type": "application/x-amz-json-1.0",
@@ -155,6 +165,16 @@ const serializeAws_json1_0UpdateGatewayInformationCommand = async (input, contex
155
165
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
166
  };
157
167
  exports.serializeAws_json1_0UpdateGatewayInformationCommand = serializeAws_json1_0UpdateGatewayInformationCommand;
168
+ const serializeAws_json1_0UpdateGatewaySoftwareNowCommand = async (input, context) => {
169
+ const headers = {
170
+ "content-type": "application/x-amz-json-1.0",
171
+ "x-amz-target": "BackupOnPremises_v20210101.UpdateGatewaySoftwareNow",
172
+ };
173
+ let body;
174
+ body = JSON.stringify(serializeAws_json1_0UpdateGatewaySoftwareNowInput(input, context));
175
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
+ };
177
+ exports.serializeAws_json1_0UpdateGatewaySoftwareNowCommand = serializeAws_json1_0UpdateGatewaySoftwareNowCommand;
158
178
  const serializeAws_json1_0UpdateHypervisorCommand = async (input, context) => {
159
179
  const headers = {
160
180
  "content-type": "application/x-amz-json-1.0",
@@ -378,6 +398,48 @@ const deserializeAws_json1_0DisassociateGatewayFromServerCommandError = async (o
378
398
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
379
399
  }
380
400
  };
401
+ const deserializeAws_json1_0GetGatewayCommand = async (output, context) => {
402
+ if (output.statusCode >= 300) {
403
+ return deserializeAws_json1_0GetGatewayCommandError(output, context);
404
+ }
405
+ const data = await parseBody(output.body, context);
406
+ let contents = {};
407
+ contents = deserializeAws_json1_0GetGatewayOutput(data, context);
408
+ const response = {
409
+ $metadata: deserializeMetadata(output),
410
+ ...contents,
411
+ };
412
+ return Promise.resolve(response);
413
+ };
414
+ exports.deserializeAws_json1_0GetGatewayCommand = deserializeAws_json1_0GetGatewayCommand;
415
+ const deserializeAws_json1_0GetGatewayCommandError = async (output, context) => {
416
+ const parsedOutput = {
417
+ ...output,
418
+ body: await parseBody(output.body, context),
419
+ };
420
+ let response;
421
+ let errorCode = "UnknownError";
422
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
423
+ switch (errorCode) {
424
+ case "InternalServerException":
425
+ case "com.amazonaws.backupgateway#InternalServerException":
426
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
427
+ case "ResourceNotFoundException":
428
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
429
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
430
+ case "ValidationException":
431
+ case "com.amazonaws.backupgateway#ValidationException":
432
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
433
+ default:
434
+ const parsedBody = parsedOutput.body;
435
+ response = new BackupGatewayServiceException_1.BackupGatewayServiceException({
436
+ name: parsedBody.code || parsedBody.Code || errorCode,
437
+ $fault: "client",
438
+ $metadata: deserializeMetadata(output),
439
+ });
440
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
441
+ }
442
+ };
381
443
  const deserializeAws_json1_0ImportHypervisorConfigurationCommand = async (output, context) => {
382
444
  if (output.statusCode >= 300) {
383
445
  return deserializeAws_json1_0ImportHypervisorConfigurationCommandError(output, context);
@@ -798,6 +860,48 @@ const deserializeAws_json1_0UpdateGatewayInformationCommandError = async (output
798
860
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
799
861
  }
800
862
  };
863
+ const deserializeAws_json1_0UpdateGatewaySoftwareNowCommand = async (output, context) => {
864
+ if (output.statusCode >= 300) {
865
+ return deserializeAws_json1_0UpdateGatewaySoftwareNowCommandError(output, context);
866
+ }
867
+ const data = await parseBody(output.body, context);
868
+ let contents = {};
869
+ contents = deserializeAws_json1_0UpdateGatewaySoftwareNowOutput(data, context);
870
+ const response = {
871
+ $metadata: deserializeMetadata(output),
872
+ ...contents,
873
+ };
874
+ return Promise.resolve(response);
875
+ };
876
+ exports.deserializeAws_json1_0UpdateGatewaySoftwareNowCommand = deserializeAws_json1_0UpdateGatewaySoftwareNowCommand;
877
+ const deserializeAws_json1_0UpdateGatewaySoftwareNowCommandError = async (output, context) => {
878
+ const parsedOutput = {
879
+ ...output,
880
+ body: await parseBody(output.body, context),
881
+ };
882
+ let response;
883
+ let errorCode = "UnknownError";
884
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
885
+ switch (errorCode) {
886
+ case "InternalServerException":
887
+ case "com.amazonaws.backupgateway#InternalServerException":
888
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
889
+ case "ResourceNotFoundException":
890
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
891
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
892
+ case "ValidationException":
893
+ case "com.amazonaws.backupgateway#ValidationException":
894
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
895
+ default:
896
+ const parsedBody = parsedOutput.body;
897
+ response = new BackupGatewayServiceException_1.BackupGatewayServiceException({
898
+ name: parsedBody.code || parsedBody.Code || errorCode,
899
+ $fault: "client",
900
+ $metadata: deserializeMetadata(output),
901
+ });
902
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
903
+ }
904
+ };
801
905
  const deserializeAws_json1_0UpdateHypervisorCommand = async (output, context) => {
802
906
  if (output.statusCode >= 300) {
803
907
  return deserializeAws_json1_0UpdateHypervisorCommandError(output, context);
@@ -918,6 +1022,11 @@ const serializeAws_json1_0DisassociateGatewayFromServerInput = (input, context)
918
1022
  ...(input.GatewayArn !== undefined && input.GatewayArn !== null && { GatewayArn: input.GatewayArn }),
919
1023
  };
920
1024
  };
1025
+ const serializeAws_json1_0GetGatewayInput = (input, context) => {
1026
+ return {
1027
+ ...(input.GatewayArn !== undefined && input.GatewayArn !== null && { GatewayArn: input.GatewayArn }),
1028
+ };
1029
+ };
921
1030
  const serializeAws_json1_0ImportHypervisorConfigurationInput = (input, context) => {
922
1031
  return {
923
1032
  ...(input.Host !== undefined && input.Host !== null && { Host: input.Host }),
@@ -1014,10 +1123,16 @@ const serializeAws_json1_0UpdateGatewayInformationInput = (input, context) => {
1014
1123
  input.GatewayDisplayName !== null && { GatewayDisplayName: input.GatewayDisplayName }),
1015
1124
  };
1016
1125
  };
1126
+ const serializeAws_json1_0UpdateGatewaySoftwareNowInput = (input, context) => {
1127
+ return {
1128
+ ...(input.GatewayArn !== undefined && input.GatewayArn !== null && { GatewayArn: input.GatewayArn }),
1129
+ };
1130
+ };
1017
1131
  const serializeAws_json1_0UpdateHypervisorInput = (input, context) => {
1018
1132
  return {
1019
1133
  ...(input.Host !== undefined && input.Host !== null && { Host: input.Host }),
1020
1134
  ...(input.HypervisorArn !== undefined && input.HypervisorArn !== null && { HypervisorArn: input.HypervisorArn }),
1135
+ ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
1021
1136
  ...(input.Password !== undefined && input.Password !== null && { Password: input.Password }),
1022
1137
  ...(input.Username !== undefined && input.Username !== null && { Username: input.Username }),
1023
1138
  };
@@ -1070,6 +1185,21 @@ const deserializeAws_json1_0Gateway = (output, context) => {
1070
1185
  : undefined,
1071
1186
  };
1072
1187
  };
1188
+ const deserializeAws_json1_0GatewayDetails = (output, context) => {
1189
+ return {
1190
+ GatewayArn: (0, smithy_client_1.expectString)(output.GatewayArn),
1191
+ GatewayDisplayName: (0, smithy_client_1.expectString)(output.GatewayDisplayName),
1192
+ GatewayType: (0, smithy_client_1.expectString)(output.GatewayType),
1193
+ HypervisorId: (0, smithy_client_1.expectString)(output.HypervisorId),
1194
+ LastSeenTime: output.LastSeenTime !== undefined && output.LastSeenTime !== null
1195
+ ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastSeenTime)))
1196
+ : undefined,
1197
+ NextUpdateAvailabilityTime: output.NextUpdateAvailabilityTime !== undefined && output.NextUpdateAvailabilityTime !== null
1198
+ ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.NextUpdateAvailabilityTime)))
1199
+ : undefined,
1200
+ VpcEndpoint: (0, smithy_client_1.expectString)(output.VpcEndpoint),
1201
+ };
1202
+ };
1073
1203
  const deserializeAws_json1_0Gateways = (output, context) => {
1074
1204
  const retVal = (output || [])
1075
1205
  .filter((e) => e != null)
@@ -1081,6 +1211,13 @@ const deserializeAws_json1_0Gateways = (output, context) => {
1081
1211
  });
1082
1212
  return retVal;
1083
1213
  };
1214
+ const deserializeAws_json1_0GetGatewayOutput = (output, context) => {
1215
+ return {
1216
+ Gateway: output.Gateway !== undefined && output.Gateway !== null
1217
+ ? deserializeAws_json1_0GatewayDetails(output.Gateway, context)
1218
+ : undefined,
1219
+ };
1220
+ };
1084
1221
  const deserializeAws_json1_0Hypervisor = (output, context) => {
1085
1222
  return {
1086
1223
  Host: (0, smithy_client_1.expectString)(output.Host),
@@ -1188,6 +1325,11 @@ const deserializeAws_json1_0UpdateGatewayInformationOutput = (output, context) =
1188
1325
  GatewayArn: (0, smithy_client_1.expectString)(output.GatewayArn),
1189
1326
  };
1190
1327
  };
1328
+ const deserializeAws_json1_0UpdateGatewaySoftwareNowOutput = (output, context) => {
1329
+ return {
1330
+ GatewayArn: (0, smithy_client_1.expectString)(output.GatewayArn),
1331
+ };
1332
+ };
1191
1333
  const deserializeAws_json1_0UpdateHypervisorOutput = (output, context) => {
1192
1334
  return {
1193
1335
  HypervisorArn: (0, smithy_client_1.expectString)(output.HypervisorArn),
@@ -5,6 +5,7 @@ import { CreateGatewayCommand, } from "./commands/CreateGatewayCommand";
5
5
  import { DeleteGatewayCommand, } from "./commands/DeleteGatewayCommand";
6
6
  import { DeleteHypervisorCommand, } from "./commands/DeleteHypervisorCommand";
7
7
  import { DisassociateGatewayFromServerCommand, } from "./commands/DisassociateGatewayFromServerCommand";
8
+ import { GetGatewayCommand } from "./commands/GetGatewayCommand";
8
9
  import { ImportHypervisorConfigurationCommand, } from "./commands/ImportHypervisorConfigurationCommand";
9
10
  import { ListGatewaysCommand, } from "./commands/ListGatewaysCommand";
10
11
  import { ListHypervisorsCommand, } from "./commands/ListHypervisorsCommand";
@@ -15,6 +16,7 @@ import { TagResourceCommand } from "./commands/TagResourceCommand";
15
16
  import { TestHypervisorConfigurationCommand, } from "./commands/TestHypervisorConfigurationCommand";
16
17
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
17
18
  import { UpdateGatewayInformationCommand, } from "./commands/UpdateGatewayInformationCommand";
19
+ import { UpdateGatewaySoftwareNowCommand, } from "./commands/UpdateGatewaySoftwareNowCommand";
18
20
  import { UpdateHypervisorCommand, } from "./commands/UpdateHypervisorCommand";
19
21
  var BackupGateway = (function (_super) {
20
22
  __extends(BackupGateway, _super);
@@ -91,6 +93,20 @@ var BackupGateway = (function (_super) {
91
93
  return this.send(command, optionsOrCb);
92
94
  }
93
95
  };
96
+ BackupGateway.prototype.getGateway = function (args, optionsOrCb, cb) {
97
+ var command = new GetGatewayCommand(args);
98
+ if (typeof optionsOrCb === "function") {
99
+ this.send(command, optionsOrCb);
100
+ }
101
+ else if (typeof cb === "function") {
102
+ if (typeof optionsOrCb !== "object")
103
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
104
+ this.send(command, optionsOrCb || {}, cb);
105
+ }
106
+ else {
107
+ return this.send(command, optionsOrCb);
108
+ }
109
+ };
94
110
  BackupGateway.prototype.importHypervisorConfiguration = function (args, optionsOrCb, cb) {
95
111
  var command = new ImportHypervisorConfigurationCommand(args);
96
112
  if (typeof optionsOrCb === "function") {
@@ -231,6 +247,20 @@ var BackupGateway = (function (_super) {
231
247
  return this.send(command, optionsOrCb);
232
248
  }
233
249
  };
250
+ BackupGateway.prototype.updateGatewaySoftwareNow = function (args, optionsOrCb, cb) {
251
+ var command = new UpdateGatewaySoftwareNowCommand(args);
252
+ if (typeof optionsOrCb === "function") {
253
+ this.send(command, optionsOrCb);
254
+ }
255
+ else if (typeof cb === "function") {
256
+ if (typeof optionsOrCb !== "object")
257
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
258
+ this.send(command, optionsOrCb || {}, cb);
259
+ }
260
+ else {
261
+ return this.send(command, optionsOrCb);
262
+ }
263
+ };
234
264
  BackupGateway.prototype.updateHypervisor = function (args, optionsOrCb, cb) {
235
265
  var command = new UpdateHypervisorCommand(args);
236
266
  if (typeof optionsOrCb === "function") {
@@ -3,6 +3,7 @@ import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-re
3
3
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
4
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
5
5
  import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
6
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
6
7
  import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
7
8
  import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
8
9
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
@@ -25,6 +26,7 @@ var BackupGatewayClient = (function (_super) {
25
26
  _this.middlewareStack.use(getContentLengthPlugin(_this.config));
26
27
  _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
27
28
  _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
+ _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
28
30
  _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
29
31
  _this.middlewareStack.use(getUserAgentPlugin(_this.config));
30
32
  return _this;
@@ -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 { GetGatewayInput, GetGatewayOutput } from "../models/models_0";
5
+ import { deserializeAws_json1_0GetGatewayCommand, serializeAws_json1_0GetGatewayCommand, } from "../protocols/Aws_json1_0";
6
+ var GetGatewayCommand = (function (_super) {
7
+ __extends(GetGatewayCommand, _super);
8
+ function GetGatewayCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ GetGatewayCommand.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 = "GetGatewayCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: GetGatewayInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: GetGatewayOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ GetGatewayCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_json1_0GetGatewayCommand(input, context);
33
+ };
34
+ GetGatewayCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_json1_0GetGatewayCommand(output, context);
36
+ };
37
+ return GetGatewayCommand;
38
+ }($Command));
39
+ export { GetGatewayCommand };
@@ -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 { UpdateGatewaySoftwareNowInput, UpdateGatewaySoftwareNowOutput } from "../models/models_0";
5
+ import { deserializeAws_json1_0UpdateGatewaySoftwareNowCommand, serializeAws_json1_0UpdateGatewaySoftwareNowCommand, } from "../protocols/Aws_json1_0";
6
+ var UpdateGatewaySoftwareNowCommand = (function (_super) {
7
+ __extends(UpdateGatewaySoftwareNowCommand, _super);
8
+ function UpdateGatewaySoftwareNowCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ UpdateGatewaySoftwareNowCommand.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 = "UpdateGatewaySoftwareNowCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: UpdateGatewaySoftwareNowInput.filterSensitiveLog,
24
+ outputFilterSensitiveLog: UpdateGatewaySoftwareNowOutput.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ UpdateGatewaySoftwareNowCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_json1_0UpdateGatewaySoftwareNowCommand(input, context);
33
+ };
34
+ UpdateGatewaySoftwareNowCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_json1_0UpdateGatewaySoftwareNowCommand(output, context);
36
+ };
37
+ return UpdateGatewaySoftwareNowCommand;
38
+ }($Command));
39
+ export { UpdateGatewaySoftwareNowCommand };
@@ -3,6 +3,7 @@ export * from "./CreateGatewayCommand";
3
3
  export * from "./DeleteGatewayCommand";
4
4
  export * from "./DeleteHypervisorCommand";
5
5
  export * from "./DisassociateGatewayFromServerCommand";
6
+ export * from "./GetGatewayCommand";
6
7
  export * from "./ImportHypervisorConfigurationCommand";
7
8
  export * from "./ListGatewaysCommand";
8
9
  export * from "./ListHypervisorsCommand";
@@ -13,4 +14,5 @@ export * from "./TagResourceCommand";
13
14
  export * from "./TestHypervisorConfigurationCommand";
14
15
  export * from "./UntagResourceCommand";
15
16
  export * from "./UpdateGatewayInformationCommand";
17
+ export * from "./UpdateGatewaySoftwareNowCommand";
16
18
  export * from "./UpdateHypervisorCommand";