Files
floci/docs
Priamo Germosen 5fc8b0418c fix(iam): separate a constraint failure from an invalid value in PutAccountProperties (#5240)
The key pattern and length checks answered InvalidInput while carrying the
"failed to satisfy constraint" wording that every other constraint check in
IamService pairs with ValidationError. The model declares InvalidInputException
on the operation and says nothing about which code a pattern miss produces, so
the two had drifted apart with nothing to settle them.

The API Reference settles it in Common Error Types rather than the operation's
own error table. ValidationError is a common error for every action, defined as
"The input doesn't meet the required format or constraints", 400. InvalidInput,
the one the operation declares, is "an invalid or out-of-range value was supplied
for an input parameter". PutAccountProperties publishes a Key Pattern of
^[A-Za-z][A-Za-z0-9/_-]*$, a key length of 1 to 50 and a value length of 1 to
1024, and the model declares all three on accountPropertyKeyType and
accountPropertyValueType. Violating a published pattern or length is a format
failure; a value that satisfies them and is still wrong is not.

So it is a split rather than a rename. The key pattern and length, and the value
length, are now ValidationError and keep the constraint wording, which was
already right for them. The Namespace/PropertyName rule stays InvalidInput: the
published pattern admits a key with no slash, with several, and with a trailing
one, so that rule only applies once the format is already good. Its message drops
the constraint wording and reads as prose, since that wording is what made the
pair look inconsistent. The same-namespace rule is unchanged.

aMalformedKeyIsRejected asserted one code for seven keys that fall on both sides
of that line, so it splits in two, each asserting its own code and the absence of
the other. As written it could not tell a pattern failure from the slash rule.

Not touched, though the same reading would question it: createServiceLinkedRole
answers InvalidInput for a check that is exactly the declared constraint on
AWSServiceName. Its message is prose rather than the front-end format, there is
no recording either way, and CreateServiceLinkedRole's error table is structured
identically to this one, so it proves nothing. Left alone rather than changed on
inference.

Refs #5177
2026-10-07 08:03:02 -05:00
..
2026-03-15 17:43:56 -05:00