updateLinkRoutingRule method
Updates a routing rule for a link.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter conditions :
The updated conditions for the routing rule. All specified fields must
match for the rule to apply. At least one condition field must be set.
Parameter gatewayId :
The unique identifier of the gateway.
Parameter linkId :
The unique identifier of the link.
Parameter priority :
The updated priority of the routing rule. Lower numbers are evaluated
first. Valid values are 1 to 1000. Priority must be unique among
non-deleted rules within a link.
Parameter ruleId :
The unique identifier of the routing rule.
Implementation
Future<UpdateLinkRoutingRuleResponse> updateLinkRoutingRule({
required RuleCondition conditions,
required String gatewayId,
required String linkId,
required int priority,
required String ruleId,
}) async {
_s.validateNumRange(
'priority',
priority,
1,
1000,
isRequired: true,
);
final $payload = <String, dynamic>{
'conditions': conditions,
'priority': priority,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/responder-gateway/${Uri.encodeComponent(gatewayId)}/link/${Uri.encodeComponent(linkId)}/routing-rule/${Uri.encodeComponent(ruleId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateLinkRoutingRuleResponse.fromJson(response);
}