batchUpdateRule method
Updates the listener rules in a batch. You can use this operation to change the priority of listener rules. This can be useful when bulk updating or swapping rule priority.
Required permissions: vpc-lattice:UpdateRule
For more information, see How Amazon VPC Lattice works with IAM in the Amazon VPC Lattice User Guide.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter listenerIdentifier :
The ID or ARN of the listener.
Parameter rules :
The rules for the specified listener.
Parameter serviceIdentifier :
The ID or ARN of the service.
Implementation
Future<BatchUpdateRuleResponse> batchUpdateRule({
required String listenerIdentifier,
required List<RuleUpdate> rules,
required String serviceIdentifier,
}) async {
final $payload = <String, dynamic>{
'rules': rules,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/services/${Uri.encodeComponent(serviceIdentifier)}/listeners/${Uri.encodeComponent(listenerIdentifier)}/rules',
exceptionFnMap: _exceptionFns,
);
return BatchUpdateRuleResponse.fromJson(response);
}