deleteGatewayRoute method

Future<DeleteGatewayRouteOutput> deleteGatewayRoute({
  1. required String gatewayRouteName,
  2. required String meshName,
  3. required String virtualGatewayName,
  4. String? meshOwner,
})

Deletes an existing gateway route.

May throw NotFoundException. May throw BadRequestException. May throw TooManyRequestsException. May throw ForbiddenException. May throw ResourceInUseException. May throw ServiceUnavailableException. May throw InternalServerErrorException.

Parameter gatewayRouteName : The name of the gateway route to delete.

Parameter meshName : The name of the service mesh to delete the gateway route from.

Parameter virtualGatewayName : The name of the virtual gateway to delete the route from.

Parameter meshOwner : The AWS IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes.

Implementation

Future<DeleteGatewayRouteOutput> deleteGatewayRoute({
  required String gatewayRouteName,
  required String meshName,
  required String virtualGatewayName,
  String? meshOwner,
}) async {
  ArgumentError.checkNotNull(gatewayRouteName, 'gatewayRouteName');
  _s.validateStringLength(
    'gatewayRouteName',
    gatewayRouteName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(meshName, 'meshName');
  _s.validateStringLength(
    'meshName',
    meshName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(virtualGatewayName, 'virtualGatewayName');
  _s.validateStringLength(
    'virtualGatewayName',
    virtualGatewayName,
    1,
    255,
    isRequired: true,
  );
  _s.validateStringLength(
    'meshOwner',
    meshOwner,
    12,
    12,
  );
  final $query = <String, List<String>>{
    if (meshOwner != null) 'meshOwner': [meshOwner],
  };
  final response = await _protocol.sendRaw(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/v20190125/meshes/${Uri.encodeComponent(meshName)}/virtualGateway/${Uri.encodeComponent(virtualGatewayName)}/gatewayRoutes/${Uri.encodeComponent(gatewayRouteName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return DeleteGatewayRouteOutput(
    gatewayRoute: GatewayRouteData.fromJson($json),
  );
}