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