CreateUsagePlanKey
Source:
src/AWS/ApiGateway/CreateUsagePlanKey.ts
Runtime binding for enrolling an API key in a UsagePlan
(apigateway:POST on /usageplans/{id}/keys).
The core of a self-service API-key onboarding flow: issue a key with
ApiGateway.CreateApiKey, then attach it to the plan that throttles
and meters it. Provide ApiGateway.CreateUsagePlanKeyHttp on the
Function effect to implement the binding.
Managing plan keys
Section titled “Managing plan keys”// initconst createApiKey = yield* ApiGateway.CreateApiKey();const createUsagePlanKey = yield* ApiGateway.CreateUsagePlanKey(plan);
// runtimeconst key = yield* createApiKey({ name: customerId, enabled: true });yield* createUsagePlanKey({ keyId: key.id! });