getIntegrationResponse method

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

Represents a get integration response.

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

Parameter httpMethod : Required Specifies a get integration response request's HTTP method.

Parameter resourceId : Required Specifies a get integration response request's resource identifier.

Parameter restApiId : Required The string identifier of the associated RestApi.

Parameter statusCode : Required Specifies a get integration response request's status code.

Implementation

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