| 1 | import * as featurestore from "@distilled.cloud/aws/sagemaker-featurestore-runtime"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { |
| 4 | BatchGetRecord, |
| 5 | type BatchGetRecordRequest, |
| 6 | } from "./BatchGetRecord.ts"; |
| 7 | import { makeFeatureGroupHttpBinding } from "./BindingHttp.ts"; |
| 8 | |
| 9 | export const BatchGetRecordHttp = Layer.effect( |
| 10 | BatchGetRecord, |
| 11 | makeFeatureGroupHttpBinding({ |
| 12 | tag: "AWS.SageMaker.BatchGetRecord", |
| 13 | operation: featurestore.batchGetRecord, |
| 14 | actions: ["sagemaker:BatchGetRecord"], |
| 15 | // The wire request identifies feature groups per identifier batch — scope |
| 16 | // the whole batch to the bound feature group. |
| 17 | prepare: (request: BatchGetRecordRequest, featureGroupName) => ({ |
| 18 | Identifiers: [ |
| 19 | { |
| 20 | FeatureGroupName: featureGroupName, |
| 21 | RecordIdentifiersValueAsString: |
| 22 | request.RecordIdentifiersValueAsString, |
| 23 | FeatureNames: request.FeatureNames, |
| 24 | }, |
| 25 | ], |
| 26 | ExpirationTimeResponse: request.ExpirationTimeResponse, |
| 27 | }), |
| 28 | }), |
| 29 | ); |