| 1 | import type * as datazone from "@distilled.cloud/aws/datazone"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Domain } from "./Domain.ts"; |
| 5 | |
| 6 | export interface PostTimeSeriesDataPointsRequest extends Omit< |
| 7 | datazone.PostTimeSeriesDataPointsInput, |
| 8 | "domainIdentifier" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `datazone:PostTimeSeriesDataPoints`. |
| 13 | * |
| 14 | * Posts time series data points (e.g. data-quality metrics) onto an asset or listing in the bound domain. The domain id is injected from the binding. |
| 15 | * Provide the implementation with |
| 16 | * `Effect.provide(AWS.DataZone.PostTimeSeriesDataPointsHttp)`. |
| 17 | * ### Time Series Metadata |
| 18 | * **Example:** Record Data Quality Metrics |
| 19 | * ```typescript |
| 20 | * // init — bind the operation to the domain |
| 21 | * const postTimeSeriesDataPoints = yield* AWS.DataZone.PostTimeSeriesDataPoints(domain); |
| 22 | * |
| 23 | * // runtime |
| 24 | * yield* postTimeSeriesDataPoints({ |
| 25 | * entityIdentifier: assetId, |
| 26 | * entityType: "ASSET", |
| 27 | * forms: [{ formName: "quality", typeIdentifier: "amazon.datazone.DataQualityResultFormType", content: "{}", timestamp: new Date() }], |
| 28 | * }); |
| 29 | * ``` |
| 30 | * |
| 31 | * @binding |
| 32 | */ |
| 33 | export interface PostTimeSeriesDataPoints extends Binding.Service< |
| 34 | PostTimeSeriesDataPoints, |
| 35 | "AWS.DataZone.PostTimeSeriesDataPoints", |
| 36 | ( |
| 37 | domain: Domain, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request: PostTimeSeriesDataPointsRequest, |
| 41 | ) => Effect.Effect< |
| 42 | datazone.PostTimeSeriesDataPointsOutput, |
| 43 | datazone.PostTimeSeriesDataPointsError |
| 44 | > |
| 45 | > |
| 46 | > {} |
| 47 | export const PostTimeSeriesDataPoints = |
| 48 | Binding.Service<PostTimeSeriesDataPoints>( |
| 49 | "AWS.DataZone.PostTimeSeriesDataPoints", |
| 50 | ); |