Skip to content

GetKey

Source: src/AWS/CloudFront/GetKey.ts

Runtime binding for cloudfront-keyvaluestore:GetKey.

Reads a single key’s value from the bound KeyValueStore’s data plane. Values are sensitive — distilled decodes them as Redacted<string>; unwrap with Redacted.value. Provide the implementation with Effect.provide(AWS.CloudFront.GetKeyHttp).

// init — bind the operation to the store
const getKey = yield* CloudFront.GetKey(store);
// runtime
const res = yield* getKey({ Key: "routes:/about" });
const value = typeof res.Value === "string" ? res.Value : Redacted.value(res.Value);