Skip to content

apigatewayv2: GetApiMappings and DeleteApiMapping are unimplemented #566

Description

@scttfrdmn

aws apigatewayv2 get-api-mappings --domain-name <d> fails:

An error occurred (NotFoundException) when calling the GetApiMappings operation:
APIGatewayV2Plugin: unknown operation for GET /v2/domainnames/api.example.com/apimappings

parseAPIGatewayV2Operation (emulator/apigatewayv2_plugin.go:251-256) routes only
POST /v2/domainnames/{name}/apimappingsCreateApiMapping. GET on the same
path, and the /{apiMappingId} sub-path entirely, fall through to the default
branch's NotFoundException.

Found while verifying #529 end to end over the wire; it is a missing operation,
not a wrong response shape, so it was deliberately left out of that release rather
than folded into a wire-format change.

Missing today

Operation Method + path
GetApiMappings GET /v2/domainnames/{domainName}/apimappings
GetApiMapping GET /v2/domainnames/{domainName}/apimappings/{apiMappingId}
UpdateApiMapping PATCH /v2/domainnames/{domainName}/apimappings/{apiMappingId}
DeleteApiMapping DELETE /v2/domainnames/{domainName}/apimappings/{apiMappingId}

CreateApiMapping already stores state under apigwv2APIMappingKey(account, region, domain, mappingID), but nothing indexes the mapping IDs for a domain, so a list
handler needs an ID-set key alongside it — the pattern the other v2 collections
already use (apigwv2RouteIDsKey and friends).

Already in place

The response shape work is done: v2APIMappingOut / v2APIMappingWire
(emulator/apigatewayv2_wire.go) and the apigwV2ItemsOut[T] envelope both exist
and are tested, so a list handler is a routing + state-indexing change rather than a
shape one. Verified over the wire that create-api-mapping --query ApiMappingId
parses correctly.

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions