getStages method

Future<Stages> getStages({
  1. required String restApiId,
  2. String? deploymentId,
})

Gets information about one or more Stage resources.

May throw BadRequestException. May throw ConflictException. May throw LimitExceededException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter restApiId : The string identifier of the associated RestApi.

Parameter deploymentId : The stages' deployment identifiers.

Implementation

Future<Stages> getStages({
  required String restApiId,
  String? deploymentId,
}) async {
  final $query = <String, List<String>>{
    if (deploymentId != null) 'deploymentId': [deploymentId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/restapis/${Uri.encodeComponent(restApiId)}/stages',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return Stages.fromJson(response);
}