@aws-sdk/client-migration-hub-refactor-spaces 3.109.0 → 3.117.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 CHANGED
@@ -3,6 +3,33 @@
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.117.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.116.0...v3.117.0) (2022-06-23)
7
+
8
+
9
+ ### Features
10
+
11
+ * **client-migration-hub-refactor-spaces:** This release adds the new API UpdateRoute that allows route to be updated to ACTIVE/INACTIVE state. In addition, CreateRoute API will now allow users to create route in ACTIVE/INACTIVE state. ([7cb6642](https://github.com/aws/aws-sdk-js-v3/commit/7cb66421811c0bbca5fbfd10d88e6e61cad620dd))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.112.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.111.0...v3.112.0) (2022-06-16)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-migration-hub-refactor-spaces
20
+
21
+
22
+
23
+
24
+
25
+ # [3.110.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.109.0...v3.110.0) (2022-06-14)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-migration-hub-refactor-spaces
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.109.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.108.1...v3.109.0) (2022-06-13)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-migration-hub-refactor-spaces
@@ -24,6 +24,7 @@ const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceComm
24
24
  const PutResourcePolicyCommand_1 = require("./commands/PutResourcePolicyCommand");
25
25
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
26
26
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
27
+ const UpdateRouteCommand_1 = require("./commands/UpdateRouteCommand");
27
28
  const MigrationHubRefactorSpacesClient_1 = require("./MigrationHubRefactorSpacesClient");
28
29
  class MigrationHubRefactorSpaces extends MigrationHubRefactorSpacesClient_1.MigrationHubRefactorSpacesClient {
29
30
  createApplication(args, optionsOrCb, cb) {
@@ -348,5 +349,19 @@ class MigrationHubRefactorSpaces extends MigrationHubRefactorSpacesClient_1.Migr
348
349
  return this.send(command, optionsOrCb);
349
350
  }
350
351
  }
352
+ updateRoute(args, optionsOrCb, cb) {
353
+ const command = new UpdateRouteCommand_1.UpdateRouteCommand(args);
354
+ if (typeof optionsOrCb === "function") {
355
+ this.send(command, optionsOrCb);
356
+ }
357
+ else if (typeof cb === "function") {
358
+ if (typeof optionsOrCb !== "object")
359
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
360
+ this.send(command, optionsOrCb || {}, cb);
361
+ }
362
+ else {
363
+ return this.send(command, optionsOrCb);
364
+ }
365
+ }
351
366
  }
352
367
  exports.MigrationHubRefactorSpaces = MigrationHubRefactorSpaces;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateRouteCommand = 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_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class UpdateRouteCommand 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 = "MigrationHubRefactorSpacesClient";
18
+ const commandName = "UpdateRouteCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.UpdateRouteRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.UpdateRouteResponse.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_restJson1_1.serializeAws_restJson1UpdateRouteCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_restJson1_1.deserializeAws_restJson1UpdateRouteCommand)(output, context);
34
+ }
35
+ }
36
+ exports.UpdateRouteCommand = UpdateRouteCommand;
@@ -24,3 +24,4 @@ tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
24
24
  tslib_1.__exportStar(require("./PutResourcePolicyCommand"), exports);
25
25
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
26
26
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
27
+ tslib_1.__exportStar(require("./UpdateRouteCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetApplicationResponse = exports.GetApplicationRequest = exports.EnvironmentVpc = exports.EnvironmentSummary = exports.DeleteServiceResponse = exports.DeleteServiceRequest = exports.DeleteRouteResponse = exports.DeleteRouteRequest = exports.DeleteResourcePolicyResponse = exports.DeleteResourcePolicyRequest = exports.DeleteEnvironmentResponse = exports.DeleteEnvironmentRequest = exports.DeleteApplicationResponse = exports.DeleteApplicationRequest = exports.CreateServiceResponse = exports.ServiceState = exports.CreateServiceRequest = exports.UrlEndpointInput = exports.LambdaEndpointInput = exports.ServiceEndpointType = exports.CreateRouteResponse = exports.RouteState = exports.CreateRouteRequest = exports.UriPathRouteInput = exports.HttpMethod = exports.RouteActivationState = exports.RouteType = exports.CreateEnvironmentResponse = exports.EnvironmentState = exports.CreateEnvironmentRequest = exports.NetworkFabricType = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.CreateApplicationResponse = exports.CreateApplicationRequest = exports.ConflictException = exports.ApplicationSummary = exports.ProxyType = exports.ErrorResponse = exports.ErrorResourceType = exports.ErrorCode = exports.ApplicationState = exports.ApiGatewayProxySummary = exports.ApiGatewayProxyInput = exports.ApiGatewayProxyConfig = exports.ApiGatewayEndpointType = exports.AccessDeniedException = void 0;
4
- exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.PutResourcePolicyResponse = exports.PutResourcePolicyRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListServicesResponse = exports.ServiceSummary = exports.UrlEndpointSummary = exports.ListServicesRequest = exports.ListRoutesResponse = exports.RouteSummary = exports.ListRoutesRequest = exports.ListEnvironmentVpcsResponse = exports.ListEnvironmentVpcsRequest = exports.ListEnvironmentsResponse = exports.ListEnvironmentsRequest = exports.ListApplicationsResponse = exports.ListApplicationsRequest = exports.LambdaEndpointSummary = exports.InvalidResourcePolicyException = exports.GetServiceResponse = exports.UrlEndpointConfig = exports.LambdaEndpointConfig = exports.GetServiceRequest = exports.GetRouteResponse = exports.GetRouteRequest = exports.GetResourcePolicyResponse = exports.GetResourcePolicyRequest = exports.GetEnvironmentResponse = exports.GetEnvironmentRequest = void 0;
3
+ exports.GetApplicationRequest = exports.EnvironmentVpc = exports.EnvironmentSummary = exports.DeleteServiceResponse = exports.DeleteServiceRequest = exports.DeleteRouteResponse = exports.DeleteRouteRequest = exports.DeleteResourcePolicyResponse = exports.DeleteResourcePolicyRequest = exports.DeleteEnvironmentResponse = exports.DeleteEnvironmentRequest = exports.DeleteApplicationResponse = exports.DeleteApplicationRequest = exports.CreateServiceResponse = exports.ServiceState = exports.CreateServiceRequest = exports.UrlEndpointInput = exports.LambdaEndpointInput = exports.ServiceEndpointType = exports.CreateRouteResponse = exports.RouteState = exports.CreateRouteRequest = exports.UriPathRouteInput = exports.HttpMethod = exports.RouteType = exports.DefaultRouteInput = exports.RouteActivationState = exports.CreateEnvironmentResponse = exports.EnvironmentState = exports.CreateEnvironmentRequest = exports.NetworkFabricType = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.CreateApplicationResponse = exports.CreateApplicationRequest = exports.ConflictException = exports.ApplicationSummary = exports.ProxyType = exports.ErrorResponse = exports.ErrorResourceType = exports.ErrorCode = exports.ApplicationState = exports.ApiGatewayProxySummary = exports.ApiGatewayProxyInput = exports.ApiGatewayProxyConfig = exports.ApiGatewayEndpointType = exports.AccessDeniedException = void 0;
4
+ exports.UpdateRouteResponse = exports.UpdateRouteRequest = exports.UntagResourceResponse = exports.UntagResourceRequest = exports.TagResourceResponse = exports.TagResourceRequest = exports.PutResourcePolicyResponse = exports.PutResourcePolicyRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListServicesResponse = exports.ServiceSummary = exports.UrlEndpointSummary = exports.ListServicesRequest = exports.ListRoutesResponse = exports.RouteSummary = exports.ListRoutesRequest = exports.ListEnvironmentVpcsResponse = exports.ListEnvironmentVpcsRequest = exports.ListEnvironmentsResponse = exports.ListEnvironmentsRequest = exports.ListApplicationsResponse = exports.ListApplicationsRequest = exports.LambdaEndpointSummary = exports.InvalidResourcePolicyException = exports.GetServiceResponse = exports.UrlEndpointConfig = exports.LambdaEndpointConfig = exports.GetServiceRequest = exports.GetRouteResponse = exports.GetRouteRequest = exports.GetResourcePolicyResponse = exports.GetResourcePolicyRequest = exports.GetEnvironmentResponse = exports.GetEnvironmentRequest = exports.GetApplicationResponse = void 0;
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const MigrationHubRefactorSpacesServiceException_1 = require("./MigrationHubRefactorSpacesServiceException");
7
7
  class AccessDeniedException extends MigrationHubRefactorSpacesServiceException_1.MigrationHubRefactorSpacesServiceException {
@@ -237,15 +237,22 @@ var CreateEnvironmentResponse;
237
237
  ...(obj.Tags && { Tags: smithy_client_1.SENSITIVE_STRING }),
238
238
  });
239
239
  })(CreateEnvironmentResponse = exports.CreateEnvironmentResponse || (exports.CreateEnvironmentResponse = {}));
240
+ var RouteActivationState;
241
+ (function (RouteActivationState) {
242
+ RouteActivationState["ACTIVE"] = "ACTIVE";
243
+ RouteActivationState["INACTIVE"] = "INACTIVE";
244
+ })(RouteActivationState = exports.RouteActivationState || (exports.RouteActivationState = {}));
245
+ var DefaultRouteInput;
246
+ (function (DefaultRouteInput) {
247
+ DefaultRouteInput.filterSensitiveLog = (obj) => ({
248
+ ...obj,
249
+ });
250
+ })(DefaultRouteInput = exports.DefaultRouteInput || (exports.DefaultRouteInput = {}));
240
251
  var RouteType;
241
252
  (function (RouteType) {
242
253
  RouteType["DEFAULT"] = "DEFAULT";
243
254
  RouteType["URI_PATH"] = "URI_PATH";
244
255
  })(RouteType = exports.RouteType || (exports.RouteType = {}));
245
- var RouteActivationState;
246
- (function (RouteActivationState) {
247
- RouteActivationState["ACTIVE"] = "ACTIVE";
248
- })(RouteActivationState = exports.RouteActivationState || (exports.RouteActivationState = {}));
249
256
  var HttpMethod;
250
257
  (function (HttpMethod) {
251
258
  HttpMethod["DELETE"] = "DELETE";
@@ -635,3 +642,15 @@ var UntagResourceResponse;
635
642
  ...obj,
636
643
  });
637
644
  })(UntagResourceResponse = exports.UntagResourceResponse || (exports.UntagResourceResponse = {}));
645
+ var UpdateRouteRequest;
646
+ (function (UpdateRouteRequest) {
647
+ UpdateRouteRequest.filterSensitiveLog = (obj) => ({
648
+ ...obj,
649
+ });
650
+ })(UpdateRouteRequest = exports.UpdateRouteRequest || (exports.UpdateRouteRequest = {}));
651
+ var UpdateRouteResponse;
652
+ (function (UpdateRouteResponse) {
653
+ UpdateRouteResponse.filterSensitiveLog = (obj) => ({
654
+ ...obj,
655
+ });
656
+ })(UpdateRouteResponse = exports.UpdateRouteResponse || (exports.UpdateRouteResponse = {}));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutResourcePolicyCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListServicesCommand = exports.deserializeAws_restJson1ListRoutesCommand = exports.deserializeAws_restJson1ListEnvironmentVpcsCommand = exports.deserializeAws_restJson1ListEnvironmentsCommand = exports.deserializeAws_restJson1ListApplicationsCommand = exports.deserializeAws_restJson1GetServiceCommand = exports.deserializeAws_restJson1GetRouteCommand = exports.deserializeAws_restJson1GetResourcePolicyCommand = exports.deserializeAws_restJson1GetEnvironmentCommand = exports.deserializeAws_restJson1GetApplicationCommand = exports.deserializeAws_restJson1DeleteServiceCommand = exports.deserializeAws_restJson1DeleteRouteCommand = exports.deserializeAws_restJson1DeleteResourcePolicyCommand = exports.deserializeAws_restJson1DeleteEnvironmentCommand = exports.deserializeAws_restJson1DeleteApplicationCommand = exports.deserializeAws_restJson1CreateServiceCommand = exports.deserializeAws_restJson1CreateRouteCommand = exports.deserializeAws_restJson1CreateEnvironmentCommand = exports.deserializeAws_restJson1CreateApplicationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutResourcePolicyCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListServicesCommand = exports.serializeAws_restJson1ListRoutesCommand = exports.serializeAws_restJson1ListEnvironmentVpcsCommand = exports.serializeAws_restJson1ListEnvironmentsCommand = exports.serializeAws_restJson1ListApplicationsCommand = exports.serializeAws_restJson1GetServiceCommand = exports.serializeAws_restJson1GetRouteCommand = exports.serializeAws_restJson1GetResourcePolicyCommand = exports.serializeAws_restJson1GetEnvironmentCommand = exports.serializeAws_restJson1GetApplicationCommand = exports.serializeAws_restJson1DeleteServiceCommand = exports.serializeAws_restJson1DeleteRouteCommand = exports.serializeAws_restJson1DeleteResourcePolicyCommand = exports.serializeAws_restJson1DeleteEnvironmentCommand = exports.serializeAws_restJson1DeleteApplicationCommand = exports.serializeAws_restJson1CreateServiceCommand = exports.serializeAws_restJson1CreateRouteCommand = exports.serializeAws_restJson1CreateEnvironmentCommand = exports.serializeAws_restJson1CreateApplicationCommand = void 0;
3
+ exports.deserializeAws_restJson1UpdateRouteCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1PutResourcePolicyCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListServicesCommand = exports.deserializeAws_restJson1ListRoutesCommand = exports.deserializeAws_restJson1ListEnvironmentVpcsCommand = exports.deserializeAws_restJson1ListEnvironmentsCommand = exports.deserializeAws_restJson1ListApplicationsCommand = exports.deserializeAws_restJson1GetServiceCommand = exports.deserializeAws_restJson1GetRouteCommand = exports.deserializeAws_restJson1GetResourcePolicyCommand = exports.deserializeAws_restJson1GetEnvironmentCommand = exports.deserializeAws_restJson1GetApplicationCommand = exports.deserializeAws_restJson1DeleteServiceCommand = exports.deserializeAws_restJson1DeleteRouteCommand = exports.deserializeAws_restJson1DeleteResourcePolicyCommand = exports.deserializeAws_restJson1DeleteEnvironmentCommand = exports.deserializeAws_restJson1DeleteApplicationCommand = exports.deserializeAws_restJson1CreateServiceCommand = exports.deserializeAws_restJson1CreateRouteCommand = exports.deserializeAws_restJson1CreateEnvironmentCommand = exports.deserializeAws_restJson1CreateApplicationCommand = exports.serializeAws_restJson1UpdateRouteCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1PutResourcePolicyCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListServicesCommand = exports.serializeAws_restJson1ListRoutesCommand = exports.serializeAws_restJson1ListEnvironmentVpcsCommand = exports.serializeAws_restJson1ListEnvironmentsCommand = exports.serializeAws_restJson1ListApplicationsCommand = exports.serializeAws_restJson1GetServiceCommand = exports.serializeAws_restJson1GetRouteCommand = exports.serializeAws_restJson1GetResourcePolicyCommand = exports.serializeAws_restJson1GetEnvironmentCommand = exports.serializeAws_restJson1GetApplicationCommand = exports.serializeAws_restJson1DeleteServiceCommand = exports.serializeAws_restJson1DeleteRouteCommand = exports.serializeAws_restJson1DeleteResourcePolicyCommand = exports.serializeAws_restJson1DeleteEnvironmentCommand = exports.serializeAws_restJson1DeleteApplicationCommand = exports.serializeAws_restJson1CreateServiceCommand = exports.serializeAws_restJson1CreateRouteCommand = exports.serializeAws_restJson1CreateEnvironmentCommand = exports.serializeAws_restJson1CreateApplicationCommand = 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 uuid_1 = require("uuid");
@@ -105,6 +105,10 @@ const serializeAws_restJson1CreateRouteCommand = async (input, context) => {
105
105
  let body;
106
106
  body = JSON.stringify({
107
107
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
108
+ ...(input.DefaultRoute !== undefined &&
109
+ input.DefaultRoute !== null && {
110
+ DefaultRoute: serializeAws_restJson1DefaultRouteInput(input.DefaultRoute, context),
111
+ }),
108
112
  ...(input.RouteType !== undefined && input.RouteType !== null && { RouteType: input.RouteType }),
109
113
  ...(input.ServiceIdentifier !== undefined &&
110
114
  input.ServiceIdentifier !== null && { ServiceIdentifier: input.ServiceIdentifier }),
@@ -825,6 +829,59 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
825
829
  });
826
830
  };
827
831
  exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
832
+ const serializeAws_restJson1UpdateRouteCommand = async (input, context) => {
833
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
834
+ const headers = {
835
+ "content-type": "application/json",
836
+ };
837
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
838
+ "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}";
839
+ if (input.EnvironmentIdentifier !== undefined) {
840
+ const labelValue = input.EnvironmentIdentifier;
841
+ if (labelValue.length <= 0) {
842
+ throw new Error("Empty value provided for input HTTP label: EnvironmentIdentifier.");
843
+ }
844
+ resolvedPath = resolvedPath.replace("{EnvironmentIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
845
+ }
846
+ else {
847
+ throw new Error("No value provided for input HTTP label: EnvironmentIdentifier.");
848
+ }
849
+ if (input.ApplicationIdentifier !== undefined) {
850
+ const labelValue = input.ApplicationIdentifier;
851
+ if (labelValue.length <= 0) {
852
+ throw new Error("Empty value provided for input HTTP label: ApplicationIdentifier.");
853
+ }
854
+ resolvedPath = resolvedPath.replace("{ApplicationIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
855
+ }
856
+ else {
857
+ throw new Error("No value provided for input HTTP label: ApplicationIdentifier.");
858
+ }
859
+ if (input.RouteIdentifier !== undefined) {
860
+ const labelValue = input.RouteIdentifier;
861
+ if (labelValue.length <= 0) {
862
+ throw new Error("Empty value provided for input HTTP label: RouteIdentifier.");
863
+ }
864
+ resolvedPath = resolvedPath.replace("{RouteIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
865
+ }
866
+ else {
867
+ throw new Error("No value provided for input HTTP label: RouteIdentifier.");
868
+ }
869
+ let body;
870
+ body = JSON.stringify({
871
+ ...(input.ActivationState !== undefined &&
872
+ input.ActivationState !== null && { ActivationState: input.ActivationState }),
873
+ });
874
+ return new protocol_http_1.HttpRequest({
875
+ protocol,
876
+ hostname,
877
+ port,
878
+ method: "PATCH",
879
+ headers,
880
+ path: resolvedPath,
881
+ body,
882
+ });
883
+ };
884
+ exports.serializeAws_restJson1UpdateRouteCommand = serializeAws_restJson1UpdateRouteCommand;
828
885
  const deserializeAws_restJson1CreateApplicationCommand = async (output, context) => {
829
886
  if (output.statusCode !== 200 && output.statusCode >= 300) {
830
887
  return deserializeAws_restJson1CreateApplicationCommandError(output, context);
@@ -2487,6 +2544,75 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2487
2544
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2488
2545
  }
2489
2546
  };
2547
+ const deserializeAws_restJson1UpdateRouteCommand = async (output, context) => {
2548
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2549
+ return deserializeAws_restJson1UpdateRouteCommandError(output, context);
2550
+ }
2551
+ const contents = {
2552
+ $metadata: deserializeMetadata(output),
2553
+ ApplicationId: undefined,
2554
+ Arn: undefined,
2555
+ LastUpdatedTime: undefined,
2556
+ RouteId: undefined,
2557
+ ServiceId: undefined,
2558
+ State: undefined,
2559
+ };
2560
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2561
+ if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
2562
+ contents.ApplicationId = (0, smithy_client_1.expectString)(data.ApplicationId);
2563
+ }
2564
+ if (data.Arn !== undefined && data.Arn !== null) {
2565
+ contents.Arn = (0, smithy_client_1.expectString)(data.Arn);
2566
+ }
2567
+ if (data.LastUpdatedTime !== undefined && data.LastUpdatedTime !== null) {
2568
+ contents.LastUpdatedTime = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.LastUpdatedTime)));
2569
+ }
2570
+ if (data.RouteId !== undefined && data.RouteId !== null) {
2571
+ contents.RouteId = (0, smithy_client_1.expectString)(data.RouteId);
2572
+ }
2573
+ if (data.ServiceId !== undefined && data.ServiceId !== null) {
2574
+ contents.ServiceId = (0, smithy_client_1.expectString)(data.ServiceId);
2575
+ }
2576
+ if (data.State !== undefined && data.State !== null) {
2577
+ contents.State = (0, smithy_client_1.expectString)(data.State);
2578
+ }
2579
+ return Promise.resolve(contents);
2580
+ };
2581
+ exports.deserializeAws_restJson1UpdateRouteCommand = deserializeAws_restJson1UpdateRouteCommand;
2582
+ const deserializeAws_restJson1UpdateRouteCommandError = async (output, context) => {
2583
+ const parsedOutput = {
2584
+ ...output,
2585
+ body: await parseBody(output.body, context),
2586
+ };
2587
+ let response;
2588
+ let errorCode = "UnknownError";
2589
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2590
+ switch (errorCode) {
2591
+ case "AccessDeniedException":
2592
+ case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException":
2593
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
2594
+ case "InternalServerException":
2595
+ case "com.amazonaws.migrationhubrefactorspaces#InternalServerException":
2596
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
2597
+ case "ResourceNotFoundException":
2598
+ case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException":
2599
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
2600
+ case "ThrottlingException":
2601
+ case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException":
2602
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
2603
+ case "ValidationException":
2604
+ case "com.amazonaws.migrationhubrefactorspaces#ValidationException":
2605
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2606
+ default:
2607
+ const parsedBody = parsedOutput.body;
2608
+ response = new MigrationHubRefactorSpacesServiceException_1.MigrationHubRefactorSpacesServiceException({
2609
+ name: parsedBody.code || parsedBody.Code || errorCode,
2610
+ $fault: "client",
2611
+ $metadata: deserializeMetadata(output),
2612
+ });
2613
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2614
+ }
2615
+ };
2490
2616
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
2491
2617
  const contents = {};
2492
2618
  const data = parsedOutput.body;
@@ -2622,6 +2748,12 @@ const serializeAws_restJson1ApiGatewayProxyInput = (input, context) => {
2622
2748
  ...(input.StageName !== undefined && input.StageName !== null && { StageName: input.StageName }),
2623
2749
  };
2624
2750
  };
2751
+ const serializeAws_restJson1DefaultRouteInput = (input, context) => {
2752
+ return {
2753
+ ...(input.ActivationState !== undefined &&
2754
+ input.ActivationState !== null && { ActivationState: input.ActivationState }),
2755
+ };
2756
+ };
2625
2757
  const serializeAws_restJson1HttpMethods = (input, context) => {
2626
2758
  return input
2627
2759
  .filter((e) => e != null)
@@ -22,6 +22,7 @@ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceComma
22
22
  import { PutResourcePolicyCommand, } from "./commands/PutResourcePolicyCommand";
23
23
  import { TagResourceCommand } from "./commands/TagResourceCommand";
24
24
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
25
+ import { UpdateRouteCommand } from "./commands/UpdateRouteCommand";
25
26
  import { MigrationHubRefactorSpacesClient } from "./MigrationHubRefactorSpacesClient";
26
27
  var MigrationHubRefactorSpaces = (function (_super) {
27
28
  __extends(MigrationHubRefactorSpaces, _super);
@@ -350,6 +351,20 @@ var MigrationHubRefactorSpaces = (function (_super) {
350
351
  return this.send(command, optionsOrCb);
351
352
  }
352
353
  };
354
+ MigrationHubRefactorSpaces.prototype.updateRoute = function (args, optionsOrCb, cb) {
355
+ var command = new UpdateRouteCommand(args);
356
+ if (typeof optionsOrCb === "function") {
357
+ this.send(command, optionsOrCb);
358
+ }
359
+ else if (typeof cb === "function") {
360
+ if (typeof optionsOrCb !== "object")
361
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
362
+ this.send(command, optionsOrCb || {}, cb);
363
+ }
364
+ else {
365
+ return this.send(command, optionsOrCb);
366
+ }
367
+ };
353
368
  return MigrationHubRefactorSpaces;
354
369
  }(MigrationHubRefactorSpacesClient));
355
370
  export { MigrationHubRefactorSpaces };
@@ -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 { UpdateRouteRequest, UpdateRouteResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1UpdateRouteCommand, serializeAws_restJson1UpdateRouteCommand, } from "../protocols/Aws_restJson1";
6
+ var UpdateRouteCommand = (function (_super) {
7
+ __extends(UpdateRouteCommand, _super);
8
+ function UpdateRouteCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ UpdateRouteCommand.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 = "MigrationHubRefactorSpacesClient";
18
+ var commandName = "UpdateRouteCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: UpdateRouteRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: UpdateRouteResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ UpdateRouteCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1UpdateRouteCommand(input, context);
33
+ };
34
+ UpdateRouteCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1UpdateRouteCommand(output, context);
36
+ };
37
+ return UpdateRouteCommand;
38
+ }($Command));
39
+ export { UpdateRouteCommand };
@@ -21,3 +21,4 @@ export * from "./ListTagsForResourceCommand";
21
21
  export * from "./PutResourcePolicyCommand";
22
22
  export * from "./TagResourceCommand";
23
23
  export * from "./UntagResourceCommand";
24
+ export * from "./UpdateRouteCommand";
@@ -204,15 +204,20 @@ export var CreateEnvironmentResponse;
204
204
  (function (CreateEnvironmentResponse) {
205
205
  CreateEnvironmentResponse.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Tags && { Tags: SENSITIVE_STRING }))); };
206
206
  })(CreateEnvironmentResponse || (CreateEnvironmentResponse = {}));
207
+ export var RouteActivationState;
208
+ (function (RouteActivationState) {
209
+ RouteActivationState["ACTIVE"] = "ACTIVE";
210
+ RouteActivationState["INACTIVE"] = "INACTIVE";
211
+ })(RouteActivationState || (RouteActivationState = {}));
212
+ export var DefaultRouteInput;
213
+ (function (DefaultRouteInput) {
214
+ DefaultRouteInput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
215
+ })(DefaultRouteInput || (DefaultRouteInput = {}));
207
216
  export var RouteType;
208
217
  (function (RouteType) {
209
218
  RouteType["DEFAULT"] = "DEFAULT";
210
219
  RouteType["URI_PATH"] = "URI_PATH";
211
220
  })(RouteType || (RouteType = {}));
212
- export var RouteActivationState;
213
- (function (RouteActivationState) {
214
- RouteActivationState["ACTIVE"] = "ACTIVE";
215
- })(RouteActivationState || (RouteActivationState = {}));
216
221
  export var HttpMethod;
217
222
  (function (HttpMethod) {
218
223
  HttpMethod["DELETE"] = "DELETE";
@@ -477,3 +482,11 @@ export var UntagResourceResponse;
477
482
  (function (UntagResourceResponse) {
478
483
  UntagResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
479
484
  })(UntagResourceResponse || (UntagResourceResponse = {}));
485
+ export var UpdateRouteRequest;
486
+ (function (UpdateRouteRequest) {
487
+ UpdateRouteRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
488
+ })(UpdateRouteRequest || (UpdateRouteRequest = {}));
489
+ export var UpdateRouteResponse;
490
+ (function (UpdateRouteResponse) {
491
+ UpdateRouteResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
492
+ })(UpdateRouteResponse || (UpdateRouteResponse = {}));
@@ -102,7 +102,10 @@ export var serializeAws_restJson1CreateRouteCommand = function (input, context)
102
102
  else {
103
103
  throw new Error("No value provided for input HTTP label: ApplicationIdentifier.");
104
104
  }
105
- body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.RouteType !== undefined && input.RouteType !== null && { RouteType: input.RouteType })), (input.ServiceIdentifier !== undefined &&
105
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.DefaultRoute !== undefined &&
106
+ input.DefaultRoute !== null && {
107
+ DefaultRoute: serializeAws_restJson1DefaultRouteInput(input.DefaultRoute, context),
108
+ })), (input.RouteType !== undefined && input.RouteType !== null && { RouteType: input.RouteType })), (input.ServiceIdentifier !== undefined &&
106
109
  input.ServiceIdentifier !== null && { ServiceIdentifier: input.ServiceIdentifier })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })), (input.UriPathRoute !== undefined &&
107
110
  input.UriPathRoute !== null && {
108
111
  UriPathRoute: serializeAws_restJson1UriPathRouteInput(input.UriPathRoute, context),
@@ -888,6 +891,62 @@ export var serializeAws_restJson1UntagResourceCommand = function (input, context
888
891
  }
889
892
  });
890
893
  }); };
894
+ export var serializeAws_restJson1UpdateRouteCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
895
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, labelValue, body;
896
+ return __generator(this, function (_c) {
897
+ switch (_c.label) {
898
+ case 0: return [4, context.endpoint()];
899
+ case 1:
900
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
901
+ headers = {
902
+ "content-type": "application/json",
903
+ };
904
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
905
+ "/environments/{EnvironmentIdentifier}/applications/{ApplicationIdentifier}/routes/{RouteIdentifier}";
906
+ if (input.EnvironmentIdentifier !== undefined) {
907
+ labelValue = input.EnvironmentIdentifier;
908
+ if (labelValue.length <= 0) {
909
+ throw new Error("Empty value provided for input HTTP label: EnvironmentIdentifier.");
910
+ }
911
+ resolvedPath = resolvedPath.replace("{EnvironmentIdentifier}", __extendedEncodeURIComponent(labelValue));
912
+ }
913
+ else {
914
+ throw new Error("No value provided for input HTTP label: EnvironmentIdentifier.");
915
+ }
916
+ if (input.ApplicationIdentifier !== undefined) {
917
+ labelValue = input.ApplicationIdentifier;
918
+ if (labelValue.length <= 0) {
919
+ throw new Error("Empty value provided for input HTTP label: ApplicationIdentifier.");
920
+ }
921
+ resolvedPath = resolvedPath.replace("{ApplicationIdentifier}", __extendedEncodeURIComponent(labelValue));
922
+ }
923
+ else {
924
+ throw new Error("No value provided for input HTTP label: ApplicationIdentifier.");
925
+ }
926
+ if (input.RouteIdentifier !== undefined) {
927
+ labelValue = input.RouteIdentifier;
928
+ if (labelValue.length <= 0) {
929
+ throw new Error("Empty value provided for input HTTP label: RouteIdentifier.");
930
+ }
931
+ resolvedPath = resolvedPath.replace("{RouteIdentifier}", __extendedEncodeURIComponent(labelValue));
932
+ }
933
+ else {
934
+ throw new Error("No value provided for input HTTP label: RouteIdentifier.");
935
+ }
936
+ body = JSON.stringify(__assign({}, (input.ActivationState !== undefined &&
937
+ input.ActivationState !== null && { ActivationState: input.ActivationState })));
938
+ return [2, new __HttpRequest({
939
+ protocol: protocol,
940
+ hostname: hostname,
941
+ port: port,
942
+ method: "PATCH",
943
+ headers: headers,
944
+ path: resolvedPath,
945
+ body: body,
946
+ })];
947
+ }
948
+ });
949
+ }); };
891
950
  export var deserializeAws_restJson1CreateApplicationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
892
951
  var contents, data, _a, _b;
893
952
  return __generator(this, function (_c) {
@@ -3084,6 +3143,98 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
3084
3143
  }
3085
3144
  });
3086
3145
  }); };
3146
+ export var deserializeAws_restJson1UpdateRouteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3147
+ var contents, data, _a, _b;
3148
+ return __generator(this, function (_c) {
3149
+ switch (_c.label) {
3150
+ case 0:
3151
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3152
+ return [2, deserializeAws_restJson1UpdateRouteCommandError(output, context)];
3153
+ }
3154
+ contents = {
3155
+ $metadata: deserializeMetadata(output),
3156
+ ApplicationId: undefined,
3157
+ Arn: undefined,
3158
+ LastUpdatedTime: undefined,
3159
+ RouteId: undefined,
3160
+ ServiceId: undefined,
3161
+ State: undefined,
3162
+ };
3163
+ _a = __expectNonNull;
3164
+ _b = __expectObject;
3165
+ return [4, parseBody(output.body, context)];
3166
+ case 1:
3167
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3168
+ if (data.ApplicationId !== undefined && data.ApplicationId !== null) {
3169
+ contents.ApplicationId = __expectString(data.ApplicationId);
3170
+ }
3171
+ if (data.Arn !== undefined && data.Arn !== null) {
3172
+ contents.Arn = __expectString(data.Arn);
3173
+ }
3174
+ if (data.LastUpdatedTime !== undefined && data.LastUpdatedTime !== null) {
3175
+ contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime)));
3176
+ }
3177
+ if (data.RouteId !== undefined && data.RouteId !== null) {
3178
+ contents.RouteId = __expectString(data.RouteId);
3179
+ }
3180
+ if (data.ServiceId !== undefined && data.ServiceId !== null) {
3181
+ contents.ServiceId = __expectString(data.ServiceId);
3182
+ }
3183
+ if (data.State !== undefined && data.State !== null) {
3184
+ contents.State = __expectString(data.State);
3185
+ }
3186
+ return [2, Promise.resolve(contents)];
3187
+ }
3188
+ });
3189
+ }); };
3190
+ var deserializeAws_restJson1UpdateRouteCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3191
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
3192
+ var _c;
3193
+ return __generator(this, function (_d) {
3194
+ switch (_d.label) {
3195
+ case 0:
3196
+ _a = [__assign({}, output)];
3197
+ _c = {};
3198
+ return [4, parseBody(output.body, context)];
3199
+ case 1:
3200
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3201
+ errorCode = "UnknownError";
3202
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3203
+ _b = errorCode;
3204
+ switch (_b) {
3205
+ case "AccessDeniedException": return [3, 2];
3206
+ case "com.amazonaws.migrationhubrefactorspaces#AccessDeniedException": return [3, 2];
3207
+ case "InternalServerException": return [3, 4];
3208
+ case "com.amazonaws.migrationhubrefactorspaces#InternalServerException": return [3, 4];
3209
+ case "ResourceNotFoundException": return [3, 6];
3210
+ case "com.amazonaws.migrationhubrefactorspaces#ResourceNotFoundException": return [3, 6];
3211
+ case "ThrottlingException": return [3, 8];
3212
+ case "com.amazonaws.migrationhubrefactorspaces#ThrottlingException": return [3, 8];
3213
+ case "ValidationException": return [3, 10];
3214
+ case "com.amazonaws.migrationhubrefactorspaces#ValidationException": return [3, 10];
3215
+ }
3216
+ return [3, 12];
3217
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
3218
+ case 3: throw _d.sent();
3219
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
3220
+ case 5: throw _d.sent();
3221
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
3222
+ case 7: throw _d.sent();
3223
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
3224
+ case 9: throw _d.sent();
3225
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
3226
+ case 11: throw _d.sent();
3227
+ case 12:
3228
+ parsedBody = parsedOutput.body;
3229
+ response = new __BaseException({
3230
+ name: parsedBody.code || parsedBody.Code || errorCode,
3231
+ $fault: "client",
3232
+ $metadata: deserializeMetadata(output),
3233
+ });
3234
+ throw __decorateServiceException(response, parsedBody);
3235
+ }
3236
+ });
3237
+ }); };
3087
3238
  var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
3088
3239
  var contents, data, exception;
3089
3240
  return __generator(this, function (_a) {
@@ -3216,6 +3367,10 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
3216
3367
  var serializeAws_restJson1ApiGatewayProxyInput = function (input, context) {
3217
3368
  return __assign(__assign({}, (input.EndpointType !== undefined && input.EndpointType !== null && { EndpointType: input.EndpointType })), (input.StageName !== undefined && input.StageName !== null && { StageName: input.StageName }));
3218
3369
  };
3370
+ var serializeAws_restJson1DefaultRouteInput = function (input, context) {
3371
+ return __assign({}, (input.ActivationState !== undefined &&
3372
+ input.ActivationState !== null && { ActivationState: input.ActivationState }));
3373
+ };
3219
3374
  var serializeAws_restJson1HttpMethods = function (input, context) {
3220
3375
  return input
3221
3376
  .filter(function (e) { return e != null; })