Skip to content

UpdateUsage

Source: src/AWS/ApiGateway/UpdateUsage.ts

Runtime binding for granting a temporary quota extension to an API key on a UsagePlan (apigateway:PATCH on /usageplans/{id}/keys/{keyId}/usage).

Provide ApiGateway.UpdateUsageHttp on the Function effect to implement the binding.

// init
const updateUsage = yield* ApiGateway.UpdateUsage(plan);
// runtime
yield* updateUsage({
keyId,
patchOperations: [
{ op: "replace", path: "/remaining", value: "500" },
],
});