1import type * as apprunner from "@distilled.cloud/aws/apprunner";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Service } from "./Service.ts";
5
6/**
7 * Resume a paused App Runner {@link Service} from a Lambda (or other AWS
8 * runtime). App Runner re-provisions compute capacity and the endpoint
9 * starts serving again. The call is asynchronous; pair with
10 * {@link ListOperations} to track the returned `OperationId`.
11 *
12 * Provide `AppRunner.ResumeServiceHttp` on the hosting function's Effect to
13 * implement the binding.
14 *
15 * ### Pausing and Resuming
16 * **Example:** Resume a paused service
17 * ```typescript
18 * const resumeService = yield* AppRunner.ResumeService(service);
19 * const { Service: resumed } = yield* resumeService();
20 * // resumed.Status -> "OPERATION_IN_PROGRESS" (settles to "RUNNING")
21 * ```
22 *
23 * @binding
24 */
25export interface ResumeService extends Binding.Service<
26 ResumeService,
27 "AWS.AppRunner.ResumeService",
28 (
29 service: Service,
30 ) => Effect.Effect<
31 () => Effect.Effect<
32 apprunner.ResumeServiceResponse,
33 apprunner.ResumeServiceError
34 >
35 >
36> {}
37export const ResumeService = Binding.Service<ResumeService>(
38 "AWS.AppRunner.ResumeService",
39);