| 1 | import type * as guardduty from "@distilled.cloud/aws/guardduty"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Detector } from "./Detector.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `guardduty:UpdateOrganizationConfiguration`. |
| 8 | * |
| 9 | * Updates the organization's GuardDuty auto-enable configuration (delegated administrator only). |
| 10 | * The detector id is injected from the bound {@link Detector}. |
| 11 | * Provide the implementation with |
| 12 | * `Effect.provide(AWS.GuardDuty.UpdateOrganizationConfigurationHttp)`. |
| 13 | * ### Organization Administration |
| 14 | * **Example:** Auto-Enable New Accounts |
| 15 | * ```typescript |
| 16 | * // init |
| 17 | * const updateOrganizationConfiguration = yield* AWS.GuardDuty.UpdateOrganizationConfiguration(detector); |
| 18 | * |
| 19 | * // runtime |
| 20 | * yield* updateOrganizationConfiguration({ |
| 21 | * AutoEnableOrganizationMembers: "NEW", |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface UpdateOrganizationConfiguration extends Binding.Service< |
| 28 | UpdateOrganizationConfiguration, |
| 29 | "AWS.GuardDuty.UpdateOrganizationConfiguration", |
| 30 | ( |
| 31 | detector: Detector, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request?: Omit< |
| 35 | guardduty.UpdateOrganizationConfigurationRequest, |
| 36 | "DetectorId" |
| 37 | >, |
| 38 | ) => Effect.Effect< |
| 39 | guardduty.UpdateOrganizationConfigurationResponse, |
| 40 | guardduty.UpdateOrganizationConfigurationError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | export const UpdateOrganizationConfiguration = |
| 45 | Binding.Service<UpdateOrganizationConfiguration>( |
| 46 | "AWS.GuardDuty.UpdateOrganizationConfiguration", |
| 47 | ); |