Files
floci/src
Daniël van ZielandPriamo 865dd1d658 fix(networkfirewall): validate replacement before replacing state (#4114)
* fix(networkfirewall): validate replacement before replacing state

* fix(networkfirewall): require UpdateToken and keep unchanged fields on update

UpdateRuleGroup and UpdateFirewallPolicy now require the current
UpdateToken and reject a stale one with InvalidTokenException, as the
API reference documents. The replacement is built from the stored
resource, so Capacity and Tags, which neither update request models,
and any field the request leaves out carry over instead of being
dropped.

A rule group's Type can't change after creation, UpdateFirewallPolicy
requires FirewallPolicy, and UpdateRuleGroup requires exactly one of
RuleGroup or Rules, so a request without a definition no longer wipes
the stored one. Rule group and firewall policy create, update and
delete now share the service lock, so a delete can't be undone by an
overlapping update and two updates holding the same token can't both
apply.

---------

Co-authored-by: Priamo <pgermosen@gmail.com>
2026-09-30 18:42:11 -04:00
..