PutKey
Source:
src/AWS/CloudFront/PutKey.ts
Runtime binding for cloudfront-keyvaluestore:PutKey.
Creates or replaces a single key in the bound KeyValueStore’s data plane.
Writes use optimistic concurrency: pass the store’s current ETag as
IfMatch (from DescribeKeyValueStore or a previous write’s
response). Provide the implementation with
Effect.provide(AWS.CloudFront.PutKeyHttp).
Writing KeyValueStore Data
Section titled “Writing KeyValueStore Data”// init — bind the operations to the storeconst describeStore = yield* CloudFront.DescribeKeyValueStore(store);const putKey = yield* CloudFront.PutKey(store);
// runtimeconst meta = yield* describeStore({});const res = yield* putKey({ Key: "routes:/about", Value: "/about.html", IfMatch: meta.ETag,});// res.ETag is the store's new entity tag