updateIntegrationResponse method
Represents an update integration response.
May throw UnauthorizedException. May throw NotFoundException. May throw ConflictException. May throw BadRequestException. May throw TooManyRequestsException.
Parameter httpMethod
:
Required
Specifies an update integration response request's HTTP method.
Parameter resourceId
:
Required
Specifies an update integration response request's resource
identifier.
Parameter restApiId
:
Required
The string identifier of the associated RestApi.
Parameter statusCode
:
Required
Specifies an update integration response request's status code.
Parameter patchOperations
:
A list of update operations to be applied to the specified resource and in
the order specified in this list.
Implementation
Future<IntegrationResponse> updateIntegrationResponse({
required String httpMethod,
required String resourceId,
required String restApiId,
required String statusCode,
List<PatchOperation>? patchOperations,
}) async {
ArgumentError.checkNotNull(httpMethod, 'httpMethod');
ArgumentError.checkNotNull(resourceId, 'resourceId');
ArgumentError.checkNotNull(restApiId, 'restApiId');
ArgumentError.checkNotNull(statusCode, 'statusCode');
final $payload = <String, dynamic>{
if (patchOperations != null) 'patchOperations': patchOperations,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/resources/${Uri.encodeComponent(resourceId)}/methods/${Uri.encodeComponent(httpMethod)}/integration/responses/${Uri.encodeComponent(statusCode)}',
exceptionFnMap: _exceptionFns,
);
return IntegrationResponse.fromJson(response);
}