describeRoute method

Future<DescribeRouteOutput> describeRoute({
  1. required String meshName,
  2. required String routeName,
  3. required String virtualRouterName,
})

Describes an existing route.

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

Parameter meshName : The name of the service mesh in which the route resides.

Parameter routeName : The name of the route to describe.

Parameter virtualRouterName : The name of the virtual router with which the route is associated.

Implementation

Future<DescribeRouteOutput> describeRoute({
  required String meshName,
  required String routeName,
  required String virtualRouterName,
}) async {
  ArgumentError.checkNotNull(meshName, 'meshName');
  _s.validateStringLength(
    'meshName',
    meshName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(routeName, 'routeName');
  _s.validateStringLength(
    'routeName',
    routeName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(virtualRouterName, 'virtualRouterName');
  _s.validateStringLength(
    'virtualRouterName',
    virtualRouterName,
    1,
    255,
    isRequired: true,
  );
  final response = await _protocol.sendRaw(
    payload: null,
    method: 'GET',
    requestUri:
        '/meshes/${Uri.encodeComponent(meshName)}/virtualRouter/${Uri.encodeComponent(virtualRouterName)}/routes/${Uri.encodeComponent(routeName)}',
    exceptionFnMap: _exceptionFns,
  );
  final $json = await _s.jsonFromResponse(response);
  return DescribeRouteOutput(
    route: RouteData.fromJson($json),
  );
}