deleteGatewayResponse method
Future<void>
deleteGatewayResponse({
- required GatewayResponseType responseType,
- required String restApiId,
Clears any customization of a GatewayResponse of a specified response type on the given RestApi and resets it with the default settings.
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException. May throw ConflictException.
Parameter responseType
:
Required
The response type of the associated GatewayResponse. Valid values
are
- ACCESS_DENIED
- API_CONFIGURATION_ERROR
- AUTHORIZER_FAILURE
- AUTHORIZER_CONFIGURATION_ERROR
- BAD_REQUEST_PARAMETERS
- BAD_REQUEST_BODY
- DEFAULT_4XX
- DEFAULT_5XX
- EXPIRED_TOKEN
- INVALID_SIGNATURE
- INTEGRATION_FAILURE
- INTEGRATION_TIMEOUT
- INVALID_API_KEY
- MISSING_AUTHENTICATION_TOKEN
- QUOTA_EXCEEDED
- REQUEST_TOO_LARGE
- RESOURCE_NOT_FOUND
- THROTTLED
- UNAUTHORIZED
- UNSUPPORTED_MEDIA_TYPE
Parameter restApiId
:
Required
The string identifier of the associated RestApi.
Implementation
Future<void> deleteGatewayResponse({
required GatewayResponseType responseType,
required String restApiId,
}) async {
ArgumentError.checkNotNull(responseType, 'responseType');
ArgumentError.checkNotNull(restApiId, 'restApiId');
await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/gatewayresponses/${Uri.encodeComponent(responseType.toValue())}',
exceptionFnMap: _exceptionFns,
);
}