hetzner-ts
    Preparing search index...

    Firewall Actions API

    Returns all Actions for Firewalls. https://docs.hetzner.cloud/#firewalls-actions

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    baseUrl: string
    token: string

    Methods

    • Get a specific action for a firewall

      Parameters

      • firewallId: number
      • actionId: number

      Returns Promise<
          | { response: { action: FirewallAction }; success: true }
          | { response: APIError; success: false },
      >

    • List all actions for firewalls

      Parameters

      • Optionalparams: {
            id?: number;
            page?: number;
            per_page?: number;
            sort?: SortOption;
            status?: ActionStatus;
        }

        Optional parameters for filtering and pagination

      Returns Promise<
          | { response: FirewallActionsResponse; success: true }
          | { response: APIError; success: false },
      >

    • Returns a specific Action for a Firewall.

      Parameters

      • firewallId: number
      • actionId: number

      Returns Promise<
          | { response: { action: FirewallAction }; success: true }
          | { response: APIError; success: false },
      >

    • Get all actions for a specific firewall

      Parameters

      • firewallId: number
      • Optionalparams: { page?: number; per_page?: number; sort?: SortOption; status?: ActionStatus }

      Returns Promise<
          | { response: FirewallActionsResponse; success: true }
          | { response: APIError; success: false },
      >

    • Type Parameters

      • T

      Parameters

      • endpoint: string
      • options: RequestInit = {}

      Returns Promise<{ response: T; success: true } | { response: APIError; success: false }>