* fix(servicequotas): implement GetRequestedServiceQuotaChange RequestServiceQuotaIncrease now persists the requested change so GetRequestedServiceQuotaChange can read it back by id. An unknown request id returns NoSuchResourceException, matching AWS. Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * fix(servicequotas): unique id, region-scoped storage, history reads store; tests and docs Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * fix(servicequotas): update consumer test for UUID ids and distinct requests Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> * fix(servicequotas): refuse a second open increase request per quota AWS allows only one open service quota increase request per quota, so a repeat for the same quota in the same region must return ResourceAlreadyExistsException. Since every request stays PENDING, the duplicate check and the store are now one atomic unit under a lock, closed over the per-region store. Tests that asserted distinct ids now assert the exception, and the two @QuarkusTest classes reset emulator state before each test so an open request left by one test cannot refuse the next. Move the service test's private in-memory StorageFactory into io.github.hectorvent.floci.testing as a shared helper; migrating the other copies is a follow-up. Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com> --------- Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
4.5 KiB
Service Quotas
Protocol: JSON 1.1 (X-Amz-Target: ServiceQuotasV20190624.*)
Endpoint: POST http://localhost:4566/
Signing name: servicequotas
Floci answers Service Quotas lookups from a generated in-memory catalog. Every service code
resolves to a quota list: a curated set with real AWS quota codes where tooling depends on
them — CodeBuild's L-2DC20C30 ("Concurrently running builds") and Lambda's L-B99A9384
("Concurrent executions") — plus a deterministic generic set for any other service code. All
values are deliberately generous so local pipelines that gate on quota headroom, such
as AWS Landing Zone Accelerator, never stall on a limit the emulator does not enforce. The
Organizations Maximum number of accounts quota uses AWS quota code L-E619E033 and a local value
of 50. VPC's L-FE5A380F ("NAT gateways per Availability Zone", 5) and L-2AEEBF1A ("Rules per
network ACL", 20) carry their AWS default values, so tooling that compares a desired value against
the default before requesting an increase takes the same path it would against AWS.
Applied quotas and AWS default quotas return the same data, and quota values are static.
RequestServiceQuotaIncrease is accepted and validated, records the request, and lets you read
it back with GetRequestedServiceQuotaChange or list it with
ListRequestedServiceQuotaChangeHistoryByQuota, but it does not change any quota value. See
Limitations.
Supported Actions
| Action | Description |
|---|---|
ListServiceQuotas |
Lists the quotas for a service code; generated quotas for unknown codes |
GetServiceQuota |
Returns one quota by service and quota code, else NoSuchResourceException |
GetAWSDefaultServiceQuota |
Same as GetServiceQuota; defaults equal applied values |
ListAWSDefaultServiceQuotas |
Same as ListServiceQuotas; defaults equal applied values |
RequestServiceQuotaIncrease |
Validates and stores an increase request as PENDING; a second open request for the same quota is refused with ResourceAlreadyExistsException |
GetRequestedServiceQuotaChange |
Returns a stored request by id, else NoSuchResourceException |
ListRequestedServiceQuotaChangeHistoryByQuota |
Lists the stored requests for a service/quota pair, newest first |
Limitations
- Quota increase requests are persisted per region, but
Statusnever advances. A successfulRequestServiceQuotaIncreaseis stored under its own id and can be read back withGetRequestedServiceQuotaChangeor listed withListRequestedServiceQuotaChangeHistoryByQuotain the region that created it. Because a request staysPENDING, a secondRequestServiceQuotaIncreasefor the same quota in the same region is refused withResourceAlreadyExistsException, matching AWS's one-open-request-per-quota rule. Nothing processes a request, however, so it staysPENDINGand never reachesAPPROVED,CASE_OPENED, orDENIED.PENDINGis what real AWS returns on creation, so a caller that reads the creation response sees faithful data; a caller that polls for completion will wait forever. - Unknown service codes generate a quota catalog rather than failing. This is deliberate, so
the code has to be well-formed to be trusted:
ServiceCodeis validated against the modeled[a-zA-Z][a-zA-Z0-9-]{1,63}(max 63 characters) and a malformed one is rejected withIllegalArgumentExceptioninstead of returning invented quotas. - A requested increase does not change the quota.
GetServiceQuotacontinues to return the catalog value after a successful increase request. Quota values remain static by design so pipelines never stall on an unenforced limit. ListRequestedServiceQuotaChangeHistory(the account-wide variant without a quota filter) is not implemented.CaseIdis never returned; no support case is opened.SupportCaseAllowedin the request is accepted and ignored, as the emulator has no case-opening path either way.- The quota-increase template operations (
PutServiceQuotaIncreaseRequestIntoTemplateand related) are not implemented.
Configuration
| Environment variable | Default | Description |
|---|---|---|
FLOCI_SERVICES_SERVICEQUOTAS_ENABLED |
true |
Enables the service |
Example
aws --endpoint-url http://localhost:4566 service-quotas list-service-quotas \
--service-code codebuild
aws --endpoint-url http://localhost:4566 service-quotas get-service-quota \
--service-code codebuild --quota-code L-2DC20C30