getMethodResponse method

Future<MethodResponse> getMethodResponse({
  1. required String httpMethod,
  2. required String resourceId,
  3. required String restApiId,
  4. required String statusCode,
})

Describes a MethodResponse resource.

May throw NotFoundException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter httpMethod : The HTTP verb of the Method resource.

Parameter resourceId : The Resource identifier for the MethodResponse resource.

Parameter restApiId : The string identifier of the associated RestApi.

Parameter statusCode : The status code for the MethodResponse resource.

Implementation

Future<MethodResponse> getMethodResponse({
  required String httpMethod,
  required String resourceId,
  required String restApiId,
  required String statusCode,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/restapis/${Uri.encodeComponent(restApiId)}/resources/${Uri.encodeComponent(resourceId)}/methods/${Uri.encodeComponent(httpMethod)}/responses/${Uri.encodeComponent(statusCode)}',
    exceptionFnMap: _exceptionFns,
  );
  return MethodResponse.fromJson(response);
}