1import type * as workstations from "@distilled.cloud/gcp/workstations_v1";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { RuntimeContext } from "../../RuntimeContext.ts";
5import type { WorkstationClustersWorkstationConfigsWorkstation } from "./WorkstationClustersWorkstationConfigsWorkstation.ts";
6
7export interface StopWorkstationRequest extends Omit<
8 workstations.StopProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsRequest,
9 "name"
10> {}
11
12/**
13 * Runtime binding for Cloud Workstations `workstations.stop`.
14 *
15 * Bind this operation to a
16 * {@link WorkstationClustersWorkstationConfigsWorkstation} in a
17 * Function/Action init phase. Provide {@link StopWorkstationHttp}.
18 * Grants `roles/workstations.user` on the workstation only.
19 *
20 * ### Stopping a Workstation
21 * **Example:** Stop the bound workstation
22 * ```typescript
23 * const stop = yield* GCP.Workstations.StopWorkstation(dev);
24 * yield* stop();
25 * ```
26 *
27 * @binding
28 * @category Workstations
29 */
30export interface StopWorkstation extends Binding.Service<
31 StopWorkstation,
32 "GCP.Workstations.StopWorkstation",
33 (
34 workstation: WorkstationClustersWorkstationConfigsWorkstation,
35 ) => Effect.Effect<
36 (
37 request?: StopWorkstationRequest,
38 ) => Effect.Effect<
39 workstations.Operation,
40 workstations.StopProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsError,
41 RuntimeContext
42 >
43 >
44> {}
45
46export const StopWorkstation = Binding.Service<StopWorkstation>(
47 "GCP.Workstations.StopWorkstation",
48);