getStages method
Gets information about one or more Stage resources.
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
Parameter restApiId
:
Required
The string identifier of the associated RestApi.
Parameter deploymentId
:
The stages' deployment identifiers.
Implementation
Future<Stages> getStages({
required String restApiId,
String? deploymentId,
}) async {
ArgumentError.checkNotNull(restApiId, 'restApiId');
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);
}