| 1 | import type * as rma from "@distilled.cloud/gcp/rapidmigrationassessment_v1"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { RuntimeContext } from "../../RuntimeContext.ts"; |
| 5 | import type { Collector } from "./Collector.ts"; |
| 6 | |
| 7 | export interface PauseCollectorRequest extends Omit< |
| 8 | rma.PauseProjectsLocationsCollectorsRequest, |
| 9 | "name" |
| 10 | > {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for Rapid Migration Assessment `collectors.pause`. |
| 14 | * |
| 15 | * Bind this operation to a {@link Collector} in a Function/Action init |
| 16 | * phase. Provide {@link PauseCollectorHttp}. |
| 17 | * |
| 18 | * Grants `roles/rma.runner` on the project: Rapid Migration Assessment |
| 19 | * has no resource-level IAM. |
| 20 | * |
| 21 | * ### Pausing Collectors |
| 22 | * **Example:** Pause the bound collector |
| 23 | * ```typescript |
| 24 | * const pauseCollector = yield* GCP.RapidMigrationAssessment.PauseCollector( |
| 25 | * onPrem, |
| 26 | * ); |
| 27 | * yield* pauseCollector(); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | * @category RapidMigrationAssessment |
| 32 | */ |
| 33 | export interface PauseCollector extends Binding.Service< |
| 34 | PauseCollector, |
| 35 | "GCP.RapidMigrationAssessment.PauseCollector", |
| 36 | ( |
| 37 | collector: Collector, |
| 38 | ) => Effect.Effect< |
| 39 | ( |
| 40 | request?: PauseCollectorRequest, |
| 41 | ) => Effect.Effect< |
| 42 | rma.Operation, |
| 43 | rma.PauseProjectsLocationsCollectorsError, |
| 44 | RuntimeContext |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | |
| 49 | export const PauseCollector = Binding.Service<PauseCollector>( |
| 50 | "GCP.RapidMigrationAssessment.PauseCollector", |
| 51 | ); |