The best way to control Claude Code, Codex and more from any computer or phone

main
ts 42 lines 1.43 KB
Raw
1 import type * as iotfleetwise from "@distilled.cloud/aws/iotfleetwise";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Campaign } from "./Campaign.ts";
5
6 /**
7 * `UpdateCampaign` request with `name` injected from the bound campaign.
8 */
9 export interface UpdateCampaignRequest extends Omit<iotfleetwise.UpdateCampaignRequest, "name"> {}
10
11 /**
12 * Runtime binding for the `UpdateCampaign` operation (IAM action
13 * `iotfleetwise:UpdateCampaign`), scoped to one {@link Campaign}.
14 *
15 * Approves, suspends, or resumes the bound campaign at runtime — e.g. an
16 * operations Lambda pausing data collection during an incident. Provide
17 * the implementation with
18 * `Effect.provide(AWS.IoTFleetWise.UpdateCampaignHttp)`.
19 *
20 * ### Campaign Control
21 * **Example:** Suspend and Resume a Campaign
22 * ```typescript
23 * const updateCampaign = yield* IoTFleetWise.UpdateCampaign(campaign);
24 *
25 * yield* updateCampaign({ action: "SUSPEND" });
26 * yield* updateCampaign({ action: "RESUME" });
27 * ```
28 *
29 * @binding
30 */
31 export interface UpdateCampaign extends Binding.Service<
32 UpdateCampaign,
33 "AWS.IoTFleetWise.UpdateCampaign",
34 (
35 campaign: Campaign,
36 ) => Effect.Effect<
37 (
38 request: UpdateCampaignRequest,
39 ) => Effect.Effect<iotfleetwise.UpdateCampaignResponse, iotfleetwise.UpdateCampaignError>
40 >
41 > {}
42 export const UpdateCampaign = Binding.Service<UpdateCampaign>("AWS.IoTFleetWise.UpdateCampaign");