| 1 | import type * as SVC from "@distilled.cloud/aws/codepipeline"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | export interface PutJobSuccessResultRequest |
| 6 | extends SVC.PutJobSuccessResultInput {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `codepipeline:PutJobSuccessResult` — reports success |
| 10 | * for a job handed to the workload by a pipeline `Invoke` (Lambda) or |
| 11 | * custom action. Without this call the action times out. |
| 12 | * |
| 13 | * CodePipeline job operations do not support resource-level permissions, so |
| 14 | * the grant is on `*`. The binding takes no resource — the job id arrives |
| 15 | * with the invocation event. |
| 16 | * ### Job Workers |
| 17 | * **Example:** Complete an Invoke-Action Job |
| 18 | * ```typescript |
| 19 | * const putJobSuccess = yield* AWS.CodePipeline.PutJobSuccessResult(); |
| 20 | * |
| 21 | * yield* putJobSuccess({ |
| 22 | * jobId: event["CodePipeline.job"].id, |
| 23 | * outputVariables: { RELEASE: version }, |
| 24 | * }); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface PutJobSuccessResult extends Binding.Service< |
| 30 | PutJobSuccessResult, |
| 31 | "AWS.CodePipeline.PutJobSuccessResult", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request: PutJobSuccessResultRequest, |
| 35 | ) => Effect.Effect< |
| 36 | SVC.PutJobSuccessResultResponse, |
| 37 | SVC.PutJobSuccessResultError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const PutJobSuccessResult = Binding.Service<PutJobSuccessResult>( |
| 42 | "AWS.CodePipeline.PutJobSuccessResult", |
| 43 | ); |