| 1 | import * as scheduler from "@distilled.cloud/aws/scheduler"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeScheduleGroupScopedHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { ListSchedules } from "./ListSchedules.ts"; |
| 5 | |
| 6 | export const ListSchedulesHttp = Layer.effect( |
| 7 | ListSchedules, |
| 8 | makeScheduleGroupScopedHttpBinding({ |
| 9 | tag: "AWS.Scheduler.ListSchedules", |
| 10 | operation: scheduler.listSchedules, |
| 11 | actions: ["scheduler:ListSchedules"], |
| 12 | // An absent GroupName on ListSchedules means "all groups" — pin the |
| 13 | // default group so listing stays inside the bound group by default. |
| 14 | fallbackGroupName: "default", |
| 15 | // IAM evaluates scheduler:ListSchedules against the account-wide |
| 16 | // schedule/*/* pattern, so a group-scoped grant can never authorize it. |
| 17 | resourceScope: "all", |
| 18 | }), |
| 19 | ); |