updateRoute method

Future<UpdateRouteResponse> updateRoute({
  1. required RouteActivationState activationState,
  2. required String applicationIdentifier,
  3. required String environmentIdentifier,
  4. required String routeIdentifier,
})

Updates an Amazon Web Services Migration Hub Refactor Spaces route.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter activationState : If set to ACTIVE, traffic is forwarded to this route’s service after the route is updated.

Parameter applicationIdentifier : The ID of the application within which the route is being updated.

Parameter environmentIdentifier : The ID of the environment in which the route is being updated.

Parameter routeIdentifier : The unique identifier of the route to update.

Implementation

Future<UpdateRouteResponse> updateRoute({
  required RouteActivationState activationState,
  required String applicationIdentifier,
  required String environmentIdentifier,
  required String routeIdentifier,
}) async {
  final $payload = <String, dynamic>{
    'ActivationState': activationState.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/environments/${Uri.encodeComponent(environmentIdentifier)}/applications/${Uri.encodeComponent(applicationIdentifier)}/routes/${Uri.encodeComponent(routeIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateRouteResponse.fromJson(response);
}