| 1 | import * as spanner from "@distilled.cloud/gcp/spanner_v1"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeSpannerInstanceHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { GetInstance } from "./GetInstance.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link GetInstance}. |
| 8 | * |
| 9 | * @layer |
| 10 | * @provides GCP.Spanner.GetInstance |
| 11 | */ |
| 12 | export const GetInstanceHttp = Layer.effect( |
| 13 | GetInstance, |
| 14 | makeSpannerInstanceHttpBinding({ |
| 15 | tag: "GCP.Spanner.GetInstance", |
| 16 | iam: { role: "roles/spanner.viewer", on: "spanner.instance" }, |
| 17 | operation: spanner.getProjectsInstances, |
| 18 | }), |
| 19 | ); |