CreateApiKey
Source:
src/AWS/ApiGateway/CreateApiKey.ts
Runtime binding for issuing API Gateway API keys
(apigateway:POST on /apikeys). Account-scoped — takes no resource.
The response’s value is Redacted<string> (distilled marks it
sensitive), so the plaintext key never leaks into logs. Provide
ApiGateway.CreateApiKeyHttp on the Function effect to implement the
binding.
Issuing API keys
Section titled “Issuing API keys”import * as Redacted from "effect/Redacted";
// init — account-level binding takes no resourceconst createApiKey = yield* ApiGateway.CreateApiKey();
// runtimeconst key = yield* createApiKey({ name: `customer-${customerId}`, enabled: true,});const plaintext = Redacted.isRedacted(key.value) ? Redacted.value(key.value) : key.value;