sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ FMS/ PutAppsList.ts

import type * as fms from "@distilled.cloud/aws/fms";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Request for {@link PutAppsList}.
 */
export interface PutAppsListRequest extends fms.PutAppsListRequest {}

/**
 * Runtime binding for `fms:PutAppsList`.
 *
 * Creates or updates a Firewall Manager applications list. Provide the
 * implementation with `Effect.provide(AWS.FMS.PutAppsListHttp)`.
 * ### Applications Lists
 * **Example:** Create an Applications List
 * ```typescript
 * // init — account-level binding takes no resource
 * const putAppsList = yield* AWS.FMS.PutAppsList();
 *
 * // runtime
 * const result = yield* putAppsList({
 *   AppsList: {
 *     ListName: "allowed-apps",
 *     AppsList: [{ AppName: "web", Protocol: "TCP", Port: 443 }],
 *   },
 * });
 * console.log(result.AppsList?.ListId);
 * ```
 *
 * @binding
 */
export interface PutAppsList extends Binding.Service<
  PutAppsList,
  "AWS.FMS.PutAppsList",
  () => Effect.Effect<
    (request: PutAppsListRequest) => Effect.Effect<fms.PutAppsListResponse, fms.PutAppsListError>
  >
> {}

export const PutAppsList = Binding.Service<PutAppsList>("AWS.FMS.PutAppsList");