1import type * as s3control from "@distilled.cloud/aws/s3-control";
2import type * as sts from "@distilled.cloud/aws/sts";
3import type * as Effect from "effect/Effect";
4import * as Binding from "../../Binding.ts";
5
6/**
7 * Runtime binding for `s3:UpdateJobStatus` (S3 Batch Operations).
8 *
9 * Confirms a suspended job so it runs (`Ready`) or cancels it
10 * (`Cancelled`) — e.g. an approval workflow that releases a bulk delete
11 * only after a human signs off. The account id is resolved once via
12 * `sts:GetCallerIdentity`. Provide the implementation with
13 * `Effect.provide(AWS.S3Control.UpdateJobStatusHttp)`.
14 * ### Running Batch Operations Jobs
15 * **Example:** Cancel a Job
16 * ```typescript
17 * // init — account-level binding, no resource argument
18 * const updateJobStatus = yield* AWS.S3Control.UpdateJobStatus();
19 *
20 * // runtime
21 * yield* updateJobStatus({
22 * JobId: jobId,
23 * RequestedJobStatus: "Cancelled",
24 * StatusUpdateReason: "superseded by newer manifest",
25 * });
26 * ```
27 *
28 * @binding
29 */
30export interface UpdateJobStatus extends Binding.Service<
31 UpdateJobStatus,
32 "AWS.S3Control.UpdateJobStatus",
33 () => Effect.Effect<
34 (
35 request: Omit<s3control.UpdateJobStatusRequest, "AccountId">,
36 ) => Effect.Effect<
37 s3control.UpdateJobStatusResult,
38 s3control.UpdateJobStatusError | sts.GetCallerIdentityError
39 >
40 >
41> {}
42export const UpdateJobStatus = Binding.Service<UpdateJobStatus>(
43 "AWS.S3Control.UpdateJobStatus",
44);