Files
floci/docs
Vũ Thế Huy 141fd747ee feat(redshift-serverless): add usage limit actions (#5378)
* feat(redshift-serverless): add usage limit actions

Add CreateUsageLimit, GetUsageLimit, ListUsageLimits, UpdateUsageLimit and
DeleteUsageLimit, following the botocore redshift-serverless model.

Usage limits are stored and echoed, not enforced: Floci does not meter RPU
consumption, so breachAction never fires. A limit belongs to a workgroup,
at most one per usageType, and disappears with it. The service checks the
workgroup on read instead of hooking deleteWorkgroup, so deletes through
CloudFormation are covered too.

* fix(redshift-serverless): reject malformed usage limit members and purge stale limits on read

- Usage limit string members of another JSON type (a numeric period,
  breachAction, resourceArn, usageType, usageLimitId or nextToken) were read
  as absent, so a create took the defaults, an update ignored the action and
  a list dropped its filter. They are now a ValidationException.
- maxResults accepted fractional and out-of-range numbers and truncated them.
  It must be an integer that fits an int.
- GetUsageLimit and the other id lookups answered 404 for a limit whose
  workgroup was gone but left the record in storage; they now delete it.
- Listing checked every limit with a full workgroup scan. It now takes one
  snapshot of the Region's workgroup ARNs per scan.
- Add a paging test that deletes the limit behind the nextToken.

* fix(redshift-serverless): permit multiple usage limits per type and return 400 on missing resources

- Remove the one-limit-per-usageType check on CreateUsageLimit so a workgroup can have multiple limits for the same usage type with different periods (e.g. daily and monthly serverless-compute).
- Align ResourceNotFoundException on usage limit actions with the AWS Redshift Serverless API specification by returning HTTP 400 instead of 404.
- Update documentation and test assertions accordingly.
2026-10-10 11:06:34 -04:00
..
2026-03-15 17:43:56 -05:00