1import type * as SVC from "@distilled.cloud/aws/codepipeline";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface PollForJobsRequest extends SVC.PollForJobsInput {}
6
7/**
8 * Runtime binding for `codepipeline:PollForJobs` — fetches pending jobs for
9 * a custom action type so a job worker can claim and execute them. Valid
10 * only for action types with `Custom` in the owner field; returned jobs
11 * include the temporary artifact-store credentials (as `Redacted` values)
12 * and any secret configuration values.
13 *
14 * CodePipeline grants job-worker polling on `*` (the action-type sub-ARN is
15 * also honored, but the binding takes no resource — the action type is a
16 * request field).
17 * ### Job Workers
18 * **Example:** Poll for Custom-Action Jobs
19 * ```typescript
20 * const pollForJobs = yield* AWS.CodePipeline.PollForJobs();
21 *
22 * const { jobs } = yield* pollForJobs({
23 * actionTypeId: {
24 * category: "Build",
25 * owner: "Custom",
26 * provider: "MyBuilder",
27 * version: "1",
28 * },
29 * maxBatchSize: 1,
30 * });
31 * ```
32 *
33 * @binding
34 */
35export interface PollForJobs extends Binding.Service<
36 PollForJobs,
37 "AWS.CodePipeline.PollForJobs",
38 () => Effect.Effect<
39 (
40 request: PollForJobsRequest,
41 ) => Effect.Effect<SVC.PollForJobsOutput, SVC.PollForJobsError>
42 >
43> {}
44export const PollForJobs = Binding.Service<PollForJobs>(
45 "AWS.CodePipeline.PollForJobs",
46);