| 1 | import type * as devopsguru from "@distilled.cloud/aws/devops-guru"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `devops-guru:SearchOrganizationInsights`. |
| 7 | * |
| 8 | * Searches insights across specific organization accounts within a start-time range (management or delegated-administrator account). The |
| 9 | * service requires both `FromTime` and `ToTime` on the range. |
| 10 | * Provide the implementation with |
| 11 | * `Effect.provide(AWS.DevOpsGuru.SearchOrganizationInsightsHttp)`. |
| 12 | * ### Organization Visibility |
| 13 | * **Example:** Search Insights Across Accounts |
| 14 | * ```typescript |
| 15 | * // init — account-level binding, no resource argument |
| 16 | * const searchOrganizationInsights = yield* AWS.DevOpsGuru.SearchOrganizationInsights(); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const { ReactiveInsights } = yield* searchOrganizationInsights({ |
| 20 | * AccountIds: ["111111111111"], |
| 21 | * Type: "REACTIVE", |
| 22 | * StartTimeRange: { |
| 23 | * FromTime: new Date(Date.now() - 24 * 3600_000), |
| 24 | * ToTime: new Date(), |
| 25 | * }, |
| 26 | * }); |
| 27 | * yield* Effect.log(`found: ${ReactiveInsights?.length}`); |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface SearchOrganizationInsights extends Binding.Service< |
| 33 | SearchOrganizationInsights, |
| 34 | "AWS.DevOpsGuru.SearchOrganizationInsights", |
| 35 | () => Effect.Effect< |
| 36 | ( |
| 37 | request: devopsguru.SearchOrganizationInsightsRequest, |
| 38 | ) => Effect.Effect< |
| 39 | devopsguru.SearchOrganizationInsightsResponse, |
| 40 | devopsguru.SearchOrganizationInsightsError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | export const SearchOrganizationInsights = |
| 45 | Binding.Service<SearchOrganizationInsights>( |
| 46 | "AWS.DevOpsGuru.SearchOrganizationInsights", |
| 47 | ); |