getStage method

Future<GetStageResponse> getStage({
  1. required String apiId,
  2. required String stageName,
})

Gets a Stage.

May throw NotFoundException. May throw TooManyRequestsException.

Parameter apiId : The API identifier.

Parameter stageName : The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

Implementation

Future<GetStageResponse> getStage({
  required String apiId,
  required String stageName,
}) async {
  ArgumentError.checkNotNull(apiId, 'apiId');
  ArgumentError.checkNotNull(stageName, 'stageName');
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/apis/${Uri.encodeComponent(apiId)}/stages/${Uri.encodeComponent(stageName)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetStageResponse.fromJson(response);
}