updateGatewayRateLimit method
Updates the entries of a gateway rate limit. The dimension keys are immutable after creation.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter entries :
Updated rule entries. key and dimensionKeys are immutable and cannot be
changed.
Parameter gatewayIdentifier :
The unique identifier of the gateway.
Parameter rateLimitId :
The unique identifier of the rate limit to update.
Parameter description :
Optional human-readable description for this limit.
Implementation
Future<UpdateGatewayRateLimitResponse> updateGatewayRateLimit({
required List<LimitEntry> entries,
required String gatewayIdentifier,
required String rateLimitId,
String? description,
}) async {
final $payload = <String, dynamic>{
'entries': entries,
if (description != null) 'description': description,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/gateways/${Uri.encodeComponent(gatewayIdentifier)}/rate-limits/${Uri.encodeComponent(rateLimitId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateGatewayRateLimitResponse.fromJson(response);
}